• Courses
    • Courses
    • Course bundles
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login
  • Courses
    • Courses
    • Course bundles
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login

May 5, 2025

User-Scoped Custom Dimensions in Google Analytics 4

If your aim is to get insightful data on visitors to your site, Google Analytics 4 might not offer the best “out of the box” analytics experience. You must customize your data collection to get the most out of GA4.

One way to do this is with custom dimensions, which can be event-scoped, item-scoped, and user-scoped. These will allow you to collect additional information on users and their actions that GA4 doesn’t automatically collect.

In this article, we will specifically look at user-scoped custom dimensions, what they are, and how you can configure them with Google Tag Manager and report on them in Google Analytics 4.

Subscribe and Get the Ebook - 20 GA4 mistakes

Table of Contents

Here’s what you will learn in this article

  • What are user-scoped custom dimensions?
  • Difference between user-scoped custom dimensions and user properties
  • When would you use user-scoped custom dimensions?
  • Event-scoped vs. User-scoped dimensions
  • How to set up user-scoped custom dimensions
    • Step 0: How can I get access information for user properties?
    • Step 1: Preview in GTM
    • Step 2: Create a new data layer variable
    • Step 3: Add event to event setting variable
    • Step 4: Preview and Debugview (again)
    • Step 5: Register a custom dimension in GA4
  • Where to find the data in GA4
    • User Explorer
    • Free form Exploration
  • Final Thoughts

 

Video tutorial

If you prefer video content, here’s a tutorial from my Youtube channel.

 

What are user-scoped custom dimensions?

As the name suggests, the information you collect as a user-scoped custom dimension would be any data on visitors that generally remains pretty constant – information that doesn’t shift session by session, day by day, or even week by week.

By collecting this information, you open up the opportunity to report on user-level data in GA4, including creating segments based on the value of the properties.

The perks? You may find different uses for more user-specific data depending on your business needs. Still, some benefits could be analyzing how specific user preferences (or properties) influence a visitor’s interactions with your site or creating more effective targeted campaigns.

 

What is the difference between user-scoped custom dimensions and user properties?

User property, user-scoped custom dimension, it all sounds the same, doesn’t it? Well, there is a difference between the terminology.

In Google Analytics, a user property is a predefined attribute that you can send to GA4, e.g. “user_country”, “pricing_plan”, etc..

On the other hand, user-scoped custom dimensions are when you register them in the interface of GA4. So, first you send a user property to GA4 and then you register them as custom dimensions in GA4.

Subscribe and Get the Ebook - working with reports in ga4

When would you use user-scoped custom dimensions?

Before getting into some examples, there are two essential things to keep in mind:

  • You must be mindful of maintaining low cardinality (few unique values) for user properties. This means that you should avoid using high-cardinality properties like User ID or Client ID as user properties.
  • Be careful not to include any data with personally identifiable information (PII) – this is bad from an ethical and legal standpoint. Keep in mind that sending personal info to GA4 (even accidentally) goes against the terms and services of Google Analytics. You can find more information under Section 7: Privacy of the Google Analytics Terms of Use.

Now, let’s talk about some things that you can collect (and may discover you should) as user-scoped custom dimensions. Here are several examples:

  • Pricing plan: If you have a product with a pricing tier, you could collect that tier that the visitor is in – free, paid, premium, etc.
  • User rating: If you have a survey on your site that allows visitors to rate your site, you can collect the score given. This can help identify trends in the behaviour of those providing low or high scores. There may be a specific page that visitors with low ratings visit more frequently than visitors with high ratings.
  • Visitor type or role: If you have a site where users are assigned different visitor types based on their role, how they interact with your site may differ. Segmenting users based on their type or role could help better understand how different users interact with your site.
Subscribe and Get the Ebook - Server-side tagging

Event-scoped vs. User-scoped dimensions

In short, once a user-scoped custom dimension is set, it will be automatically captured along with all future events (any new values will replace the previous value). In contrast, an event-scoped custom dimension will only be attributed to the event that it happened in and not any subsequent events.

Regardless, GA4 can be finicky, which is why we still include the user property in all events in the GTM container.

