Raphael Rlt
Raphael Rlt

Reputation: 578

Google analytics page views send but not event

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

Answers (2)

Raphael Rlt
Raphael Rlt

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 :

  1. Create a tag and select 'Google Analytics : Universal Analytics'
  2. In setting Google Analytics put you'r UA code like UA-xxxx-x

Now you need a triggers so click on new :

  1. Go to the last option 'customize event'
  2. Put in the name of you'r event like 'GTM_Event'

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

Michele Pisani
Michele Pisani

Reputation: 14179

You have to setup a trigger called GTM-WATCH_Event to your event tag in GTM.

Upvotes: 1

Related Questions