Dear sirs,
I have such Google Analytics code:
<!– Global site tag (gtag.js) – Google Analytics –>
<script async src=”https://www.googletagmanager.com/gtag/js?id=UA-24265XXX-XX”></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘config’, ‘UA-24265XXX-XX’);
</script>
Can I paste it to “AMP Analytics”? Will it work? If no, where can I take the other GA code?
Thank you in advance!
Hello !
The code must be inserted here: https://www.screencast.com/t/ZfSALunV8Ax First tab is for header codes, second one is for body codes.
Thank you !
I know where to insert the code.
Please, read my question and answer it. I didn’t ask where to insert the code. I meant if my code is ok.
You wrote: “The analytics json configuration code has to be of this form: …” (https://tagdiv.com/amp-newspaper-theme/).
And I don’t know where to get this “analytics json configuration code of this form”.
Please, read my questions above.
Thank you in advance.
Hello !
It may be that our documentation to be a bit outdated since the codes change pretty often. In order to receive the proper code the best way would be to follow googles guide. If their code is not like in our example that is not necessarily wrong.
Thank you !