The diagram below shows the difference between collecting an event-scoped custom dimension and a user-scope custom dimension (the correct option).

When the event-scoped custom dimension page_category is set, it is only applied to one event, whereas when the user-scoped custom dimension pricing_plan is set, it applies to all future events too.

 

How can you set up user-scoped custom dimensions?

In this article, I assume that you have already set up and installed Google Analytics 4 with Google Tag Manager and have some event tracking with GA4 & GTM. Check out the attached articles if you still need to get to this stage of your GA4 journey.

When you start out with Google Analytics 4, you may not be thinking super far in advance but instead just trying to get something out the door (which is totally fair). However, to set yourself up for success, it helps to prepare for certain limitations (literally).

You will be limited to 25 user-scoped custom dimensions in standard properties and 100 in 360 properties (click Quota information on the Custom dimension page to see limits).

 

Step 0: How can I get access information for user properties?

The best way, in my opinion, would be to ask a developer to push the user data into the data layer. Ideally, you want to ask the developer to use the dataLayer.push code before the GTM container starts loading to have the custom data in the data layer as soon as possible.

An example of the code you could provide them is below.

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  'pricingPlan': "free"
});

However, that may not always be possible, which is ok! There are other options that don’t involve any coding skills (we’re analysts, after all):

  • JS variable
  • DOM element variable
  • URL variable

Whichever option you choose, the remaining steps will be the same.

Subscribe and Get the Ebook - Mastering GA4 event tracking

Step 1: Preview in GTM

In your Google Tag Manager container, click “Preview” in the top right and enter your site’s URL to launch the preview mode.

Once your site has loaded, you should see Message in the left sidebar. Click on this to confirm that the property implemented by the developer is visible.

If you don’t see user property here, ask your developer to double-check that the value is being sent through correctly. Otherwise, move on to the next step.

 

Step 2: Create a new data layer variable

Now, we need to access the value of the property that your developer has sent through. To do this, you must create a new Data Layer variable in your GTM container.

Navigate to the Variables tab in the left-hand navigation, go to the User-Defined Variables and click “New”.

Select “Data Layer Variable” as the data type and enter the variable’s name exactly as it is in the code. Click “Save”.

By the way, a quick side note: the data layer is just one of the examples where you could potentially fetch the data from. Other examples include:

  • First-Party Cookies: If your website stores non-sensitive user attributes in first-party cookies (e.g., user_preference = ‘dark_mode’), you can create 1st Party Cookie Variables in GTM to read these values.
  • JavaScript Variables: If user attributes are available as global JavaScript variables on your page, you can use JavaScript Variables in GTM.
  • URL Parameters or DOM Elements (less common for user properties): While possible, these are less common for persistent user attributes but might be used in specific scenarios.

 

Step 3: Add event to event setting variable

Instead of adding the pricingPlan parameter to each event in your container, you can send the user property from the GA4 tracking code to the GA4 servers through the Event Settings variable (which, in my opinion, is the most convenient way).

If you’re unfamiliar with the Event Settings variable, it is a GTM variable allowing you to reuse event settings across Google tags and GA4 Event tags. To create one, you will create another new variable under the User-Defined Variables.

Again, go to Variables > User-Defined Variables and click “New”.

Select “Google Tag: Event Settings”.

For each user property you need to be collected across all Google tags and GA4 Event tags, add:

  • Property Name – the name you will reference in GA4 – and
  • Value – the variable you created in the previous step.

Ensure you add them under the Google Analytics User Properties section.

If you have not already, add the Google Event Settings variable to the Shared event settings in the Google Tag.

And all GA4 Event tags in the container.

 

Step 4: Preview and Debugview (again)

To ensure that you set everything up correctly in the GTM container, repeat Step 1 and preview the GTM container. You will need to check the Iniatlization and an event to check that both capture the parameters in the Event Settings variable.

When your site loads, click “Initalization” in the left sidebar. You will see the parameters as the Value for the Event Setting Variable property. Notice how it starts with “user_properties”.

