Google Analytics page not working
Hi
We've noticed that the Analytics ID field 'theme_adaptable_mmu | analyticstext1' is not working.
To get Google Analytics to work correctly we are having to put in the full java script in 'Custom CSS & JS' Javascript Section 'theme_adaptable_mmu | jssection'.
For example:
<!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-*-*"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date());
gtag('config', 'UA-*-*'); </script>
Comments (2)
-
-
reporter Hi, if I just rely on the section 'theme_adaptable | analyticstext1' and put our correct UA-XXXXXXXX-X code in there then the page renders with:
<script type="text/javascript"> (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', 'analyticstext1', 'auto'); ga('send', 'pageview'); ga('set', 'anonymizeIp', 1); </script>
It doesn't seem to be able to find analyticstext1 and convert that into the UA-XXXXXXXX-XX code which is in the field.
Meaning that I need to add the full script section in theme_adaptable | jssection to get it to work and report traffic to Google Analytics.
- Log in to comment
The code generated by Adaptable when GA is enabled is correct and it is the same Google adds:
Do you enter the right code format UA-XXXXXXXX-X ?
This is the only you must enter in the field.