Google Analytics plugin and Tag Manager

Does the Google Analytics plugin work with the new Google Analytics Tag Manager code. Google has combined everything into one bit of code now.

it looks like this now:

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

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

Hi There,

Google analytics plugin only accept Google Analytics ID. For the code to be added, you can use another plugin. Please check this thread for guidance. Hope this helps.

Thanks. I just went ahead and did it with the child theme.

You are most welcome!
If you need anything else we can help you with, don’t hesitate to open another thread.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.