• Resolved davo99

    (@davo99)


    Hello!
    I can see that people have posted similar questions but I haven’t been able to find a working solution and thought I would post my situation to see if someone can point out what I’m doing wrong.

    The website concerned has one public page and a member area that must be logged into before anything is seen. I’ve been advised that Google’s User ID will help with tracking the pages visited by members in the private area. It’s a non-profit club hence trying to find a free solution.

    In Google, I have switched on Tracking Info > User ID and created a custom report (Member_Activity). I have also in Custom Definitions > Custom Dimensions created a dimension (dimension1) called Custom_User_ID.

    In each page’s header of the website is the following code:

    
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-nnnnnnnnn"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'UA-nnnnnnnnn');
    	var dimensionValue = 'member_id';
    	ga('set', 'dimension1', dimensionValue); // Set the user ID using signed-in user_id.
    	ga('send', 'pageview');
    </script>
    

    The idea is that each logged in user has a WordPress ‘member_id’ value and this value is given to ‘dimension1’. This is then sent to Google with the page being viewed. (member_id is being used to maintain user anonymity.)

    I change the Google Analytics screen from All Web Site Data view to either Member_Activity or Dimension_Value but the results show zero activity. (I have been active on the site via a separate session and another browser.)

    What am I doing wrong? What do I need to do to track the pages or links visited by each member?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @davo99. Is the Google Analytics script loading in the page source of your website? Could you share a link to the page that the script is on?

    You might have more luck finding people who know about Google Analytics in the Google Analytics Community Forum.

    https://support.google.com/analytics/community?hl=en

    Thread Starter davo99

    (@davo99)

    Robert Hi

    Thank you for your reply.

    I have posted in the GA forum and have received a great reply from Bronwyn that has helped me to achieve my aim. ??

    If a Moderator is around, they could close this thread?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help with tracking members using Google User ID’ is closed to new replies.