Site logo

[Resolved] Adding Google Analytics Code To Header

Home Forums Support [Resolved] Adding Google Analytics Code To Header

Home Forums Support Adding Google Analytics Code To Header

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1726754
    Michael

    Hello,

    Just a quick question about adding the Google Analytics code.

    I searched the forum for previous posts and I found these instructions:

    1. Appearance > Elements > New > Hook.
    2. Add your GA Script or the first GTM Script.
    3. Select wp_head hook from the list
    4. Set Display Rules for Entire site.

    I have never heard of hooks before seeing this instruction, so I just wanted to make sure I’m doing it right!

    I can see the post interface when adding this, so my questions were:

    – When I’ve added the GA code here, do I just click publish?
    – Do I set it to public or private?

    Thanks!

    Michael

    #1726773
    Ying
    Staff
    Customer Support

    Hi Michael,

    – When I’ve added the GA code here, do I just click publish?

    Yes 🙂

    – Do I set it to public or private?

    Public.

    #1731439
    Michael

    Done it!

    Thanks,

    Michael

    #1731897
    Ying
    Staff
    Customer Support

    No problem 🙂

    #2481643
    Michael

    I’ve more Google code to add, but I need to remember how to add it! To head in all pages,

    <!– Google tag (gtag.js) –>
    <script async src=”https://www.googletagmanager.com/gtag/js?id=AW-1072711480″></script&gt;
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag(‘js’, new Date());

    gtag(‘config’, ‘AW-1072711480’);
    </script>

    #2481738
    David
    Staff
    Customer Support

    Hi there,

    go to Appearance > Elements
    Add New -> Hook.
    Add your code to the Text Area.
    Set the Hook to wp_head
    Set the Display Rules to Entire Site

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