Skip to content

Commit

Permalink
Merge pull request #32 from Gvidoou/adding_page_view_event
Browse files Browse the repository at this point in the history
Adding page view event
  • Loading branch information
Bukashk0zzz authored Sep 24, 2024
2 parents 3abbfeb + c0e59ce commit c389b00
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
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

0 comments on commit c389b00

Please sign in to comment.