Custom Dimensions and Metrics in GA4

Learn about custom dimensions and metrics in Google Analytics 4, how they work, and how to set up custom dimensions with Google Tag Manager (GTM).

Custom dimensions are a new feature in GA4 that allows you to collect and analyze data tailored to your company needs. In this tutorial, we will define custom dimensions and metrics in Google Analytics 4, explain how they work, and show you how to use them with Google Tag Manager (GTM). They come in handy when you're creating custom event parameters or custom user attributes.

What are Custom Dimensions in GA4?

Custom dimensions are user-defined characteristics or attributes that can be used to capture additional information about your website or app visitors. Custom dimensions enable you to build custom data points that are not included in default Google Analytics reports.

Custom Dimensions may be used to track any data point. By implementing custom dimensions through GTM and configuring them in your GA4 property, you can customize your GA4 property and reports. Custom dimensions can have event scope, user scope or item scope.

Before diving into custom dimensions, you might want to understand more about custom events in GA4. Please read the following articles to learn setting up custom events directly in GA4 and creating custom events with Tag Manager(GTM) . Please note that it is critical to register a custom event as a custom dimension after creating it in order to view it in your reports.

To use custom dimensions effectively, you need to follow a few steps. You will learn how to configure custom dimensions step by step below in detail.

  • First, create tags in Google Tag Manager (GTM). These tags serve as the mechanism to collect the information associated with the custom dimensions.
  • Then, configure the custom dimensions within your GA4 property. This configuration ensures that GA4 recognizes and properly analyzes the custom dimensions you want to track.

Custom Dimensions for eCommerce

You can use custom dimensions to track pieces of data related to eCommerce to gain insights into user behavior on your website or app.

Consider a scenario of an eCommerce website that sells clothes. Users are able to filter items by color on this website. The owner of the website wants to know which color filters are the most popular among visitors. Thus, it can be achieved by creating a custom dimension named "Color Filter" and tracking it anytime a user selects a color filter.

To track the color filter, the website owner needs to create a custom event in GA4. The event can be named "Color Filter Selected" and can be triggered whenever a user clicks on a color filter. The custom dimension "Color Filter" can be associated with this event to track the selected color.

How to Configure Custom Dimensions with GTM ?

Configuring custom dimensions with GTM is a straightforward process. Please check out our tutorial about creating custom events with GTM for more in depth explanation. Here are the step-by-step instructions:

  1. Log in to your Google Tag Manager account and go to the "Tags" section in the left side menu. Click on "New" to create a new tag.
  2. Select the tag type as "Google Analytics: GA4 Event". Enter a name for the tag and select the GA4 Configuration that you want to use.
  3. In the "Event Parameters" section, enter the details of the custom dimension that you want to track. For example, if you want to track the "Color Filter" custom dimension, enter your custom Parameter Name (fo example "color_filter_selected") and choose "{{Click URL}}" in the Value field.
  4. In the "Triggering" section, select the trigger that you want to use for this tag. For example, if you want to track the color filter when a user clicks on it, select the "Click" trigger and specify the CSS selector for the color filter element.
Custom Event Setup in GTM
Custom Event Setup in GTM

Once you have configured the custom dimension tag, you can preview and test it to make sure that it is working correctly. You can then publish the tag in GTM to start collecting data in your GA4 reports.

How to Create Custom Dimensions i n GA4?

You are able to use this custom dimension as long as it is correctly defined in Google Tag Manager as well.

Please take note! When you add a custom dimension in GA4, you should use the same "event parameter" that you place into GTM. Take care of that.

Here's a quick guide to adding custom dimensions to the GA4 interface:

Keep in mind that data from new custom dimensions might take up to 24 hours to display.

Tips for the Best Practice in GA4 Custom Dimensions

When you set up custom dimensions; define the names, scopes, and event parameters for each custom dimension you plan to use. For example, if you have a Custom Dimension for "User Segment," ensure that the relevant event parameter, such as "user_type".

Use the default dimensions and metrics first before creating custom dimensions and metrics. To keep your quota, you could remove duplicated custom dimensions and metrics that were registered across different events.

What is a Custom Metric in GA4?

Custom Metrics are quantities corresponding to events or user settings. Event count is an example of a metric that represents the total number of times an event is triggered. You can view the dimensions and metrics for a specific property using the GA4 Dimensions & Metrics Explorer . The source of data for a custom metric is an event parameter.

The following units of measurement are available when you create a custom metric:

  • Currency (You must also specify whether the custom measure is a cost or revenue metric under Data type.)
  • Time
  • Distance

How to Add Custom Metrics in GA4?

To create a new custom metric in Google Analytics 4, go to your GA4 property view and navigate to Custom Definitions.

Unique Benefits of Custom Dimensions

Here are a few reasons why custom dimensions are useful:

  • Identify data about user behavior that can give detailed insights into user preferences by tracking product categories, campaign channels, or customer segments based on demographics, interests, behaviors, or any other custom attribute you define. This information allows you to personalize your marketing strategies, tailor messaging to specific audience segments
  • Create more targeted and effective marketing campaigns with custom dimensions which allows you to attribute user activities, conversions, or revenue to specific campaigns, channels, or sources.
  • Generate enhanced and custom reports that provide more detailed and relevant insights into your website or app's performance. You can combine default and custom dimensions. You can analyze your custom dimension in exploration reports or view your data by clicking "Reports."
  • Optimize your content strategy and drive more traffic to your website by tracking content engagement, user personas and more.

Limits of Custom Dimensions

  • You cannot delete custom dimensions, but you can disable them.
  • When submitting custom dimensions with demographic data, you may encounter thresholding or incompatibility limits in reporting or via the API.
  • Registering a custom dimension for a parameter that is already a predefined dimension, such as the page and screen dimensions or transaction ID, is not recommended.
  • For standard properties, you may set up to 50 custom dimensions and 125 for Analytics 360 properties.

Check quota information to see how many custom dimensions and metrics you've generated. Here is how to see quota information in GA4:

  • You can also edit or archive any of your custom dimensions by clicking the three dots next to them.

Conclusion

Custom dimensions are a useful tool for collecting and analyzing data customized to one's business requirements. You can gain more insight into user habits and modify your campaigns accordingly by using custom dimensions. Configuring custom dimensions in GA4 with GTM is a basic and straightforward process that can be completed in a few minutes. You may begin tracking custom dimensions in your GA4 reports now by following the procedures provided in this guide.

Table Of Contents