
May 4, 2025
Custom metrics in Google Analytics 4
Updated: May 4th, 2025
If you have tried configuring Google Analytics 4, you should already be familiar with custom dimensions. Any custom text parameter that you send to GA4 (and that you want to use in the reports) should be registered as a custom dimension.
However, you can also customize your setup by sending custom metrics. What are they, and how can you configure them?
In this blog post, I’ll share the steps to configure custom metrics in Google Analytics 4.
First, let’s start with some theory, then dive into the practical stuff.
Table of contents
+ Hide table of contents +
- What are dimensions in Google Analytics?
- What are metrics in Google Analytics?
- A number can also be a dimension
- Examples of Custom Metrics
- How to configure custom metrics in GA4?
- Using Custom Metrics in GA4
- Final words
What are dimensions in Google Analytics?
To quickly understand the concept of metrics, first, let’s take a quick look at dimensions.
Dimensions are attributes. They describe something, e.g., a user, a page, a purchase, some other events, etc. To give you a clearer picture, here are some examples:
- Page URL: https://www.example.com
- Traffic source: google.com, analyticsmania.com
- Coupon code: SUMMER20, BFCM21
- Item category: apparel, shoes
- User country: United States, Lithuania
But what if you want to count something? For example, how many pageviews did we get last month? How much money did we earn last week? That’s where the metrics come in.
What are metrics in Google Analytics?
Metrics are quantitative measures. They allow you to count and measure things (this sounds so vague, but please, bear with me). With metrics, you can know how often the X happened, how much you got of Y, etc.
Here are some examples:
- Order total: 99.99
- Event count: 247
- Number of logins: 32
- Number of purchases: 4
- Product price: 19.99
Dimension lets you know WHAT kind of product was purchased, but thanks to metrics, you can know HOW MANY times the product was purchased, what is the product’s revenue, etc.
If we take a look at the report in Google Analytics, here’s the relationship between metrics and dimensions.
A number can also be a dimension
If you think that a number is always a metric, that isn’t always true. Sometimes, a number can be a dimension too. Here’s an example. You have implemented scroll tracking that measures how often your visitors scroll past certain page height thresholds.
Those thresholds are 25%, 50%, 75%, and 90%. Let’s take a look at the report done with the Exploration report.
On the left side, we have a dimension called Percent Scrolled. On the right, we have the Event Count metric.
Even though the values on the left look like numbers, they are actually dimensions. They describe scroll thresholds that we track. There are four possible values in total.
And on the right side, we see how many times each threshold was reached.

