Skip to content
Advertisement

Multiple Google Analytics gtag tracking IDs on same page

I have two property tracking IDs in my Google Analytics account for the same website. I basically want to have the same set of data inserted into both properties/views. Currently, this is how I have it set up on the site:

JavaScript

However, I have come to realize this is not actually working correctly. I believe the proper solution to this is this (two sets of script tags, one for each property), but I am not 100% sure:

JavaScript

Advertisement

Answer

After testing the solution in my question, I can confirm that is the proper way to solve this:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement