Custom dimensions and metrics in GA4


10 mins

Custom Dimensions and Metrics in GA4

Table of Contents

Google Analytics 4 is the next generation of Google’s industry-leading web analytics tool, and it’s set to replace Universal Analytics (UA) by July 2023.

While it’s going to be more efficient and powerful than ever, the new GA4 platform comes with some major changes.

Two of these are custom dimensions and metrics, which will fundamentally change how digital marketers collect, analyze, and extract insights from data.

In this article, we’ll help you understand how custom dimensions and metrics in GA4 work, why they matter, and how they can help you make better decisions about your marketing strategy.

What are dimensions and metrics in GA4?

Metrics and dimensions are the keys to understanding data in Google Analytics.

They’re the building blocks of a GA4 analytics report, and they allow you to slice, dice, and drill down into your data so that you can see exactly what’s happening with your website.

Metrics are quantitative data points — they’re the actual numbers behind website performance. These can be in the form of percentages, ratios, averages, and other numbers that matter for your business.

If you run an e-commerce site, for example, your sample metrics could be the following:

  • Refunds
  • Revenue per product
  • Transactions
  • Product quantity
  • Checkouts
  • Product views

In contrast, dimensions are qualitative data points — they’re descriptive pieces of information that help you understand the context behind your metrics.

Again, let’s use an e-commerce site as an example.

Under the “Transactions” metric, you saw that you had 100 sales in June. That’s great, but it doesn’t tell you much on its own.

Dimensions can help you understand the why behind your metrics. In this case, some sample dimensions could be:

  • Product categories: men’s wear, women’s wear, children’s wear, etc.
  • Product types: shirts, pants, dresses, etc.
  • Payment methods: credit card, PayPal, etc.
  • Location: United States, Canada, Europe, Asia, etc.
  • Device type: mobile, desktop, tablet

As you can see, metrics and dimensions work together to give you a holistic view of your data. They help you understand not only what’s happening on your website but also why it’s happening.

What are custom dimensions and metrics in GA4?

GA4 already has many built-in dimensions and metrics. They’re incredibly useful, but they only cover the most common elements that businesses track.

The beauty of GA4’s new platform is that it allows you to create custom dimensions and metrics in GA4, which gives you incredible flexibility when it comes to tracking your data.

Custom dimensions and metrics are exactly what they sound like — they’re tailor-made to track the specific attributes and characteristics that matter to your business.

What are custom dimensions in GA4?

Custom dimensions in Google Analytics 4 are simply data attributes that you define and which are not available in GA4’s standard reports.

For example, let’s say you own a clothing store and you want to track the following data points:

  • Cloth type (e.g., denim, cotton, wool, etc.),
  • Color (e.g., blue, black, white, etc.),
  • Style (e.g., classic, sporty, etc.), and
  • Size (e.g., small, medium, large, etc.).

Custom dimensions allow you to get really specific, so you can create a report that shows you exactly how each of these factors affects your sales.

What are custom metrics in GA4?

Like custom dimensions, custom metrics are the numbers you want to track but are not available in the built-in reports, so you add them yourself.

For instance, GA4 has an Ecommerce metric called “Refunds.” But what if you want to track how many partial refunds, failed refunds, and successful refunds you had last month?

You can do this by creating a custom metric for each type of refund and then adding them all to your report. This way, you can see at a glance how your refund policy is affecting your bottom line.

Custom metrics can be used to track just about anything — from the number of items in a shopping cart to how long someone spends on your website.


In GA4, custom dimensions and metrics limit is up to 25 user-scoped custom dimensions and up to 50 event-scoped custom dimensions per property.

How to create custom dimensions and metrics in GA4

If you’re looking to add custom dimensions in GA4, the process is simple, and once you’ve set them up, they’ll start tracking your data automatically.

To create Google Analytics custom dimensions, simply follow these steps below:

  • First, log in to your GA4 account.
  • Then, from the GA4 Admin page, go to “Configure” and select it.

