XF 2.0 Google Analytics - Web Property ID versus Global Site Tag

tomwood

Member
I added the Google Analytics Tracking ID to the field in Setup>Options>SEO, but I notice that Google Analytics also offers a block of code they call the Global Site Tag:

Code:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-999999999"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-99999999');
</script>

Is this an either/or, or is there additional benefit to doing both?
 
  • Like
Reactions: TUG
did you ever get a solution for this?
I believe that the current implementation uses both when you have set up your GA code in the ACP... I remember asking why my site use using Google tag mananger. If you exam your site source code in your browser and search for gtag, you will find it.
 
Back
Top Bottom