How to Track Individual Users in Google Analytics 4

Katie Holmes
23rd January 2024

Track individual users in Google Analytics 4 and get a singular view of your customer journeys. 

When it comes to monitoring and measuring web traffic, most people will turn to Google Analytics 4. That doesn’t come as a surprise.

Google Analytics 4 is great for providing a general overview of traffic coming in and going out of your website, but in order to truly harness the power of Analytics, you need to focus on collecting and collating individual data instead.

While many marketers believe it’s out of the question to track individual users in Google Analytics 4, it’s not impossible.

If your application or website has a login authentication system, then it is possible to track users in Google Analytics 4 with its User ID tracking feature.

No authentication system? No problem. We have an alternative method for you to track users and link them to revenue.

Topics we’ll discuss:

TL;DR

👉 A User ID in Google Analytics 4 is a feature that allows tracking of user activity across devices and sessions by assigning a unique ID to each user.

👉 There is a dedicated report in GA4 called “User Exploration”. You can click through and see the different interactions each anonymous visitor has completed on your website. 

👉 There are two major flaws with user tracking in GA4. It requires users to log in to work, and Analytics can’t track personally identifiable information. 

👉 Without personally identifiable information, the link between your marketing, website and revenue is effectively broken. 

👉 With first-party visitor-level attribution, you can follow individual users, track customer journeys, and better validate your digital marketing efforts. Learn more on how to track website visitors.


What is the Google Analytics 4 User ID tracking feature?

Most of the data you see in Google Analytics 4 is aggregated, so you’re not able to find a specific user, where they came from, or what they did on your website.

With Google Analytics 4 User ID tracking, you have access to that data.

Google Analytics 4 sets a cookie whenever a user enters your website and assigns them a unique anonymous ID.

Related: All you need to know about first-party cookies and third-party cookies

There is a dedicated report in GA4 called “User Exploration”. You can find that by navigating to “Explore” in your Google Analytics 4 account. In Exploration, choose the template “User Explorer”. 

Here you can click through and see the different interactions each anonymous visitor completed on your website such as a view, event, purchase or goal completion.

By default, Google Analytics 4 doesn’t allow you to send over personal identifiable information about users on your website.

What you can do is generate your own unique IDs through your own user authentication system and send them to your Google Analytics 4 account.

A user authentication system is usually a website login, through which a user can log in and log out.

Let’s say, for example, a visitor clicks on a paid search ad and comes across your website.

The visitor signs up using their email address, navigates through your website and interacts with some of your products and leaves.

A few weeks later, the visitor returns using organic search, lands on your website and completes a purchase on your website.

Without a unique User ID, your Google Analytics 4 would record this journey as two separate users. When, in fact, it was the same person.

💡 Pro Tip: With a tool like Ruler, you can consolidate these interactions into a single-user journey without an authentication system. Ruler uses first-party deterministic click attribution to track your visitors. Every time a user revisits, Ruler’s code fires and matches the first-party data to repeat visitors. 

When a user completes a conversion, Ruler aligns the user’s details with their marketing touchpoints and sends this information to your CRM, allowing continuous tracking of the journey right up to the point of a closed deal (and beyond). We have more detail on Ruler further down, if you want to know more. You can jump directly to that section here.

Using ID tracking allows you to connect these sessions and create a single view of your users in Google Analytics 4. You can gain access to qualitative user data to distinguish how people interact with your website, products or services.


How do you set up User ID tracking in your GA4?

To implement the User ID feature, you must be able to generate your own unique IDs from your authentication system and include them in your Google Analytics 4 tracking code. Such task typically involves the help of a developer. You can learn more about this here.

💡 Important Note: We’ll assume that you have created a Google Analytics 4 configuration tag on your website. If you’re new to GA4. then check out our guide on setting up Google Analytics 4.


1. In your configuration tag, click on “Field to Set” > “Add Row” and enter in “User_id”. 

2. You will need to enter a variable that contains the actual ID of the visitor who has logged into your website. There are several options to capture the visitor’s User Id. We already know that Google Analytics 4 doesn’t allow you to capture personally identifiable information such as emails and IP addresses. You can, however, use a random sequence of numbers to track users. 

