• Resolved washingon

    (@barthevandoorn)


    My objective is to see logged in users in the Google Analytics view that has User-ID feature enabled and to see all users in the “All Web Site Data” view.
    Setup with the plugin to get logged in and visitors reporting into the “All Web Site Data” view was so easy! Thanks!

    But the GA view with User-ID enabled is showing no user activity. There is activity reporting as “Unassigned” in GA “All Web Site Data” view for Audience -> Behavior -> User-ID Coverage. And all users (logged in and visitors) are showing in “All Web Site Data”.

    The GA setup instructions to enable User-ID reporting for logged in users, indicate that the following needs to be added: gtag(‘config’, ‘GA_MEASUREMENT_ID’, {‘user_id’: ‘USER_ID’});
    See https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id

    Do I need to add “<script>gtag(‘config’, ‘GA_MEASUREMENT_ID’, {‘user_id’: ‘USER_ID’});</script>” outside of gwm4wp to enable User-ID feature in GA (and substitute the correct UA-XXXX for GA_MEASUREMENT_ID in the script)?
    It seems that the code may need to be “<script>gtag(‘config’, ‘GA_MEASUREMENT_ID’, {‘user_id’: ‘visitorId’});</script>” ??

    I have Visitors enabled (all boxes are checked) in the gtm4wp “Basic data” tab, and added visitorId, visitorLoginState and visitorType Data Layer Variables in GTM,
    (and verified that data is flowing and correct to google analytics). Do not track
    I can see logged in and non-logged in users in GA reports for “All Web Site Data” view and have inspected the data layer variables and see the right info.
    But, I am not seeing logged in user activity in a USER_ID enabled google analytics view for the same GA property… real time and history show 0 views, 0 events.

    My setup has gtm4wp container code placement as Custom and the code, per instructions, is placed as required. No changes are set in “Advanced” tab.

    If an updated howto would be helpful to add to your site, I’m open putting one together and send to you to publish.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    All references to the gtag() tracking codes are useless if you are using Google Tag Manager. With GTM, you need to do this in another way:

    #1 Make sure you enabled the plugin option to add the ID of the logged in user into the data layer
    #2 Create a new Data Layer Variable within GTM and enter visitorId into the Data Layer Variable Name field (make sure there is no default value set)
    #3 Open your Google Analytics Settings variable
    #4 Under “More settings” -> “Fields to set” add a new line and enter userId into the left part of the table and select the variable created in #2 into the right part of the table

    Publish your changes and you are done, you should now see traffic in your user ID enabled view.

    Thomas,

    I’ve followed your instructions and have been able to install and see the User ID View now. However, I’m seeing ClientID’s that I don’t recognize.

    A) How do I find out a particular users ClientID on my WordPress site? I can find UserID (we’re using a platform where members login), but not ClientID. The goal is to be able to take a particular user in our membership site and then find them in Google Analytics and see their activity.

    Thanks,

    Erik

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    In terms of Google Analytics, User ID and Client ID are two different dimensions:
    * User ID is what you can report to GA using your own data
    * Client ID is what GA is generating for each visitor in each browser they are using

    When you refer to Client ID, are you referring to the data that GA generates?

    hi @duracelltomi,

    I’ve followed your instructions and have been able to install and see the User ID in tag manager preview mode. But unable to see traffic in user ID enabled view.

    Are there any other modifications/settings I need to do in analytics or in the tag manager?

    Please guide me through this.

    Thanks,
    Rohit

    Sorry to bother you, my bad. It’s working now.

    Hi All,
    Hope all are safe

    Need help on creating User ID via GTM

    I am using a data layer to create UserId. Needed to know how to add data layer code?
    Pasting the code below is the right method? please suggest

    example :- <!– Google Tag Manager –>

    <script>dataLayer = [{‘userID’: ‘9507111’}];</script>
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
    new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
    https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,’script’,’dataLayer’,’XXXXXXX’);</script>
    <!– End Google Tag Manager –>

    • This reply was modified 4 years, 9 months ago by rakesh7111.
    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi @rakesh7111,

    Please open a new thread next time if you have a new question.
    If you are using this plugin (GTM4WP) then the GTM container code will be added to your site via the plugin.

    The data layer will be also initialized if you turn on the visitor ID in plugin settings under Basic data->Visitors

    User ID will be added into the data layer with the variable name: visitorId
    https://gtm4wp.com/how-to-articles/what-is-in-the-datalayer-when-using-this-wordpress-plugin/data-about-the-logged-in-user-on-the-site

    Hi @duracelltomi

    I have view for USER ID and getting data very well. But I consufed to match which visitorID belongs to which visitor on WordPress USer lists. For example I can see 670, 567 as visitorIDs on my analytics account in user view but when I check wordpress all users there is no visitor ID to match and understand which users belong to which visitor ID.

    Thank you in advance,

    Gulcin

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi @gulcinkarahan90,

    Next time, please open a new thread instead of posting into an already closed topic.
    User ID should be the ID of the user in WordPress. I am not sure why this does not match in your case.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘setup for User-ID coverage reporting and User-ID view in Google Analytics’ is closed to new replies.