Reputation: 578
I have a litle script that send a event "pageView" and a "event"(click). With extensions GA debug (https://chrome.google.com/webstore/detail/gtmga-debug/ilnpmccnfdjdjjikgkefkcegefikecdc) i can see the pageview event so it's work !
But for the second all my event on click that don't work :
export const launchGAEvent = (eventCategory, eventAction, eventLabel) => {
if (isGTMReady() === false || isGAReady() === false) {
return
}
window.dataLayer = window.dataLayer || []
window.dataLayer.push({
event: 'GTM-WATCH_Event',
eventCategory,
eventAction,
eventLabel,
})
}
I fund where the problem come from event: 'GTM-WATCH_Event'
if i replace that by event: 'GTM-WATCH_Pageview'
all works !
I see all my event click, the problem i don't understand why ? The _Pageview is auto config in Google Analytics or Google tag manager and i need to setup the _Event ?
Thanks a lot
Upvotes: 0
Views: 640
Reputation: 578
The answer is something i try before but not with the actual state.
Juste open private navigation and all my event work fine. I can see it in the realtime Google Analytics !
For more details :
Now you need a triggers so click on new :
All is good, you can see if is work in previewMode (is tag is link)
After, on corner of 'Preview' click on 'send' select "publish" it's important. Now launch on private navigate like chrome and everything work fine.
Don't forget too watch the realtime Google analytics log because the other log can take 24hours too display.
Upvotes: 0
Reputation: 14179
You have to setup a trigger called GTM-WATCH_Event
to your event tag in GTM.
Upvotes: 1