I realise we have all always wanted to know how visitors actually interact on our website through different devices. For example, what are the combination of devices through which they come and get converted here as leads for us. Additionally, the lifetime value of different user types and differences between members & non-members are not available in any basic GA reports.

This happens because in a regular view of Google Analytics, the counts of users and sessions are separate if the same user enters our website using an iPad, a desktop, or/and an Android mobile phone.

To handle this problem and to give more accurate user and session counts, Google Analytics came up with the feature "User Id" through which we are able to unify the sessions that a single user is making using different devices, into one user in Google Analytics.

Here is the Step-by-Step guide to implement User Id tracking via GTM:

Step 1 - User-Id tracking enabling in Google Analytics

Step 2 - Create a new Variable in GTM to retrieve the logged-in user-Id

In GTM, retrieving a variable can be done by various ways, and here, we’ll retrieve a logged-in user’s userId that was stored in a cookie which was set by your site’s login system.

Following are the steps to do this:

Note: Google’s terms of service prohibit using personally identifiable information as a userId, don’t use names and email addresses.

Step 3 - Create a new Tag in GTM that will fire on each page view, setting the userId

Step 4 - Check your work in the Preview mode

Note:The data in this User-id tracking view updates every 10-15 minutes.

Benefits of Implementing User ID Tracking

So, you have learned to set up User-id tracking via GTM, and hence you should know the four main benefits of that:

About author

Saurabh Kumar

A marketing enthusiast with a fascination for technology, an interest in tinkering with data and systems, and 4+ years of experience at ebookers, Saurabh Kumar Founder Envigo, a digital marketing agency, in the year 2007. His passion for Digital Marketing led him to launch a data-driven digital marketing solutions agency.

View posts by Saurabh Kumar

Would you like to work with us?

Get in touch.

You might also like