Next, click on “Custom Dimensions.”

  • Name your new custom dimension. Aside from letters and numbers, you can also use spaces and underscores. However, you can’t use hyphens for dimension names.
  • After that, select a scope for your custom dimension. In GA4, there are four levels of scope: product, hit, session, and user. Choosing a scope for your dimension will determine which hits will be associated with a particular custom-dimension value.
  • Next, once you’ve selected a scope, input a short description for your dimension in the “Description” field. This is for your reference only, so feel free to get creative.
  • Then, you’ll need to select a user property or event parameter from the list. You can also enter the name of an event parameter or user property that you’ll collect in the future.

Finally, click “Save.”

And that’s it! You’ve now successfully created a custom dimension in GA4.

Repeat this process for any other custom dimensions you want to track.

Creating custom metrics in GA4 is just as easy. Most of the steps are similar to creating custom dimensions, so let’s break it down in the same way:

  • To get started, log in to your GA4 account.
  • Next, from the GA4 Admin page, go to “Configure” and select it.

Then, click on “Custom Metrics.”

  • Name your new custom metric. As with custom dimensions, you can use letters, numbers, spaces, and underscores — but no hyphens.
  • After that, select a type for your metric from the drop-down list.
  • Input a short description for your metric in the “Description” field.
  • Then, you’ll need to choose an event parameter or input the name of an event parameter you plan to collect.
  • Next, choose a unit of measurement from the drop-down list.
  • In case you want to use “Currency,” you’ll also need to identify it as a revenue or cost metric under Data type. This will allow you to restrict access to the metric when you configure user roles that restrict access to cost and/or revenue metrics.
  • Finally, click “Save.”

Note that it can take 24-48 hours for custom metrics to populate with data in GA4.

You may need to edit your custom metrics and dimensions in the future, so let’s quickly go over how to do that:

  • First, log in to your GA4 account.
  • Then, from the GA4 Admin page, click on “Configure.”
  • Next, click on “Custom Definitions.”
  • In the row for the dimension or metric, click on “More” and select “Edit.”
  • After that, proceed to make the changes you want, then click “Save.”

And there you have it! You now know how to create custom dimensions and metrics in GA4.

Advantages of custom dimensions and metrics in GA4

The advantages of custom metrics and dimensions in Google Analytics 4 go beyond expanding the type of data you can track from your properties. Here are some key benefits of using custom dimensions and metrics:

1. Custom dimensions and metrics allow you to combine GA4 data with non-GA4 data, such as CRM data

This is great for any company that wants to merge GA data with other data. Custom dimensions and metrics can be used to merge CRM data, social media data, or even third party API data.

For example, let’s say you are a web development company and want to add more information about your clients. The client might have a CRM system that has all of the information about the client’s business model, growth goals, and revenue streams. You could use Google Analytics custom dimensions and metrics to pull in this additional information into GA so that you can analyze it alongside your own domain data.

Another example would be if you wanted to see how many sales were made on Black Friday last year compared to this year by comparing two different domains. You could pull in all the sales data from one domain (the one we want to compare) into a separate custom dimension and then merge it with the other outside domain’s sales data using custom metrics.

2. You can also use custom metrics and dimensions as segments and secondary dimensions in standard reports

When you create a custom dimension, it appears on all of your reports. So if you want to see how many people from New York have visited your website, you can simply add “New York” as a custom dimension and then create a report using it as a segment.

You can do this with any of the other data that you’ve added to your website. For example, if you’re trying to determine which product categories are most popular among new visitors, you could create a custom dimension called “Product Category” and then use it as a segment in your reports.

You can also use custom dimensions as secondary dimensions in standard reports. For example, if you want to see how many people who visited your website between April and May were looking at blue products, add “Blue Product” as a secondary dimension on your report instead of creating an entirely new one just for those two months.

3. Measure anything that isn't captured in GA4's default metrics and dimensions

Custom dimensions and metrics give you the ability to track website performance at a level of detail that is not possible with GA4’s built-in metrics and dimensions.

For example, let’s say you’re running a video campaign on Facebook. You want to know how many people watched at least 10 seconds of your video, where they came from, and what percentage bounced after watching less than 10 seconds.

To figure that out with GA4 alone, you’d have to create separate campaigns for each one of those things — and then spend hours trying to add up all the results in order to come up with an accurate number. That’s a lot more work than it should be.

