MarTech

Google Analytics 4 user properties

Google Analytics 4 realtime overview showing users

Time needed: 3 minutes

Google Analytics 4 user properties are customizable attributes that describe groups of your users.

  1. Ensure presence of Google Tag

    Make sure that the Google Tag (gtag.js) is present on the page.

  2. Edit GA4 event

    Create a new event or open an existing one.

  3. Add Row

    Click the Add Row button in the User Properties tab of the GA4 event.

  4. Add the user property

    Add the name of the user property and its value.

  5. Save

    Save the event and any related variables and triggers.

  6. Create a GA4 custom dimension

    Create the corresponding user-scoped custom dimension in Google Analytics 4.

  7. Publish

    Publish the GTM changes.

If you’ve worked with Google Analytics 4 (GA4) for any amount of time, you’re probably familiar with event properties. When you send an event, you can attach parameters that provide more context for that event. But there’s a powerful feature that you may not be using called user properties.

Google Analytics 4 user properties are customizable attributes that describe groups of your users, such as their language preferences, geographic locations, or subscription status. You can use user properties to segment your audience and create more granular reports, helping you to better understand your users and improve their experience.

A user property will remain attached to a user profile in GA4 until it’s overwritten, making it very useful when segmenting users, even when a user is not currently involved in a segmentation activity. For example, you could send a user property to GA4 that defines a user as an email subscriber, allowing you to report on website activity for email subscribers, even if they haven’t clicked an email in a while.

You can create up to 25 user properties per Google Analytics 4 property. Here are a few ideas to get you started:

It’s important to remember that custom dimensions should not receive too many unique values. Create user properties with boolean values (true/false) or ones with only a few possible options. Some marketing companies, for example, ask for a user’s organizational role while registering a new account. Rather than asking for a specific title, it’s typically a dropdown menu with a handful of marketing roles that are significant to the collecting organization (e.g. Executive, Developer, Analyst).

Adding user properties to GA4

It’s very simple to add new user properties to GA4, and it can be done either with Google Tag Manager (GTM) or in the code of the site using the Google Tag (gtag).

Google Tag Manager

To set a user property with Google Tag Manager, simply click the Add Row button in the User Properties tab of a GA4 event. Add the name of the user property and its value. You can define a GTM variable to hold the user property value. For a user property called email_subscriber, you would probably use JavaScript to determine when a pageview event comes from an email click (based on UTM parameter values) and set the value of the variable to either true or false.

Google Analytics 4 user property setup in Google Tag Manager

Google Tag

To set a user property in the website code, first make sure that the Google Tag (gtag.js) is present on the page. If it’s not, you can choose to install the Google Tag or use GTM.

This is the format for setting a user property using the Google Tag:

gtag('set', 'user_properties', {
  email_subscriber: true,
  app_user: false,
  occupation: 'physician'
});

To set a user property for only one data stream, use a config command instead:

gtag('config', 'STREAM_ID', {
  'user_properties': {
    email_subscriber: true,
    app_user: true,
    occupation: 'web developer'
  }
});

Simply replace STREAM_ID with your own data stream ID. You can find your data stream ID by going to Admin, selecting the appropriate property, and choosing Data Streams from the list.

Google Analytics 4 data stream ID and measurement ID

Make sure that you create a user-scoped custom dimension in GA4 for each user property you want to use. Otherwise, GA4 won’t collect the data. It’s also important that Scope is set to “User” in order to attribute the property to the user instead of to the event. You can do this by selecting Custom definitions from the property column in the Admin settings.

Google Analytics 4 user-scoped custom dimension

Google Analytics 4 collects some user properties by default, which you’re probably already using in your reports. Your custom user properties can be used in the same way by adding them to reports and explorations and viewing them in the realtime report.

If you’re not already employing user properties in your reports and dashboards, this one feature could be a game changer for your business analytics.