Now, you can test out any events you have by performing an action to trigger them. When you click on one of the “Tags Fired”, you will see the Event Setting Variable property.

In your Google Analytics 4 property, go to Admin > Data Display > Debugview. Click on any event that has come through and confirm that you can see the parameter under the User properties tab on the right.

 

Step 5: Add the property as a custom dimension in GA4

Assuming you want to see and use your new user-scoped custom dimension in reports and Explores, you must register the property as a custom dimension.

If you only use Google Analytics 4 to stream data to BigQuery for analysis, then there is no need to register the dimension. Even unregistered parameters will be available in BigQuery.

Go to Admin > Data Display > Custom Dimensions. Click “Create Custom Dimension”. There are three elements that you need to consider:

  • The Dimension name is the name that will be displayed in GA4 reports
  • The User property needs to be the same name as in Google Tag Manager
  • Set the scope to “User”

Once you have filled in these three sections, click “Save”.

Data will appear in GA4 at least 24 hours after adding the property as a custom dimension.

 

Where to find user-scoped custom dimension data in GA4

There is no use in setting up your new user-scoped custom dimensions if you can’t report on them, so let’s look at how you can view the new data you are collecting. For both methods shown below, you will need to go to the Explore section of GA4.

 

User Explorer

The User Explorer is an exploration template that allows you to choose distinct user groups and dive deeper into the detailed activities of each individual user.

For example, if you click on the user with the highest event count, you can drill down more into their actions to see their user properties. Perhaps there is a pattern that is waiting to be uncovered!

To get the report, click the “User explorer” template in the Explore section.

When the report loads, click on the “Effective user ID” of the user with the highest event count (click on the “Event count” column header to sort in descending order, if it’s not already).

A new tab will open where you can click on a listed event to see the User Properties for that user.

 

Free form Exploration

If you want a report on user properties that looks at many users simultaneously (that you can continuously reference), you can build a free form exploration. Start by creating a new blank report in the Explore section of GA4.

In the report, click “Dimension”, and here you can either search for the specific user property you are interested in or click “Custom” to see all the custom dimensions. Select the custom dimensions you want to report on and click “Import”.

Here, you can also build funnels or segments to explore your data further. You never know what you’ll find until you try!

 

User-Scoped Custom Dimensions in GA4: Final Thoughts

In conclusion, user-scoped custom dimensions help us unlock insights on visitor behavior that cannot be achieved with the standard Google Analytics 4 setup, which is necessary for any GA4 user.

Ensure that no PII is being collected with your custom dimensions and that you choose properties with lower cardinality not to impact reporting.

The process is simple: send custom data to GA4 using the Event Settings variable in GTM and register the parameter as a custom dimension. Then, use the Explore tool to analyze your new data (24 hours after registration, of course).

If you want to make informed decisions for your business, you need to customize your data collection in Google Analytics 4.

Subscribe and Get the Ebook - conversion tracking handbook
Julius Fedorovicius
In Google Analytics Tips
3 COMMENTS
Ajith
  • Mar 6 2024
  • Reply

Hi,

Lets say for a travel website, a logged in user can choose the preferred destination, so this should be captured as event scope or user scoped custom dimension in GA4?

    Julius Fedorovicius
    • Mar 6 2024
    • Reply

    Normally, Event scoped

Barbara
  • Mar 12 2024
  • Reply

Hi Julius,

Is the implementation of the dataLayer.push similar to User ID? Should it be pushed every time a new page loads, and can it be pushed together with an event such as login?

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *


 

Hi, I'm Julius Fedorovicius and I'm here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey. Read more
Analytics Mania
  • Google Tag Manager Courses
  • Google Tag Manager Recipes
  • Google Tag Manager Resources
  • Google Tag Manager Community
  • Login to courses
Follow Analytics Mania
  • Subscribe to newsletter
Recent Posts
  • Setting up cookie consent for Microsoft Clarity (V2)
  • Conversion rate in Google Analytics 4
  • Google Tag Manager Data Layer Explained
Analytics Mania - Google Tag Manager and Google Analytics Blog | Privacy Policy
Manage Cookie Settings