[GA4] Measure activity across platforms with User-ID

Send user IDs generated by your business to your Analytics property

The User-ID feature lets you associate your own identifiers with individual users so you can connect their behavior across different sessions and on various devices and platforms. Analytics interprets each user ID as a separate user, which provides you with more accurate user counts and a more holistic story about a user's relationship with your business.

When you collect user IDs and you have linked Analytics to BigQuery, that information is exported to BigQuery regardless of the consent status of your users.

Before you begin

To send user IDs to Analytics, you need to create a unique ID for each user on your own and assign and consistently reassign the IDs to your users. This is typically done during login. For example, when a user signs in, you could use their email address to generate a unique ID that you can reference throughout your website or application. Each user ID must be fewer than 256 characters long.

Note: You're responsible for ensuring that your use of the user ID is in accordance with the Google Analytics Terms of Service. This includes avoiding the use of impermissible personally identifiable information, and providing appropriate notice of your use of identifiers in your Privacy Policy. Your user ID must not contain information that a third party could use to determine a user's identity.
 
Additionally, for accurate reporting, ensure you enter a real user ID. Repeatedly setting a blank or dummy user ID can lead to inaccurate data (including permanent data loss) and hinder your ability to analyze user activity.

Send user IDs

For instructions on how to send a user ID, check Send user IDs.

Verify the reporting identity

Make sure your property uses a reporting identity that includes the User-ID option by doing the following:

  1. In Admin, under Data display, click Reporting Identity.
    Note: The previous link opens to the last Analytics property you accessed. You can change the property using the property selector. You must be an Editor or above at the property level to change the reporting identity that includes the User-ID option.
  2. Select either:
    • Blended: evaluates user ID, device ID, modeled data
    • Observed: evaluates user ID, device ID
  3. Click Save.

What you can do with User-ID

Compare signed in with non-signed in users

To compare the behavior of users who are signed in with the behavior of users who aren't signed in, build a comparison that uses the Signed in with user ID dimension and set the dimension value to "yes".

A comparison including the "Signed in with user ID" dimension and dimension value = yes

Report showing Users, New Users, Engagement Time, and Revenue for signed-in vs. non-signed-in users.

User exploration

The user exploration displays the users who make up an existing segment, or who make up the temporary segment that results from using other Explorations techniques. You can drill down into the list to see detailed information about individual users, including how and when that user was acquired, summary metrics for that user, and a timeline of their activities on your site or app.

Create remarketing audiences based on User-ID data

You can create remarketing audiences based on user IDs. If you've linked your Google Analytics and Ads accounts, these audiences are available in your shared library in Google Ads.

  • If you are using User-ID, then Analytics only includes the user identifier and the device identifier for the last device associated with each logged-in user.
  • If you're not using User-ID, Analytics includes all device and user identifiers in the audience information it exports to Ads.

How Analytics handles sessions with incomplete User-ID collection

Users sometimes trigger events on your site or app before signing in or after signing out. In the first instance, Analytics uses the session ID to associate that session with the user ID provided when the user signs in. In the second instance, once a user signs out, Analytics stops associating any subsequent events with that user ID.

For example, a user starts a session with no associated user ID and triggers Events 1 and 2. No user ID is associated with those events. The user then signs in and triggers Event 3. Events 1, 2, and 3 are now all associated with that user's ID. The user finally signs out and then triggers Event 4. No user ID is associated with Event 4. Events 1, 2, and 3 remain associated with that user.

Note: If you don’t set a unique user ID, then these JavaScript values will be set as the user ID:
  • undefined: No user ID will be sent on the hit as the hit will not be logged as the user_id. This will also happen if you never set a user ID at all.
  • null: An empty or unset user ID value will be sent on the hit. You will be considered as a "logged out" user who doesn’t have a stable user_id.
  • Empty string (""): This is equivalent to null.

All other values are interpreted as unique user IDs, and will be sent as such. This even includes the strings "undefined" and "null", which are different than the JavaScript values explained above.

Limits

  • The User-ID feature is built for use with Google Analytics technologies. All implementations must comply with the Analytics SDK / User-ID Feature Policy.
  • The user IDs you send to Google Analytics must be fewer than 256 characters long.
  • Any data in your Analytics account collected and recorded prior to implementation won't be reprocessed and associated with a user ID.
  • User-ID data collected in one property can't be shared or mixed with data in other properties.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
3897872599232161536
true
Search Help Center
true
true
true
true
true
69256
true
false