Search code examples
google-tag-manageramp-html

http GET, finding tag name for fired GTM event


I want to see which GTM tag was fired by looking at the network tab in Chrome dev tools. Unfortunately, it looks that the data is compressed or something.

I'm in this situation because Google AMP pages don't allow the nice web based GTM debugger that's usually available. Thus you must use dev tools for QA.

The http calls use GET and have a path of /collect. I've expanded everything I can find and no dice.

Here's the summary line from my network tab:

collect?v=1&_v=a1&gtm=2agbc0GTM-N83V7HM&ds=AMP&aip…=&t=event&ec=&ea=&el=&a=1305&z=0.7694027908318071

I'm not sure if including a picture of my network tab would be useful since there's just so much information.

Any help is appreciated. There are quite a number of sites that tell you to use the network tab to debug GTM. But, I can't find any that help with deciphering its contents.


Solution

  • /collect is the endpoint for Google Analytics. The "t" parameter indicates what type of hit this is - in this case it's an event, which further confirmed by "ec" (event category), "ea" (event action) and "el" (event label).

    So this is (as you already know) a Google Analytics event tracking call. However it is not a valid call, since the mandatory parameters ("ec" and "ea") are empty.

    And alas you cannot get the name of the GTM tag from the network call. You would have to enable preview mode, step through the different GTM events (left side of the debug panel) to see if they fire GA tags. Then in the "tag" pane of the preview panel you have to look into the GA tags (click the "more" link in the tag info) to see which tag sends empty values.