[Resolved] Where can I paste my Google Analytics Script?

Home Forums Support [Resolved] Where can I paste my Google Analytics Script?

Home Forums Support Where can I paste my Google Analytics Script?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #884901
    Theodore

    Hi,

    Please, is there any place or section on them GeneratePress theme where I can paste my GA script? Most other wordpress themes usually have a section for this on their theme dashboard, but I’ve not been able to find it on my generatepress theme.

    I wanted to use the “Insert Headers and Footers” plugin for it, but I already have my Google Adsense and Amazon script there.

    Please, guide me.

    Thanks

    #884921
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You can use our Elements module for this.

    1. Create a Hook Element: https://docs.generatepress.com/article/hooks-element-overview/
    2. Set the hook to wp_head
    3. Add your script into the hook content
    4. Set the Display Rules and save

    Let me know if you need more info πŸ™‚

    #885106
    Theodore

    Thanks,

    So for Google Analytics code, which location should I set it to display? Throughout the entire site?

    #885282
    David
    Staff
    Customer Support

    Hi there,

    yes, the Entire Site display rule.

    #1070337
    Gabi

    Hello, I have a question regarding the insert Header and Footer plugin. I’m changing from another theme to GP Premium. With my previous theme, my GA code was added throughout the site with the plugin. However, I’d like to get rid of the plugin and use a hook. Do I have to do this before installing GP or can I do it after? And if I do it after, do I generate a GA code duplication until I don’t disable/delete the Header Footer plugin? My concern is mainly because I’m not working on a new site, but on a site with over 4 years worth of content

    I hope this question is clear.
    Thank you!

    #1070339
    Leo
    Staff
    Customer Support

    Any chance you can open a new topic for your question?

    Thanks πŸ™‚

    #1070348
    Gabi

    That was fast! πŸ™‚
    Sure

    #1070362
    Leo
    Staff
    Customer Support

    Thanks πŸ™‚

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.