In the fastpages instructions it’s asking for a UA-XXXXXX… formatted id, but I can’t seem to find that in the google analytics interface I created. Mine is formatted G-XXXXXXXXX
Here’s the instruction I am getting from google analytics, and I notice that in my fastpages header, the connection method is different.
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
Here’s my header current header trying to use the G-. id and that doesn’t work,
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create','G-XXXXXXXXXX','auto');ga('require','displayfeatures');ga('send','pageview');
</script>
so it appears that it’s using a different google analytics library called analytics.js
instead of gtag.js
and the call is slightly different. I wonder if there is a roadmap ticket to implement the new google analytics key format.