Hi,
I have created a new property to avoid getting false traffic numbers.
Can I add both my old and new tracking ID to the enfold theme?
I am adding my tracking ID under Enfold / Google Services / Google Analytics Tracking Code
Can I add my two tracking IDs, and just seperate them by a komma?
Best regards,
Camilla
Hey Camilla,
I found this link that says you can: https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers#working_with_multiple_trackers
In Enfold / Google Services / Google Analytics Tracking Code you need to enter the full script and create a second ga line, like this:
<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’,’https://www.google-analytics.com/analytics.js’,’ga’);
ga('create', 'UA-XXXXX-Y', 'auto');
ga('create', 'UA-XXXXX-Z', 'auto', 'clientTracker');
ga('send', 'pageview');
ga('clientTracker.send', 'pageview');
</script>
Best regards,
Mike
Hi Mike,
Thanks for a quick reply.
Will this then be correct? Not sure I added the two tracking ID correctly, they only vary by ‘-1’ and ‘-2’ in the end.
Hey!
I do not think u need to add b oth first and second code, only the second one with both ids’ should be enough
Regards,
Basilis