Dimensions and metrics

[GA4] Collect data about your users

Understand groups of your user base through user-scoped dimensions

User-scoped dimensions are dimensions that describe segments of your user base, such as their language preferences or geographic locations. For example, you can define a Music preference user-scoped dimension that describes each user's music preferences.

Google Analytics collects some user-scoped dimensions by default. In addition to the predefined user dimensions, you can configure your own user-scoped dimensions by defining up to 25 user properties per Google Analytics 4 property.

User Properties in Google Analytics

For subtitles in your language, turn on YouTube captions. Select the settings icon Image of YouTube settings icon at the bottom of the video player, then select "Subtitles/CC" and choose your language.


Set user properties

Before you set user properties, create a user-scoped custom dimension in Google Analytics so you can report on the user property once Analytics collects the user property. Learn more

Note that user property names are case-sensitive and that setting two user properties whose names differ only in case results in two distinct user properties being logged. Once the user property is set, it will be applied to all future events for that user (including in future sessions). The user property will not apply to events that happened before the user property was set.

Use the following drop-downs to see information about how to set user properties:

Google tag (Websites)

When you use the Google tag, you can use the set command to set user properties for every event on a page. For example, the following sets the user property favorite_composer to "Mahler" for every event on the page:

gtag('set', 'user_properties', {
  favorite_composer: 'Mahler',
  favorite_instrument: 'double bass',
  season_ticketholder: 'true'
});

To set user properties for one data stream, use a config command instead, as in the following:

gtag('config', 'STREAM_ID', {
  'user_properties': {
    favorite_composer: 'Mahler',
    favorite_instrument: 'double bass',
    season_ticketholder: 'true'
  }
})

Google Tag Manager (Websites)

When you set up an event in Tag Manager using a Google Analytics 4 Event tag, add a row in the User Properties section for each parameter you want to include.

Google Analytics for Firebase (Mobile apps)

Once you install the Google Analytics for Firebase SDK, see Set user properties in the Firebase documentation for details on how to set up properties. You can also add Tag Manager to your app once the SDK is installed so you can remotely configure user properties within Tag Manager.

See your user properties

You can see your user properties as they are collected in the Users by User property card of the Realtime report. The card shows the number of people who are grouped into each user property.

Once you create a user-scoped custom dimension for a user property, you can apply the user-scoped custom dimension as comparisons and filters in your reports or as audience evaluation criteria.

User property deduplication

Google Analytics collects a user property from your website when the user property is set for the first time on a page (usually through the first events on a page) or when the value assigned to a user property changes.

When a user performs an action that changes the value of a user property, Analytics will collect only the value that changed. For example, your entire checkout flow is on one page. Someone makes a large purchase on your site so the value assigned to your purchaser_size user property changes at the end of the checkout flow; however, their age and location haven't changed. Analytics will only collect the purchaser_size user property when the value changes.

Analytics doesn't deduplicate identical user IDs. You must set the same user ID on each page so Analytics can correctly place the events in the correct identity space.

Was this helpful?

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