Features
Jun 2, 2023

Custom Metrics in Google Analytics 4 (GA4)

Learn more about Custom Metrics in Google Analytics 4 (GA4) and how to use them

Custom Metrics in Google Analytics 4 (GA4)

Custom metrics are a powerful feature in Google Analytics 4 (GA4) that allow users to measure and analyze data that is not captured by default metrics. They are user-defined metrics that can be tailored to measure unique characteristics of an event that are specific to your business needs. For instance, you might create a custom metric to track the total time spent on a specific task.

What are Custom Metrics in GA4?

In the context of GA4, a custom metric is an event parameter. This parameter can be an automatically collected parameter or a custom parameter. However, it's important to note that sending personally identifiable information (like name, email address, house address, phone number, social security number, etc.) to your GA4 reporting view as a value of the custom metric is against the Google Analytics terms of service.

Advantages of Using Custom Metrics in GA4

The use of custom metrics in GA4 offers several advantages:

  1. Customized Data Analysis: Custom metrics allow you to analyze data that is specific to your business needs, providing a deeper understanding of your audience's engagement levels.
  2. Enhanced Reporting Capabilities: Custom metrics can significantly enhance your reporting capabilities, transforming a default metric from a mere number into a new, custom metric in the form of a rate or percentage.
  3. User Behavior Analysis: They allow you to analyze user behavior across multiple events, combining multiple pages, dimensions, or metrics together within the same table of a report.

Creating Custom Metrics in GA4

Creating custom metrics in GA4 is a straightforward process. Here's a step-by-step guide on how to do it:

Step 1: Start by logging into your Google Analytics account. Click on 'Admin' at the bottom left corner of the page.

admin panel google analytics 4

Step 2: Ensure you are in the correct account and property. In the 'Property' column, click on 'Custom definitions'.

custom definitions google analytics 4

Step 3: In the 'Custom metrics' tab, click on 'Create custom metrics'.

custom metrics ga4
  1. Fill in the Details: You will be prompted to complete the following information:
  2. Metric Name: Enter a unique name for the metric. Note that you can't use hyphens in the name, but you can use underscores and spaces instead.
  3. Scope: You must create an event-scoped metric.
  4. Description: Enter a memorable description for the custom metric.
  5. Event Parameter: Choose the source of data.
  6. Unit of Measurement: Choose the unit of measurement. This could be currency, distance (feet, miles, meters, kilometers), or time (milliseconds, seconds, minutes, hours).
  7. Save the Custom Metric: Click 'Save' to create the custom metric. You will see a value of '(not set)' for a custom metric in the first 48 hours.

Remember, you must have the Editor or Administrator role to create custom metrics. Also, be mindful of the quotas for custom metrics. For standard GA4 properties, you can create up to 50 custom metrics.

Best Practices for Creating Custom Metrics

When creating custom metrics, it's important to follow best practices to ensure you're getting the most out of your data analysis. Here are some key points to consider:

  1. Use Default Metrics First: Before creating custom metrics, make use of the default metrics provided by GA4. These default metrics are designed to cover a wide range of common data analysis needs and can often provide the insights you're looking for without the need for customization.
  2. Avoid Unnecessary High-Cardinality Custom Dimensions: If you have a standard GA4 property, avoid creating unnecessary high-cardinality custom dimensions. High-cardinality dimensions have a large number of unique values and can negatively impact your reports, causing data to aggregate under the '(other)' row.
  3. Don't Duplicate Predefined Dimensions: 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 a best practice. It will not affect cardinality, but it will use one of your custom dimension quota.

Managing Custom Metrics in GA4

In GA4, you can edit and delete custom metrics. To edit or delete a custom metric, navigate to your GA4 property view, click on the 'Configure' link, then 'Custom Definitions', and select the relevant options for the custom metric you want to manage. Note that deleting (archiving) a custom metric is permanent and cannot be undone.

In conclusion, custom metrics in GA4 are a versatile tool that can greatly enhance your data analysis capabilities. By understanding and effectively using custom metrics, you can gain deeper insights into your users' behavior and optimize your marketing strategies accordingly. By following the best practices, you can ensure that your use of custom metrics in GA4 is efficient, effective, and aligned with your data analysis needs.

Finally, if you'd like to know more about custom dimensions, please check this full guide: Custom Dimensions in GA4