Examples of Custom Metrics
Even though Google Analytics 4 has a bunch of built-in metrics, they do not cover all possible scenarios. Analytics tools are built to cover many general use cases, but they will never adapt to your business’s uniqueness out of the box.
You have to customize.
You can send custom dimensions, and you can also implement custom metrics. Here are some examples of custom metrics in Google Analytics 4 that you can implement:
- Number of video views
- Number of form submissions
- Total discounted amount of purchases
Sure, you could know the number of video views by counting how many times the video_start event occurred and have a report like this:
In the screenshot above, the dimension is Event Name, and the metric is Event count.
But what if you wanted to see a report where you can have the number of form submissions and video views per page? Like this:
It would be much easier to create this report with custom metrics Video Views, and Form Submissions. But Google Analytics 4 does not offer these metrics by default!
That’s where we could utilize custom metrics.
How to configure custom metrics in Google Analytics 4?
In this example, I will show how to get the Video Views metric in Google Analytics 4. First of all, answer this: what is a Video View?
Some might say that it is the number of times when visitors start to watch a video. Others might be more selective and say that we should track a video view only if a visitor watches at least 10 seconds of the video.
There is no correct answer here. It depends on the business goals and who collects/analyzes this data.
For the sake of simplicity, let’s say that every time a “video_start” event is sent to GA4, we want to count this as a Video View and increment that metric by 1.
And that’s exactly what we should do. We should create a GA4 event tag that sends the video_start event together with a Video View metric (of which value is 1). Then GA4 will take that “1” and use it in the reports.
#1. Update the GA4 event tag
Let’s say that I already have created a YouTube trigger with the following conditions (this is just for the Start event):
Then I will use that trigger to fire a tag with the following settings (note: all those GTM variables are built-in, so make that you enable them in Variables > Configure):
This tag fires on the aforementioned YouTube video trigger.
It’s very important: this tag fires ONLY when the video_start event is sent. If you also want to track other interactions (like video_progress or video_complete), use a separate tag + trigger (but without the metric).
To include the custom metric in the tag, we have to add one more parameter to the tag. You can name it whatever you want, I’ll call it video_view and set its value to 1. This means that every time we fire this tag, that metric in GA4 will be increased by 1.
Save the tag.
#2. Test the tag
Enable/refresh the GTM Preview mode and go to your website, where the embedded Youtube video player is located. Start playing the video.
In the Preview mode, an event called a Youtube video should appear. Click it, and you should see the GA4 event tag fired.
Now, go to Google Analytics 4 Debug View. You will find it at the bottom left corner of the GA4 interface. Find your device, and there you should see the video_start event. Click it and then expand the video_view parameter. Its value should be 1.
#3. Register custom metrics in Google Analytics 4
Go to Google Analytics 4 > Admin > Custom Definitions > Custom Metrics > Create Custom Metric.
Then, enter the following conditions:
- Metric name: Video views (can be named whatever you want)
- Scope: Event
- Description: This is optional. You can leave it empty.
- Event parameter: video_view (enter it exactly as you configured it in the GA4 event tag in GTM)
- Unit of Measurement: Standard
Save the metric.
A standard unit of measurement means a regular integer.
In some cases, it might make sense to have the Currency as the unit of measurement. For example, you send the purchase event every time someone purchases on your website. Together with that event, you also send parameters like value (e.g., 99.99) and coupon (e.g., SUMMER20). But together with that event, you could also send the size of the discount (e.g., 20.00). To do that, you could send a custom parameter discount_value and then register it as a currency custom dimension.
There are also other units of measurement like feet, miles, seconds, etc.
#4. Publish changes in your Google Tag Manager container
Don’t forget to publish your changes so that this change will go live to all of your visitors/users. Click the Publish button at the top-right corner and follow all the steps.
After you do it, wait until the next day, and the metric will be ready. In total, it might take up to 24-48 hours. So don’t start worrying too soon.
Using Custom Metrics in Google Analytics 4
Here is an example of where you can see/use that Video Views custom metric in Google Analytics 4.
Go to Explore > Free Form Exploration (or Blank).
Then, enter the following configuration.
Variables tab:
- Add Page path as a dimension
- Add Video Views as a metric
Tab Settings tab:
- Add the Page path in the Rows section. Remove any dimension that was prefilled there.
- Add Video Views in the Values section. Remove any other metrics that are there.
And then, you will see a report that looks like this. On these pages, there is a YouTube video player embedded, and I can see how often those videos are played.
If you want to learn more about how to use the Exploration report, read/watch this.
Limits of custom metrics
Be mindful of GA4’s limits. Currently, you can register up to 50 event-scoped custom metrics (and 50 event-scoped custom dimensions) per property. Plan strategically to track the metrics that provide the most value for your analysis needs.
If at some point, you reach that limit and some of the metrics are no longer relevant, you can archive them. This means that the archived metric will no longer be available in the interface, and that slot will become open again.
Custom Metrics in Google Analytics 4: Final words
And here, we have reached the end of this fairly basic overview of custom metrics in Google Analytics 4. We have learned that:
- Metrics are quantitative measurements that let us count/measure (while dimensions describe items, users, products, pages, etc.)
- You can send custom metrics to Google Analytics 4 by including them in GA4 tags (within GTM).
- You have to register custom metrics in Google Analytics 4 if you want to use them in reports.
15 COMMENTS
Hi Julius,
Thanks a lot for this insightful article.
Here I am having a doubt in Custom Definitions ---> Custom Metrics ---> New Custom Metrics ---> Event Parameter called "page"
Screenshot for your reference --> https://imgur.com/a/WNWhiy8
What is the usage of "page"
Can I use this to create a custom "page_view" metric and track this in the Analytics hub?
Thanks a lot in advance!
Hi Julius,
In this case, you can create this metric from the GA4 «Video engagement» Enhanced Measurement event.
It would simply be enough to modify the video_start event by adding the video_view metric and the value 1 in Configuration > Events> Modify Events.
Gives the same result
Happy Tuesday.
Good point. Never tried it but this makes sense.
Not all video views result in the video_start, so it's a good idea to track a separate event when the video becomes visible on the page using element visibility
Thoughts on how to use custom metrics to count only once per session/user? If these pivot off of an event firing, refreshing the page and the like could over-inflate values for things that really should count just once per session (like a quote, form submission, etc). Can't see any clean way of doing this. Thanks!
Hello Julius, could you please answer the below questions?
Can I use the event parameter from my purchase tag as a custom metric? If yes, then why the custom metric is not showing any value as it's been more than 24 hours since I created it? Do I need to change the unit of measurement to standard?
Screenshot: https://imgur.com/a/83pikgb
Thank you.
Hi Julius,
I bought your premium training and it's amazing.
I have a question related to custom metrics.
If I create 3 events in GTM to track this in GA4:
- specific mail clicks
- external websites link clicks
- specific ads clicks
Could I just create 1 custom metric called for example "total_click" and push it as a parameter on these 3 events ?
The idea is then to create one custom reports with total clicks event by event (for these 3 events) and the grand total on the side.
Thanks a lot for your help.
If you want to combine those clicks to into a single number, then yes. Your approach is correct.
Hey Julius,
Do we know of any way to create custom calculated metrics in GA4 or is this only a GDS feature?
You cannot create calculated metrics in GA4. I don't know if that feature will be added in the future.
Dear Julius,
I am currently doing an implementation of an eCommerce with GA4. Is there a way to add custom metrics at item or cart level with a standard data layer "send eCommerce hits" implementation?
I need more than the default metric for discount at item level; I need three of them, because we need to track the amount of discount from three different discount natures (coupon, commercial, and promotions).
How can I add additional metrics (or dimensions, if needed) to the standard data layer eCommerce tracking in GA4 (and have them functionally working among the other default eCommerce metrics and dimensions)?
Your help would be greatly appreciated.
Hey Julius, this is the typical customer journey: visitor requests a quote and then after some time, some of these visitors end up purchasing.
In reporting, I would like to see the quote value along with the purchase event. This process of requesting a quote and making the purchase may take from a couple of days to a couple of weeks. What's the best way to implement this? I am thinking this:
1) Send the custom parameter "quote_value" along with the "request_quote" event and register quote_value as a custom metric. Save the quote value into local storage/cookie. When the purchase is made later, load the quote value from the local storage/cookie (if present) and send it along with the purchase event.
2) Send "quote_value" as a user property along with the "request_quote" event. This should tie the quote value to the purchase for the same user. However, there's no way of registering a custom user-scoped metric so this would need to be registered as a user-scoped dimension instead. But it's a metric, so not really sure about this one.
Can you please help me?
Hey, Julius.
Regarding your comment:
"In fact, I could go even further and create another metric for page views and have it in the same report."
Did the predefined "Views" metric not exist in GA4 at the time you created this blog post?
Huh, good point. I overlooked this sentence. Yes, at the time of initially writing this article, "Views" metric did not exist in GA4. I will fix this now. thanks
Hey, Julius.
I've been experimenting with custom metrics and just found a significant issue: the "session_start" event causes double-counting.
Here's an example.
- I have a "menu_link_click" event with a "menu_link_clicks" event parameter value of "1".
- I have a "Menu link clicks" custom metric that's supposed to increase by 1 every time the "menu_link_click" event triggers.
- If a session starts with a "menu_link_click" event, the "session_start" event inherits the "menu_link_click" event's parameters, causing double-counting.
Have you experienced this as well?