2.1 Ask a developer to push the User ID to the data layer

If your website has an authentication system that allows the users to log in with their credentials, then you can push the User ID to the Data Layer.

This isn’t easy to do, so you will need to ask a developer for help. You can give them access to your code, and they can modify it to capture the User ID. 

2.2 Capture the User ID from the already existing cookie

Some websites store the User Id in a cookie. In this case, you can use Google Tag Manager to capture the value and send it to Google Analytics 4.

If you’re using Google Chrome, you can check whether your website stores the User ID in a cookie by going to “More Tools” > “Developer Tools” > “Application” > “Cookies”.

Choose your domain and look for a name that might be related to a User ID. You can use the filter to help whittle down your results.

If your website stores the User ID in the cookie, take a note of the name, go to “Google Tag Manager UI > Variables > New. Select the variable’s type, 1st Party Cookie and enter the name into the “Cookie Name”.


2.3 Access the User ID via the Global JavaScript Variable

It’s not uncommon for the User Id to be stored in the Global JavaScript Variable.

Again, this is tricky. So we recommend that you ask a developer for some help.

You can, however, look for it yourself. Go to the developer console of your browser. Type “Window” and click “Enter“.

Next to “Window“, click on the black triangle. You should see a list of properties that you can use to access with a JavaScript Variable in Google Tag Manager.

If you manage to find an ID anywhere, head over to the Google Tag Manager interface > Variables > New > JavaScript Variable and enter the entire path that you followed to find the customer ID.

3. Now you’re ready to insert the User ID variable into your GA4 configuration tag that you set up in step. Once uploaded, click “Save”.

4. It’s time to test your configuration tag. Before you go live with your configuration tag, you need to test that it works in Preview mode. If you’re not sure how to do it, this guide on testing tags in GTM can help you. 

5. If everything looks good in GTM, go to the Google Analytics 4 DebugView to check it’s capturing the User Id. In GA4, go to Configure > DebugView. Best way to determine whether or not it’s working is by looking for your own device. Once you do that, you should see one of the items in the event stream listed as “user_id”. 

6. Once you’re satisfied with the data in GA4. Go back to GTM and save your changes. Click the submit button in the top-right corner and you’re good to go. Be aware that it can take up 24-hours before you notice the changes in GA4. 

💡Pro Tip: Now you know how to track visitor journeys in Google Analytics 4, how about taking it to the next level? Learn how to send marketing source data to your CRM and enrich your Google Analytics 4 reports with closed revenue. Learn how to unlock marketing revenue in Google Analytics 4


What are the limitations of the Google Analytics 4 User ID feature?

Google Analytics 4 User ID tracking has made it possible for marketers to track logged-in users and measure the effectiveness of their marketing across multiple channels and devices, but it isn’t perfect. Let’s take a look at why.


What’s an alternative way to track individual users and revenue?

Taking the limitations and the time it takes to set up User ID tracking into consideration, it’s clear that Google Analytics 4 isn’t the most reliable method to track your individual users.

If you really want to understand how users are behaving on your site, then multi-touch attribution platforms are the best way to go.

By monitoring and measuring the movements of specific visitors, you will be able to better serve your entire audience.

With first-party multi-touch attribution tools like Ruler, you can follow individual users, track customer journeys, and better understand the performance of your digital marketing efforts.

Related: How to view your full customer journeys with Ruler

Ruler tracks every anonymous visitor over multiple sessions, traffic sources, keywords and more, without the need of an authentication system. 

When an anonymous user converts into a lead via a phone call, live chat enquiry or form submission, Ruler will match the user’s conversion details to their marketing touchpoints, allowing you to see individual journeys directly in Ruler.

Take the example below. 

We can see that this visitor clicked on one of our Salesforce attribution ads and converted into a lead using a form. Having complete access to conversion and marketing touchpoint data allows us to gain full visibility into where our most valuable leads are coming from.

Once Ruler’s finished matching up your data, the marketing source and conversion data is sent to your CRM (or wherever you store your lead data), allowing you to monitor leads as they move through the sales funnel.

