Google Analytics Plugin not accepting my GA code

My Google Analytics account provides the following code (minus my tracking ID):

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

But the plugin strips out the tags in the 2nd line (with <script async scr="…) and leaves the URL which then shows at the top of my site.

Any help would be appreciated.

Hey,

Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

– Link to your site
– WordPress Admin username / password

Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

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