WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Kuawa Road
    Member
    Posted 10 months 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__".

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

    http://wordpress.org/extend/plugins/googleanalytics/

  2. gatorfantom
    Member
    Posted 9 months 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:
    http://wordpress.org/plugins/google-analytics-for-wordpress/
    http://wordpress.org/plugins/google-analyticator/

    Hope that helps.

  3. Kevin Sylvestre
    Member
    Plugin Author

    Posted 9 months ago #

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

  4. Kevin Sylvestre
    Member
    Plugin Author

    Posted 9 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic