Understanding Cardinality and Custom Dimensions in Google Analytics 4

| | 3 min read
New Custom Dimension - GA4

When you create custom dimensions, you see a warning about the problem of cardinality or unique values in custom dimensions.

Creating a custom dimension with a high number of unique values may negatively impact your reports. Be sure to follow best practices when creating custom dimensions. 

We have implemented GA4 and set up custom dimensions for many customers. This article attempts to demystify the warning about cardinality/high number of unique values1 in a custom dimension.

What is Cardinality in GA4?

Cardinality refers to the number of distinct values that a dimension can have. In GA4, it's essential to understand cardinality when creating custom dimensions because it can impact reporting.



High Cardinality Dimension

A dimension with high cardinality has a large number of distinct values. An example of a high cardinality dimension is the product ID. If you have a website that publishes hundreds or thousands of products, each product would have a unique ID. If you set up product ID as a custom dimension, it would have thousands of distinct values. Other high cardinality dimensions include page path, time of day, and publication timestamp. Google considers dimensions with more than 500 unique values as a high cardinality dimension.

Why Cardinality Matters for Custom Dimensions in GA4

When you create a custom dimension in GA4, it's essential to consider the dimension's cardinality. If you set up a high cardinality dimension, the chance that you will end up with row limits in reports and start seeing the (other) row where google analytics automatically groups the additional rows into one row and show the aggregated result. This will also affect exploration reports, where you will see a representative sample of your data instead of full data. 

Best Practices for Cardinality and Custom Dimensions in GA4

When creating custom dimensions in GA4, following best practices to ensure accurate reporting and optimal platform performance is important. Here are some tips for working with cardinality and custom dimensions:

  1. Use low cardinality dimensions whenever possible. Low cardinality dimensions have few distinct values. Using these dimensions can help you avoid issues with reporting. Examples of low cardinality events include content category, user membership status, and author.
  2. Consider analyzing the data in BigQuery instead of the GA4 platform if using a high cardinality dimension. This approach can help you avoid issues with platform performance.
  3. Be selective when choosing custom dimensions. Before creating a custom dimension, consider whether it's essential for your reporting needs. If it's not necessary, don't create it.
  4. Think about how you'll use the dimension in reporting. When creating a custom dimension, consider how you'll use it in reporting. If unsure, consult an analytics expert or conduct a test to ensure the dimension is useful.

High Cardinal Parameters in BigQuery

If you still want to track items with high cardinality and create reports based on that, you can link your GA4 account with BigQuery and pass the high cardinal items as event parameters (without creating a custom dimension) to BigQuery. You can then use BigQuery to generate the report you need. 


From the UA audits we have conducted recently to migrate them to GA4, we observed that many organizations use high cardinal properties as custom dimensions hit the issue with the other row issue. The other row issue will not pop up immediately when you set up the dimension; you will start seeing it when more data comes in and hits the limit. Make sure that you review the GA4 custom dimensions you have set up already and verify whether you use any high cardinal items to avoid future issues. You can contact us if you need an expert opinion on google analytics setup and configuration or migrating from UA to GA4.