Exploring GA4: A brief overview of the User ID feature

Google Analytics 4 is at the front of everyone’s mind at the moment. From conversations with clients and industry peers, popular consensus seems to be fairly negative. This is understandable, and to some extent, deserved. GA4 has been rushed to market and is a little undercooked as a result. Some features available in the previous version, Universal Analytics, are not (yet) available in GA4. Other new features introduced by GA4 are not relevant or useful to a lot of website/app owners, which contributes towards making GA4 more confusing.

However, there are some positives missing from the conversation. Some of GA4’s new features and functionalities are genuine value-adds and a step up from Universal Analytics. One of these key features is the User ID functionality.

What is a User ID?

While Google’s privacy policies disallow tracking of personally identifiable information (PII), the User ID does not breach this policy, as it will typically be an ID number or random string that does not allow the user to be directly identified. 

A User ID is a unique identifier for individual users. If a user is in a logged-in state, you can send their User ID to GA4 with any tracked Events that the user triggers. 

The important thing to note is that User ID always remains the same whenever that user is logged-in to the site. This is the crux of how it works.

How does User ID work?

When a user authenticates themself – whether by logging into a customer portal, or signing in to their webstore account – you definitively know who they are. You can then assign a unique identifier to that user from your CMS or database (e.g. XYZ789) and track their activity throughout your website or app across multiple sessions, regardless of the browser or device they are using.

You’ll need to configure your Google Analytics tracking code to include User ID in the data that’s sent to GA4 servers. GA4 will then use this ID instead of a cookie to identify the user.

Wasn’t the User ID around in Universal Analytics?

User ID is not new to GA4. It was available in Universal Analytics (UA) as well. However, one of the major drawbacks with User ID in Universal Analytics is that it needs to be implemented to a separate, dedicated View in your GA account. Therefore, data of signed-in users and guests are segregated, making reporting difficult. 

In GA4, User ID can be tracked within your main GA4 property, providing a unified view of all your visitors across both websites and applications.

Benefits of the User ID feature

Improved user count

One of the key benefits is improved accuracy in the number of reported users. Without User ID tracking, the user count for most Google Analytics accounts is likely to be inflated.

Why is this? A user is technically counted as one Google Analytics cookie, which can only exist on the browser and device where it’s been set. Google Analytics cannot identify unique users across different web browsers.

Consider this example with no User ID tracking: I am on my desktop computer and I visit a website on Chrome, then again on Firefox. I open my phone and use Chrome to visit the website. In this scenario, Google Analytics would count me as 3 users.

Now here is an example with User ID tracking implemented:

I am on my desktop computer and I visit a website on Chrome & Firefox, and both times I log in to my account. I then open my phone and use Chrome to visit the website, logging into my account again. In this scenario, Google Analytics would count me as 1 user.

Improved reporting for user-related metrics and user insights

When user count accuracy improves, there is a flow on effect: all metrics which rely on user count also become more accurate. Some notable metrics include:

  • Views per user
  • Average purchase revenue per user
  • Sessions per user
  • Returning users
  • User conversion rate

Implementing User ID tracking also unlocks a native GA4 dimension, “Signed in with User ID”. Using this allows you to easily see how many people signed in as compared to how many browsed as a guest.

In turn, you can easily segment user behaviour. In general, logged in users are going to be your most valuable and loyal customers. A simple use case might be comparing the website eCommerce conversion rate for signed in users vs. guests.

Opportunity to send GA4 additional customer attributes to improve analysis & advertising capabilities

Setting up a User ID requires sending an anonymous ID from your CMS or customer database. This also presents an opportunity to share other attributes about that individual that may help you segment your visitors. 

The possibilities are endless, but below are some practical examples:

  • Demographics such as age range and gender
  • Customer lifetime value (LTV)
  • Company name (when you’re providing B2B services/products)
  • Plan or Subscription type (e.g. For industries such as SaaS, energy, telcos, insurance, etc.)
  • Customer first sign-up/purchase date
  • Course name and education level (e.g. For universities and educational organisations)

Add attributes that are helpful to you and are relevant to your organisation. It’s worth reiterating again here – don’t include anything that is personally identifiable.

Additional user attribute data can either be sent via your tracking code with the User ID or imported into GA4 using the Data Import functionality. With the latter approach, you can reconcile user attributes with their existing data by using the User ID as the join key.

Once additional user attribute data is in GA4, it will significantly improve your ability to understand the behaviour of logged-in users and enable you to improve your advertising through Google Ads. For example, you might choose to focus visibility of your ads towards users with high lifetime values, or show them ads for higher value items.

Other things to consider when using User ID

A critical element of your implementation is that User IDs must be anonymous. They cannot contain personally identifiable information (PII). While phone numbers and email addresses likely sit in your database and uniquely identify an individual, they cannot be used in the User ID field. 

It’s also worth noting that User ID should never have a default value set (e.g. “guest”, “staff”). The User ID must be unique to the user, otherwise it should not be defined.