• Hello,
    My Google Analytics code ended up on the front end of all pages in my website. See https://watercontrolinc.com in the top left corner. It was my first time working with Google Analytics for WordPress. The instructions seemed simple enough so I’m not sure how I got it wrong. At any rate my problem is getting the code removed from my pages.
    I’ve looked through all the Google Analytics for WordPress support discussions and didn’t see this issue. I’ve also searched WordPress support on editing html or removing html with no success.
    I deactivated and removed the Google Analytics plug-in so I’m not sure what version I was using.
    Any help would be greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey, if you deactivate or delete the plugin the code should not show.

    If you are using the Genesis Framework you can easily insert you GATC by reading this page:

    https://www.carriedils.com/3-great-uses-for-genesis-simple-hooks-plugins/389

    There are alot of ways to do it, but in all honesty, I wouldn’t use a plug-in because GA is coming out with a new version soon and then you’ll need a new plugin to capture the value of the new code etc. ad naseum…but just following the above instructions you’ll be able to make edits in the future easily…plus, that article is correct in placing the GATC code correctly!

    Best, T. Alexander… 8)

    PS: FOr the future, you can also always use the GA Forums, very helpful!

    https://productforums.google.com/forum/#!forum/analytics

    Thread Starter jvert5

    (@jvert5)

    Thanks for your response, T. Alexander!

    I have deactivated the plug-in and removed it, but the code remains. I’ve checked my header.php and functions.php files and can’t find the code. The only place I’ve found it is on the front end (for all the world to see) and in the source code, right in front of my custom CSS: see https://watercontrolinc.com in the upper left corner.

    Simple Hooks looks like a great way to get the code placed correctly, but I want to remove it. I’ve spent quite a bit of time looking at the GA Forums without much success since what I want to do is remove the code. Since I can’t edit the source code, I’m at a loss as to how to remove it.

    Thanks for any more help you can give!

    Jvert

    Looks like your header.php file is messed up — see the validation errors here:

    https://validator.w3.org/check?uri=http%3A%2F%2Fwatercontrolinc.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

    Fixing those may address the stray code problem.

    JVert,

    Now I took a look at the source code and saw ZERO Google Analytics code in any pages. To confirm this, I ran a report at gadetective.com and got this result:

    Results for https://www.watercontrolinc.com
    0% Correctness score

    0% of your pages are using the same UA-number and same codeversion.
    0% Pages with code

    0% of your pages had some kind of Google Analytics code.

    So, maybe you should check your analytics report for the date range of 2/3 – 2/4 and see if you’ve logged any traffic in your Google Analytics account and see what it says. As for the above validation errors, those can be troublesome as well.

    You might want to also contact your developer to have them make the corrections and use simple hooks to install the GA tracking code.

    Let me know, T….. “Go Gophers!” 8)

    Thread Starter jvert5

    (@jvert5)

    Hey,

    I sure appreciate your input!

    Sorry for my slow response. I have a day job that gets in the way.

    I realized I have probably misnamed my issue as the tracking code when it is my tracking ID#: “UA-37524642-1” this ID number is what is in the upper left corner of all my pages. It is a dark color on a dark background so a little difficult to see, but it is pushing down all the elements on the page: top menu, background image (which should be snug with the top), and logo, much to my chagrin. If you view the source code, it is on line 59, just before <!-- Custom CSS Styles --> and my CSS Styles.

    I definitely need to work on my validation issues, and that might make a difference. Unfortunately the server seems to be having issues and I haven’t been able to backup the site through FTP. Hopefully I can do that tomorrow. Please look one more time at the page https://watercontrolinc.com and I will keep you updated.

    Jvert

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Google Analytics tracking code on front end’ is closed to new replies.