[Resolved] Google Analytics tracking code

Home Forums Support [Resolved] Google Analytics tracking code

Home Forums Support Google Analytics tracking code

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #31836
    John Turner

    Hi, I want to use Google Analytics with my GeneratePress site. Where is the best place for me to put the Google Analytics tracking code? As a header or footer element somewhere? Should I edit a file directly?

    #31841
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    If you have our GP Hooks addon, you can place it in the wp_footer area.

    If not – you can use a plugin: https://wordpress.org/plugins/google-analytics-for-wordpress/

    Let me know if you have any questions ๐Ÿ™‚

    #31850
    John Turner

    Perfect, thanks!

    #31854
    Tom
    Lead Developer
    Lead Developer

    You’re welcome!

    #49004
    Stephane

    Tom,

    For the Google Analytics tracking code, it is not better to put it in the before_Header area of the GP Hooks addon.

    I think I read it is better to put it just right after the body tag.

    #49005
    Stephane

    Oups. Just read to put it before the </head> tag.

    #49055
    Tom
    Lead Developer
    Lead Developer

    Ah, they do actually suggest you put it before the </head> tag.

    I’m not sure how much it matters, but if that’s the case, the code can go in the wp_head area of the Hooks.

    #141174
    Laia

    Hello

    Regarding that topic, once I pasted the GA code, should I also click the PHP box?

    Thanks
    Laia

    #141182
    Tom
    Lead Developer
    Lead Developer

    Only if you’ve added PHP in there.

    If it’s just the GA code, then checking the PHP box isn’t necessary ๐Ÿ™‚

    #839283
    zishe

    I bought premium but I don’t find where I get the GP Hooks addon option?

    #839290
    Leo
    Staff
    Customer Support
Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Google Analytics tracking code’ is closed to new replies.