But with custom dimensions and metrics? Piece of cake. Just add those dimensions and metrics into your template, and then go wild with whatever reporting methods you want. And if something doesn’t work out exactly as planned? Just adjust the parameters around it until they do.

4. More control over attribution and conversion tracking

Custom dimensions and metrics give you more control over how data is attributed and tracked in Google Analytics. This means that you can fine-tune your attribution models and conversion tracking to better reflect the customer journey on your website.

For instance, let’s say you’re an Ecommerce store and want to track product views as a conversion. You could create a custom dimension for “Product Views” and then use it as a goal in GA. This would allow you to see how many people view a product before they buy it and then attribute that conversion back to the source that brought them to your site.

You can also use custom dimensions and metrics to create custom reports that show exactly what you want to see. So there’s no need to rely on pre-built reports that may not show all the data that you’re interested in.

5. Extract deeper, more meaningful insights from your GA4 data

The ability to customize the data you get from GA4 means that you can have multi-layered and more relevant insights from your analytics.

Instead of simply recording how many people viewed a product, you could track how many people from each state viewed the product, what type of device they were using, what day of the week it was, and so on.

From there, you can start to build out more sophisticated reports that show how different factors impact the number of product views. Do more people view the product on weekdays or weekends? Are there certain states that are more likely to convert?

All of this data can be used to improve your marketing and product strategy and ultimately drive more sales and conversions.

Practical examples of custom dimensions

You can use custom dimensions for just about any type of website. Here are a few examples to get you started:

Sample custom dimensions for WordPress blog sites

  • Logged in sessions: This custom dimension gives you a closer look at how logged in users interact with your site, where they spend the most time, what kind of content they enjoy, and so on.
  • User ID: This custom dimension allows you to track the preferences of individual logged in users and see which ones are most engaged with your site.
  • Post type: This custom dimension is useful for improving your content strategy. It can tell you which post types (such as recipes, guides, or forms) perform the best and get the most engagement.
  • Author: If multiple authors post content on your blog, you can create a custom dimension that tracks which ones are the most popular and, most importantly, why. This way, you can replicate the success of your top performers.
  • Category: This custom dimension enables you to track how well each blog category performs. You can then adjust your content strategy accordingly to ensure that all categories are getting the attention they deserve.

Sample custom dimensions for Ecommerce sites

  • Product Brand: Want to know which brands are the most popular with your audience? This custom dimension will give you the answer.
  • Product Sizes: To help you prioritize stocking the right sizes, this custom dimension tells you which clothing, shoe sizes, etc. are most popular among your customers.
  • Product Color: Another way to customize your product strategy, this custom dimension lets you know which colors are most popular with your customers. Make sure these colors are well-represented on your website and in your product photography.
  • Seasonal Products: The ability to track seasonal products lets you take advantage of peaks in demand and plan your inventory (and marketing) accordingly.
  • Discounts and Promotions: Make your marketing campaigns more effective by tracking which discounts and promotions convert the best.

Sample custom dimensions for a SaaS company

  • User Type: Segment your users by type (free trial, paid, enterprise, etc.) and see how they interact with your product.
  • Payment Type: Keep track of how users are paying for your service (monthly, annually, per project, etc.) and see if there are any trends.
  • Cancellation Reason: If users are cancelling your service, this custom dimension can help you understand why.
  • Upsells and Cross-sells: See which upsells and cross-sells are most effective in getting users to stick with your service.
  • Free vs. Paid Features: Use this custom dimension to see which features are most popular with users and whether they’re willing to pay for them.

There are endless possibilities for custom dimensions, and the ones you choose will depend on your business goals and the insights you want to achieve.

Wrapping it up

Custom dimensions and metrics are just one of the new and powerful analytic tools offered by Google Analytics 4. In addition, keep in mind that you only have until July 2023 to migrate your Universal Analytics properties to GA4 before UA shuts down.

Not sure how to get started? Use our GA4 migration guide to help you make the switch.

Whether you’re using UA or GA4, Reporting Ninja’s Google Analytics integration makes it easy to create beautiful, custom reports and dashboards that help you make the most of your data.

Sign up here to get your free, 14-day trial today!

Reporting Ninja
Post written by