Solved

GTM Events Not Sending?

  • 18 February 2022
  • 5 replies
  • 139 views

Badge

Hey all,

Currently having issue troubleshooting GTM. I’ve recently taken over the amplitude & GTM integration for our product (prev guy is unhelpful), but I’m having trouble getting new events into Amplitude.

 

We’re currently using this method: https://github.com/amplitude/GTM-Web-Demo to configure inside GTM but it doesn’t seem to be sending to amplitude. The events are firing when I use the GTM debugger, but it doesn’t seem to reach amplitude.

 

There are also existing events inside GTM that are not being sent, and these are not under the Govern blocked or hidden tab in Amplitude. Can anyone point me in the right direction?

 

 

icon

Best answer by belinda.chiu 22 February 2022, 18:56

View original

5 replies

Userlevel 4
Badge +7

Hey @KevDG ,

 

Non-dev here but also using GTM to send events to Amplitude so perhaps I can help. One question for clarity, are you able to confirm in DevTools that the SDK is loaded and initialized prior to the GTM requests?

Badge

Hey @KevDG ,

 

Non-dev here but also using GTM to send events to Amplitude so perhaps I can help. One question for clarity, are you able to confirm in DevTools that the SDK is loaded and initialized prior to the GTM requests?

It should be loading because existing events on GTM are still firing and being passed to amplitude with no problem and these new events are occurring on the exact same page as these existing events.

Userlevel 5
Badge +8

Hi @KevDG ! Welcome to the Amplitude Community! :wave:

Sorry to hear that you aren’t seeing your events logged in Amplitude. So to confirm, you have already checked the Deleted and Blocked sections in Govern to confirm that the new events are not listed there? Just wanted to confirm because usually if the tags were fired correctly under debugger mode but you don’t see the events in Amplitude, you may want to check your Deleted and Blocked sections in Govern - especially if your existing events on GTM are being passed to Amplitude with no problem and the events are on the exact same page. 

Another thought that came to mind is - is your website a SPA? If so, are you perhaps triggering the “sdk init” tag more than once? I remember working on a similar case before and that customer figured out the solution in which he was initializing the SDK multiple times per page transition which was causing problems because that’s not necessary in with a SPA. Perhaps this is a similar situation to yours?

Badge

Hi @KevDG ! Welcome to the Amplitude Community! :wave:

Sorry to hear that you aren’t seeing your events logged in Amplitude. So to confirm, you have already checked the Deleted and Blocked sections in Govern to confirm that the new events are not listed there? Just wanted to confirm because usually if the tags were fired correctly under debugger mode but you don’t see the events in Amplitude, you may want to check your Deleted and Blocked sections in Govern - especially if your existing events on GTM are being passed to Amplitude with no problem and the events are on the exact same page. 

Another thought that came to mind is - is your website a SPA? If so, are you perhaps triggering the “sdk init” tag more than once? I remember working on a similar case before and that customer figured out the solution in which he was initializing the SDK multiple times per page transition which was causing problems because that’s not necessary in with a SPA. Perhaps this is a similar situation to yours?



Yup, nothing appears in the Deleted or Blocked sections either nor are we a SPA.

But have since figured it out, there was an issue with the config in GTM!

Userlevel 5
Badge +8

Hi @KevDG ! Thanks for getting back to us and letting us know it was an issue with the config in GTM!

Any chance that the issue and the steps you took to resolve can be shared here on a public forum in case other Amplitude customers come across similar issue? All good if not! 

Reply