• Resolved Scott Kolbe

    (@scottkolbe)


    Good afternoon. I have the same issue that @luzud reported in the USP forum – the following tag code is appearing at the top left of every page:

    gtag(‘js’, new Date()); gtag(‘config’, ‘UA-XXXXXXXXX-X’);

    (I’ve changed the UA code for the forum)

    I deactivated all plugins and reactivated to see if there was a compatibility issue and the only one I ran into might be Jetpack. Happy to help troubleshoot, any thoughts are appreciated.

    Cheers!

    Scott

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Scott Kolbe

    (@scottkolbe)

    Looks like the new GA Google Analytics no longer requires the code snippet from Google to be added as an input – it’s added automatically. As a result, the code snippet was being echoed at the top of the page as in:

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

    Removing the added code and checking “gtag (new)” resolved the issue.

    Cheers!

    Scott

    • This reply was modified 5 years, 8 months ago by Jan Dembowski.
    Plugin Author Jeff Starr

    (@specialk)

    Awesome Scott, glad you got it sorted and thank you for sharing the solution. Cheers!

    Thank you so much Scott!

    I followed your solution by removing the Custom GA Code and just have the GA tracking ID, it worked!

    Cheers!

    Luz

    I am having this problem on the site https://www.pottymonkey.com, but I don’t have the know-how to find or change the code. I need help, please!

    ~Janet D.

    Update: I have found the code for the plugin, but I don’t know what part to remove – what part is the “Custom GA Code” that should be deleted?

    Thanks for any help!

    ~Janet D.

    Plugin Author Jeff Starr

    (@specialk)

    Not sure. The plugin doesn’t provide anything that you would be able to delete. So any code or whatever you are looking at is something that someone has added, and not something I have ever seen before.

    @marketingatpottymd, yes delete the Custom GA code and thats it ??

    • This reply was modified 5 years, 8 months ago by lauriita.

    Well, I know enough to know that I don’t know enough to know what I don’t know. I don’t know where to go to delete the Custom GA code. Thanks, anyways. Hopefully I can find something else that won’t cause the problem for the site.

    Plugin Author Jeff Starr

    (@specialk)

    It’s just a plugin setting. Literally called “Custom GA Code”. Locate it on the plugin settings screen, clear the contents, save changes, done.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘tracking code appearing on website’ is closed to new replies.