GA code showing above Nav Bar

Hello, my client’s site http://deltatradinggroup.flywheelsites.com/ is showing the GA code above the nav bar. I have every other site setup the same way as far as I can tell, but this is the only one showing the code visually like this- Can you help me find out how to remove this visually?

Drew

Hi There,

The google analytics code should look 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-11112222-1', 'auto');
  ga('send', 'pageview');

</script>

Regards!

Thanks, Thai-

Can I not just use the Google Analytics plugin in X/Pro to drop my GA code in? That’s what I’m using now, and its showing the code above the nav bar, but every other site I manage also uses this plugin, but does not show the code visually like this site.

Can you help me find out how to simply add the GA code to the plugin for this site, and keep it from showing above the nav bar?

Drew

Hey Drew,

Google Analytics plugin must be used to add the GA code. But make sure you’re using the right code. Input your Google Analytics code exactly as it is provided (i.e. with the tags included) otherwise it won’t work. If your host is caching your content, make sure to purge all cache after adding the code to make sure it works.

Hope this helps!

I understand. And so I replace my GA code with ‘GoogleAnalyticsObject’ above then, yes? I did this, and pasted the entire script in the GA plugin

Hi there,

Whatever the code that you have from Google analytics should be the same code you’ll put in the plugin.

I have checked on your site and the script seems to be loaded correctly on the header area without it being displayed visually.