Marketing data typically includes channel source, campaign, keyword, landing page, first and last click activity. Ruler, however, can capture up to 60 marketing variables.

When a lead agrees to a sale or deal, whether it be in a week, month, year or more, the revenue amount is sent back to Ruler.

Related: How Ruler attributes revenue to your marketing

Here you can measure the impact of your marketing channels through the lens of different attribution models. More importantly, you can report on the effectiveness of your marketing based on pipeline generation and not just clicks and conversions.

You can also integrate revenue data with Google Ads, Analytics, Microsoft Advertising and 1,000+ tools to compare performance and measure marketing ROI straight out of the reporting tools you use every day.

💡 Pro Tip: Tracking customer interactions across multiple channels unlocks powerful insights that you can use to improve your customer experience and marketing efforts. See how Ruler tracks full customer journeys or book a demo to see it in action.


What about users generated from digital impressions?

First-party attribution tracking gives detailed insights into your clicks and digital touchpoints. 

But what if a person sees an ad, doesn’t click, but a few days later converts into a lead?

Neither GA4 nor traditional attribution can capture this interaction and link it to revenue. 

But there is a way to do it, and that’s through machine learning probabilistic modelling. 

With impression attribution, you can see what impact these invisible touchpoints (e.g. ad views) have had on your commercial outcomes.

Let’s revert back to Ruler and quickly explain how it works 

To track impression/view-through conversions, Ruler utilises a Bayesian statistics model based on machine learning to align impressions with conversions. When accessible, Ruler relies on marketing mix modelling outputs to establish the weights for each channel. 

In cases where MMM data isn’t available, Ruler utilises click-through rates, impression volumes, and other user-level signals as indicators of effectiveness and coverage. 

Once matched, Ruler employs Shapley Regression to allocate credit to each campaign.

Here’s the best bit. Ruler’s impression attribution doesn’t rely on cookies or personally identifiable information, making it future-proof and privacy-forward.

When Ruler’s impression modelling is paired with its attribution, you can: 


Don’t let Google Analytics 4 user tracking hold you back

User ID tracking in Google Analytics allows you to keep track and compare the behaviour of logged-in users.

But for all its benefits, User ID tracking in Analytics alone isn’t enough when you’re trying to determine what content and marketing channels are most influential at driving leads and revenue.

That’s why visitor level tracking is the most reliable way to go. Using a tool like Ruler, you can track and record every website visitor, and even better, see which of those visitors are turning into revenue.

Don’t forget you can read our in-depth guide on how Ruler attributes revenue back to your marketing for more information.

Or, if you’re ready to book a demo, then our team would love to talk. Schedule a time that suits you and learn more about the benefits of Ruler Analytics.

Google Analytics user tracking FAQs

Google Analytics uses first-party cookies to record data and user sessions on your website. Google Analytics sets a cookie whenever a user enters your website and assigns them a unique anonymous ID.
To track user data in Google Analytics 4, you need to create a User Exploration report. Navigate to Explore in GA4 and choose the template User Explorer. GA4 can't track personally identifiable information. It only offer unique ids for each user. Using a tool like Ruler Analytics, you can track anonymous visitors over multiple marketing sources. Whenever a lead converts, Ruler will match up the contact details and marketing touchpoints. This gives you better visibility of their journey and allows you to better track your marketing's performance.
To track user journeys in Google Analytics 4, go to Explore and choose the template User Explorer. GA4 can't track personally identifiable information, so you can't see who's converting on your website. Using a tool like Ruler Analytics, you can. When a visitor converts on your site, Ruler matches the user's details to their marketing touchpoints and sends the data to your CRM. This lets you know exactly how much revenue is generated from your marketing efforts.
To see the User ID in Google Analytics, go to Exploration and choose the template User Explorer. Here you should see a list of IDs. These are users that have engaged with your website. Click on each ID to get a closer look at their journeys.
To track users in Google Analytics, you need to create a user exploration report. To do this, go to Exploration and choose the template User Explorer. You should see a list of User ID in the report. Click on each user ID to review their engagement activity.