Google Analytics
[resolved] Printed my Google Analytics ID to my header (4 posts)

  1. Kuawa Road
    Posted 2 years ago #

    I put my ID into your plugin, and instead of injecting code it injected the Google ID into every page of my WordPress install. I came to the support forum and when someone asked "where is the code installed" you said "in the wp_head area". That's not really helpful because you can define wp_head actions in almost any file.

    What is the exact file name and path of the destination of your plugin's target, and please don't say "in wp_head" or "__FILE__".

    The Google Analytics ID is in the top left corner of my site.


  2. gatorfantom
    Posted 2 years ago #

    I've used this plugin before and it worked as expected, but I did just run into a similar issue using a different plugin (and theme), so this topic is fresh in my mind right now. Here are a couple of things that may help, since the dev has responded to you yet:

    1. This page describes the actual code that needs to be inserted (it's about 14 lines of JavaScript) -- and the exact location of where it needs to go in relation to your existing code. http://support.google.com/analytics/answer/1008080

    2. This page goes over various approaches to deciding which file to put the GA code in. http://www.wpbeginner.com/beginners-guide/how-to-install-google-analytics-in-wordpress/

    3. If you run your site through a code validator (like this one: http://validator.w3.org/) you'll see why your GA ID is actually showing up on the site instead of being hidden. (There are about 20 errors, most of which deal with stray / improper tags in the header.)

    4. Lastly, if you can't get the plugin to work, these two are good alternatives:

    Hope that helps.

  3. Kevin Sylvestre
    Plugin Author

    Posted 2 years ago #

    Thanks for adding a detailed response "gatorfantom". Much appreciated.

  4. Kevin Sylvestre
    Plugin Author

    Posted 2 years ago #

    Resolving as it seems like an issue with the author's blog.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic