[Resolved] Adding Google Analytics to GeneratePress

Home Forums Support [Resolved] Adding Google Analytics to GeneratePress

Home Forums Support Adding Google Analytics to GeneratePress

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

    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?

    #693240
    David
    Staff
    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

    #693309
    Nate

    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?

    #693311
    David
    Staff
    Customer Support

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

    #693314
    Nate

    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?

    #693318
    David
    Staff
    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.

    #693321
    Nate

    Gotcha, thanks David

    #693422
    David
    Staff
    Customer Support

    You’re welcome

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