2
votes

I have an AMP page where I've included Google Tag Manager (GTM). Now I've created a "universal click" tag which is supposed to log every click into Google Analytics (GA).

google tag manager setup: category, action, label, value

It looks fine in the dev console:

dev console returns 200

A request is sent to the URL: https://www.google-analytics.com/collect?v=1&_v=a0&ds=AMP&aip=true&_s=3&dt=TypeScript%20MEAN&sr=1440x900&_utmht=1502735532566&cid=amp-2_4H1svvoL5wMZhnu8K97QEZkF1WNTydh_RkN3aMjHLPZwYUx22pjPPFLWsyTwe4&tid=UA-70730318-4&dl=https%3A%2F%2Fwww.tsmean.com%2F&dr=&sd=24&ul=en-gb&de=UTF-8&jid=&t=event&ec=https%3A%2F%2Fwww.tsmean.com%2F&ea=click&el=9&ev=&a=2321&z=0.08240769669002734

It seems to contain all the important query parameters:

  • ec=https%3A%2F%2Fwww.tsmean.com%2F&ea=click&el=9
  • ea=click
  • el=9
  • ev is empty in this case but to my understanding a value is not required where as the other three are?

Yet in Google Analytics Real Time Events, only the "Scroll-Events" I've also confiugred show up and nothing is seen of any click events:

google analytics real time not logging event

Does anyone know what the problem might be?

3

3 Answers

1
votes

I figured it out thanks to Google Analytics: Events sent, but not showing up in reports

I assumed an event value "ev=" is okay because I thought it's the same as just not sending an event value. This is not the case. "ev=" is not accepted by GA. You either have to leave away the value completely (i.e. not even an empty query parameter may be sent) or otherwise you have to provide a non-negative integer.

0
votes

In my case, I had the now "old" implementation of analytics.js on a web page, and I added a new gtags.js implementation and it "worked" but didn't show up on my new site to monitor. The events were sent to the old implementation.