[Resolved] Adding Google Analytics to GeneratePress

Home Forums Support Adding Google Analytics to GeneratePress

This topic contains 7 replies, has 2 voices, and was last updated by  David 1 year, 4 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #693234


    Hi, I am trying to add Google Analytics to GeneratePress and I am not sure I did it correctly.

    Do I just need to select Add Element => Hooks => Select WP_Head Hook and paste the tracking code above while also selecting all pages in the location?

    Anything else I need to do?

    GeneratePress 2.1.4
    GP Premium 1.7.2

    David Customer Support

    Hi there,

    Thats the correct hook. For the display rule choose Entire Site if you want everywhere covered.
    The second script they provide which needs to be added after the opening body tag, you can do the same but use the before_header hook



    Thanks David. Not sure I understand the second script. When I go to GA the only thing I see is the full script for: Global Site Tag (gtag.js)

    Is there another hook to setup somewhere and if so where would I get that info from Google Analytics?


    David Customer Support

    Sorry my bad – if its just GA then one script. If using Google Tag Manager its two.



    Gotcha, I honestly did not even know about Google Tag Manager. It looks like it would be helpful though for tracking. Do you guys have a support article or tutorial on installing it on the site?


    David Customer Support

    GTM is really handy for managing your tags from the google console, instead of adding or changing codes in the site. There are lots of guides online about setting it up. Include “the right way” in your search, its easy to do but just as easy to get wrong.

    For GP its just a case of hooking in the two scripts as mentioned above.



    Gotcha, thanks David


    David Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.