Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding page view event #32

Merged
merged 7 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
homepage: "https://stape.io/"
versions:
- sha: 3f0a634ab1082886bdf8667a37d99bc4a008548e
changeNotes: Added Page View event
- sha: 6f6d47d9011bc247df34b08c0bafcd45d11fe3de
changeNotes: Fix user data hashing.
- sha: 3639d997b1a2d25404a82ddaa428e6af05aba1c0
Expand Down
4 changes: 2 additions & 2 deletions template.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,12 @@ function getEventName(eventData, data) {
let eventName = eventData.event_name;

let gaToEventName = {
page_view: 'PageView',
page_view: 'Pageview',
click: 'ClickButton',
download: 'Download',
file_download: 'Download',
complete_registration: 'CompleteRegistration',
'gtm.dom': 'PageView',
'gtm.dom': 'Pageview',
add_payment_info: 'AddPaymentInfo',
add_to_cart: 'AddToCart',
add_to_wishlist: 'AddToWishlist',
Expand Down
10 changes: 7 additions & 3 deletions template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ ___TEMPLATE_PARAMETERS___
{
"value": "Subscribe",
"displayValue": "Subscribe"
},
{
"value": "Pageview",
"displayValue": "Page View"
}
],
"simpleValueType": true,
Expand All @@ -115,7 +119,7 @@ ___TEMPLATE_PARAMETERS___
}
],
"displayName": "Event Name",
"defaultValue": "ViewContent"
"defaultValue": "Pageview"
}
]
},
Expand Down Expand Up @@ -988,12 +992,12 @@ function getEventName(eventData, data) {
let eventName = eventData.event_name;

let gaToEventName = {
page_view: 'PageView',
page_view: 'Pageview',
click: 'ClickButton',
download: 'Download',
file_download: 'Download',
complete_registration: 'CompleteRegistration',
'gtm.dom': 'PageView',
'gtm.dom': 'Pageview',
add_payment_info: 'AddPaymentInfo',
add_to_cart: 'AddToCart',
add_to_wishlist: 'AddToWishlist',
Expand Down