[Resolved] Google Analytics Not Tracking

Home Forums Support [Resolved] Google Analytics Not Tracking

Home Forums Support Google Analytics Not Tracking

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1170789
    Sandee

    Hello,

    I’m using Google Site Tag to add analytics to my website. I have added it to the wp_head section via the Elements module, and the website activity is not being tracked.

    I tried to refer to this post https://generatepress.com/forums/topic/no-data-being-sent-to-google-analytics/, but there was no response to further action.

    Here’s the code I added. Can you advise on what I need to do to get the tracking to work?

    <!– Global site tag (gtag.js) – Google Analytics –>

    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-X"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'UA-XXXXXXXX-X');
    </script>
    #1170982
    Leo
    Staff
    Customer Support

    Hi there,

    Can you make sure everything is done correctly according to the instructions here?
    https://docs.generatepress.com/article/implement-google-tag-manager/#using-hooks-element

    Let me know 🙂

    #1171008
    Sandee

    Yes, I followed those steps and no sunshine. I’m not sure what the issue is, but I would love some help in getting this fixed.

    Thank you!

    #1171031
    Leo
    Staff
    Customer Support

    Just to confirm, you’ve added both blocks of code?

    If so it should work. Maybe give it some time.

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