Good day. Could someone please help on this. I am not finding documentation on installing the new Global Site Tag from Google Analytics and making sure the eCommerce tracking is working in Magento 1.
Here is the new Global Site Tag format:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxx-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-xxx-1');
</script>
The Google API section on Magento 1 does not seem to support this.
How does the below tie into the new GA tag?
- The type only shows GA and Universal.
This is the only way to add the new GA tag?
Hi there, any recommendations on this query?
Even if you do not have a solution, are you experiencing the problem?
Hello,
you need to add script code into Scripts section.
If you are adding all thing like GA number in that section.
Then disabled google API section.
Hope it will work for you.
If it will work then Mark as Solution.
Hi, thank you for the reply.
We have tried this solution. But then what happens is that the eCommerce transactions are not showing in Google Analytics. So we are currently enabling both for the transactions to show in GA.
Not the solution
Hello @rooki4life
Please add google analytics code as well into the script.
Hope it will help you.
Hello
<script type="text/rocketscript"> //<![CDATA[ (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', 'UA-your-code', 'auto'); ga('send', 'pageview'); //]]> </script>
please check and edit your code and paste it.
Then check it.
If it will work then Mark as a solution.
What script is that?
Is it part of the new Global GA tag? We require the Global GA tag so allow for Google AdWords tagging.
If I add the new Global GA tag plus your code it will be tracking twice?
Hello @rooki4life
please add both code and check it.