For businesses, accurately tracking and identifying users across multiple devices and sessions is essential for gaining meaningful insights. The GA4 User ID is a method in GA4 for identifying users on your online platform. This feature enhances user identification, unifies user activities, and provides a comprehensive view of user interactions across platforms and devices.
This article will explain what GA4 User ID is, highlight the benefits of using it, and provide a step-by-step guide on setting it up. Read on to learn how to optimize your GA4 configuration for improved user tracking.
What is (Effective) User ID in GA4?
In Google Analytics 4 (GA4), several IDs are used for user identification, each serving a specific purpose. Understanding the various IDs used for user identification in Google Analytics 4 (GA4) and how they are collected is essential for effective user tracking.
When a user visits your website without logging in, GA4 generates a user_pseudo_id based on a cookie stored on the user’s device. This unique ID identifies the user for that specific browser on that particular device. However, if the same user visits the website from a different device or browser, a new user_pseudo_id will be generated.
In the case of mobile apps, the equivalent of the user_pseudo_id is the App-instance ID, which is associated with a device for each instance of an app.
The limitation of separate user identification for different browsers and devices is addressed by the GA4 User ID feature. This feature enables cross-device and cross-platform tracking by allowing you to create and assign User IDs using your user authentication system. For instance, you can use unique details such as email addresses collected during user sign-up to assign a custom ID, which is then sent to GA4 for user identification. This helps unify a user’s journey across your website or application.
The User ID is a custom identity ID for each signed-in user on your application or website. By assigning a unique User ID to your visitors in GA4, you can identify each user across multiple sessions, devices, platforms, or browsers, thus allowing you to connect multiple devices and sessions to a specific user. The user id is stored with the effective user id dimension in GA4.
Reporting Identity Options in GA4
In GA4 three methods can be used to identify users and collect associated data, and they include:
- User ID: The user identification ID you create with the use of your user authentication system for each signed on user on your platform.
- Device ID: This is the device ID associated with a device being used on your website or application. The device ID is the client ID for websites. On apps, the device ID is the app-instance ID.
- Modelling: Google uses machine learning to estimate user data of users who decline analytics identifiers. The data of users from the same GA4 property who have accepted these identifiers is used in modelling the missing data.
The Reporting Identity is any of the methods discussed above used by your GA4 property for data collection and identifying your website or app users. There are three reporting identity options to choose from. You can set this up in the GA4 admin section. Let’s look at these options in detail.
- Blended: This uses the first available method by their order of preference. It uses the user ID if it is collected. If the User ID is not collected, it uses information from the device ID. If none of the above methods are available, then it uses modelling.
- Observed: It uses the User ID if it is collected. If no ID is not collected, it uses information from the device ID.
- Device based: It uses only the device ID irrespective of the availability of all other IDs that are collected.
For most businesses, our team recommends selecting the Blended reporting identity option. This option offers the most comprehensive and accurate data by prioritizing the User ID when available, then using the Device ID if the User ID is not collected, and finally resorting to modeling. This approach ensures you capture the fullest picture of user interactions across various devices and sessions, leading to better insights and more informed decision-making.
Benefits of sending User ID in GA4
Sending User ID in GA4 offers several significant benefits, some of which include:
- Accurate User Tracking: Assigning unique identifiers to users allows for precise tracking of individual behaviour across multiple devices and sessions, reducing duplicate counts and providing a clearer picture of user interactions.
- Holistic User View: User ID consolidates user activities into a single profile, offering a comprehensive view of the user journey across different platforms, browsers, and devices.
- In-Depth Analysis: Aligning User IDs in GA4 with those in your database or CRM enables more detailed and meaningful analysis, allowing you to connect online behaviour with offline data for a richer understanding of user interactions.
- Cross-Device Attribution: User ID tracking facilitates better attribution analysis by linking user actions across different devices, helping businesses understand the complete user journey and the impact of various touchpoints.
This list is not exhaustive; the benefits are numerous. By fully utilizing the advantages of sending User ID in GA4, businesses can gain deeper insights into user behaviour, enhance personalization, and make more informed decisions. This ultimately leads to improved user experiences, higher engagement, and increased business success.
What can be used for User ID value in GA4
The User ID you assign to a user should be fewer than 256 characters and could be a combination of numbers and alphabets.
It should not contain information that a third party could use to determine a user’s identity, as such Personal Identifiable information’s (PII) such as email addresses, social security numbers, names, should be avoided. This is in accordance with Google’s Terms of service. Users are also to be informed on how you use the identifiers. Please see Google’s Terms of Service for further details. You can also check this article to learn how GA4 is GDPR compliant, GDPR is one of the standards that dictates how private data should be protected.
Don’t create custom dimensions for User ID
Google recommends not creating custom dimensions for User ID. This is because the number of possible unique values for User ID could be over 500 unique values in one day. This would lead to an increased number of rows in a report that could likely exceed the row limit causing values beyond the limit to be aggregated into a single row, the (other) row.
How to set up GA4 User ID Tracking
Once you have your User ID generation method in place, the next step is to integrate these IDs into your GTM setup. This involves fetching the user id values to GTM and then to GA4. There are various methods for setting up GA4 User ID tracking using GTM, and we will examine them closely below. Each method has its own advantages, so choose based on your website’s setup and the resources available. Please remember to always prioritize user privacy and ensure compliance with data protection regulations when handling User IDs.
Push the User ID to the Data Layer
You can push the user ID to the data layer with the help of a developer or by using a plugin. Once your development team has set up a system to generate IDs for signed-on users, ask the team to push the User ID to the Data layer with the code below.
Some platforms, like WordPress, offer GTM plugins that can handle User ID implementation, so a developer need not get involved in that case.
“USER_ID” is a dynamic variable that stores a unique ID for every user.
A data layer variable has to be created in GTM to store the value of the User ID from the data layer in GTM.
Use JavaScript Variable
This method accesses global JavaScript variables on the page. It can retrieve various data, including User IDs if the user ID is available.
Here’s how to find and use them: Ask a developer to do it or search for it yourself. Open your browser’s developer console to search for the JavaScript variable and ensure that you save the variable path.
To implement this in Google Tag Manager (GTM):
- Create a JavaScript Variable in GTM and enter the appropriate JavaScript code to access the User ID.
- In GTM, go to Variables > New > JavaScript Variable.
- Enter the path of the ID (remember it is case-sensitive).
DOM Scraping
To extract values from a website’s document object model (DOM), you can use DOM scraping. However, this method is less reliable due to potential website changes. To fetch the user IDs using DOM scraping, start by locating the User ID in the website interface. You will need knowledge of HTML and CSS selectors to identify elements with unique IDs or classes containing the User ID. Next, in Google Tag Manager (GTM), create a DOM Element Variable to retrieve the value of the user ID. Set the Selection Method to “ID” or “CSS Selector” based on your chosen method, and enter a specific ID or CSS Selector.
Retrieve User ID from Cookies
Check whether the User ID is stored in a cookie. To do this, you can ask the developers for help or investigate using the browser’s developer tools. In your browser, navigate to More Tools > Developer Tools > Application > Cookies. Look for a cookie name that may contain the User ID.
If you find the User ID stored in a cookie, create a 1st Party Cookie variable in GTM with the name of the cookie.
So, irrespective on any of the 4 options used in fetching your user id values in GTM, you would need to send user id to GA4.
To send the variable that you have created from GTM to GA4, you need to set the User ID in your global configuration tag. Open your main configuration tag, under the Field to set section add user_id in the field name and then select the variable created above as the value.
How to configure GA4 User ID using GTAG
To set the User ID with gtag.js, update the Config for your property with the code below:
gtag('config', 'GA4_Measurement_ID', {
'user_id': 'USER_ID'
});
To learn how to use GTAG for GA4 please check this article.
How to properly check your implementation
Here are the steps to properly check your implementation:
- Use GA4 DebugView: To monitor real-time data and events as they are sent to GA4, you can use GA4 DebugView. To access DebugView, go to your GA4 property, click “Admin” in the left-hand menu, and then select “DebugView.” To make sure that the User ID is working correctly, test the implementation by logging in and interacting with your website or app using different devices and sessions. Filter the events in DebugView by your device or session and see if the user_id parameter appears.
- Check for the “Signed in with user ID” Dimension: Use the “Signed in with user ID” dimension in GA4 to filter and analyse data for users who have been assigned a User ID. This dimension is helpful for verifying that the User ID is correctly applied to authenticated users. To check this, you can build a comparison using the “Signed in with user ID” dimension in GA4 reports.
- Verify Effective User ID: The Effective User ID is the dimension that GA4 uses to track a user across sessions and devices. You can use the User Explorer report to verify the Effective User ID. To do this, navigate to “Explore” in the left-hand menu, select “User Explorer,” and look for the Effective User ID column. Look for an ID that matches the format you used to generate user IDs. This will help you confirm that the User ID is being tracked.
GA4 User ID Report: Where to find User ID in GA4
After setting up your User ID, the data will appear in GA4 after 24 hours. You can find the User ID in the User Explorer report which is one of the GA4 Exploration report templates.
To create a User Explorer report simply navigate to GA4 Explore, select the Template gallery, and click on the “User Explorer” template.
The User Exploration report can be used to explore the behaviour of groups of individual or specific users. When you create a User Explorer report, GA4 shows you a default view of the User ID against some metrics. Here, it is called the Effective User ID for both website and application users. This field shows the User ID if collected or the user_pseudo_Id if User ID is not available for a user. The user_pseudo_id can be identified as the IDs with a dot, while the User ID can be identified with the format you used in creating them.
GA4 User Explorer report doesn’t allow full access to your data except by using a custom dimension, and it is not advisable to create a custom dimension with User ID. You can access the entire user’s data by connecting GA4 with BigQuery without having to create the custom dimension. Writing SQL statements in BigQuery to get the data for you in Google Looker Studio will enable you to see all the events and parameters.
GA4 User ID limitations
While the GA4 User ID feature offers significant advantages in tracking and identifying users across multiple devices and sessions, it does come with certain limitations. Some of these include:
- User Authentication Needed: The GA4 User ID feature relies on user authentication. This means you can only track users who log in or authenticate themselves on your website or app. The User ID feature cannot function without user authentication, limiting its applicability to platforms where user login is not required.
- Historical Data: Data collected before implementing GA4 User ID will not be reprocessed or associated with a User ID. This means that historical data cannot be retroactively linked to User IDs, potentially limiting the completeness of user journey analysis.
- Cross-Property Data Sharing: User ID data collected in one GA4 property cannot be shared with User ID data in other properties. This limitation can restrict the ability to analyze user behavior across multiple properties under the same organization.
- Real-Time Data Limitations: A real-time view of User ID data is not available in GA4. This means you won’t be able to monitor user activities associated with User IDs in real-time, which can limit immediate insights and actions.
Understanding these limitations is crucial for setting realistic expectations and effectively leveraging the GA4 User ID feature to enhance your user tracking and analytics capabilities.
Do you need extra help setting up the GA4 User ID?
Implementing GA4 User ID requires creating unique identifiers and assigning them to your users, a process that can be complex. At Vakulski-Group, we are committed to providing expert assistance to ensure a seamless setup and maximize the benefits of GA4 User ID tracking. Our team of seasoned professionals will help you through every step, from creating and assigning User IDs to integrating them with your database or CRM, providing you with accurate user tracking, deeper insights, and enhanced personalization strategies.
We specialize in comprehensive GA4 assistance, including implementation, customization, and detailed data analysis, enabling you to leverage the capabilities of this powerful analytics tool fully.
Don’t let the complexities of GA4 User ID setup hold you back. Contact us today to schedule a consultation and elevate your user tracking to the next level!
Final Word on User Identification in GA4
User ID in GA4 is a custom identifier that you assign to authenticated users on your website or application. This feature lets you associate your own identifiers with individual users, making it specifically designed for platforms that support user authentication. By implementing GA4 User ID tracking, you can achieve a more accurate count of unique users and align the User IDs in GA4 with those in your database or CRM. This alignment enables you to conduct a more in-depth analysis, providing a holistic view of your users’ journeys across different platforms, browsers, and devices.
GA4 User ID helps in obtaining a precise count of unique users, eliminating duplicates and providing clearer insights into user behaviour.
It’s important to note that data collected prior to the implementation of GA4 User ID will not be reprocessed or associated with a User ID. Additionally, User ID data collected in one GA4 property cannot be shared with User ID data in other properties.By leveraging the GA4 User ID feature, businesses can enhance their user tracking capabilities, improve data accuracy, and gain deeper insights into user behaviour. This, in turn, facilitates more informed decision-making and better personalization strategies.
Frequently Asked Questions
The User ID feature is a cross device and cross platform measuring feature in GA4 for user identification.
With User ID you can track your users and their activities across multiple devices, sessions, and platforms. It gives a holistic view of your user’s journey and provides accurate data about your users that can be used for segmentation and retargeting. With it you have a shared identity with the dataset in your database or CRM.
You can set up User ID in GA4 by using GTM or GTAG.js
The user_pseudo_id in BigQuery is the ID generated by GA4 for every new visit based on the cookies on the user end. You can get this in BigQuery when you link your GA4 property to BigQuery.
You can see the User ID in the User Explorer report. To create a User Explorer report simply navigate to GA4 Explore, select the Template gallery, and click on the “User Explorer” template. When you create a User Explorer report, GA4 shows you a default view of the User ID against some metrics which you can then modify based on your needs.
You Might Also Like
Written By
Ihar Vakulski
With over 8 years of experience working with SaaS, iGaming, and eCommerce companies, Ihar shares expert insights on building and scaling businesses for sustainable growth and success.
KEEP LEARNING
Achieving 100% Accurate Booking Reporting in GA4 After sGTM Migration – The Q Train
The following is a glimpse into the success stories of our clients. Ready to see how we can empower your business? Reach out to us
Feature Adoption Metrics: Boost Your Product’s Performance
One of the key factors that can make or break a product’s success is the user experience, which largely depends on how a user interacts
Leave a Comment
Your email address will not be published. Required fields are marked *
Stay Updated About Every New GA4 Feature
Subscribe to this newsletter to learn more about new Google Analytics 4 features and adjustments.
No SPAM and only relevant content guaranteed!