Google Analytics Event not showing up
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).
It looks fine in the dev console:
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:
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:
Does anyone know what the problem might be?
You can debug adding the prefix /debug to the URL. Example :
https://www.google-analytics.com/debug/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
This is the message of error of that hit, it is not valid! So removing the EV parameter on you tag should work it perfect (this is the tested preview on my account)
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 (ie not even an empty query parameter may be sent) or otherwise you have to provide an integer.
链接地址: http://www.djcxy.com/p/31192.html