How to Set Up Custom Metrics in GA4

Google Analytics 4 (GA4) provides a robust set of built-in metrics to help you track website performance, user behaviour, and conversions. But what if the default metrics don’t quite fit your needs? That’s where custom metrics come in. Custom metrics allow you to define and track specific interactions that matter most to your business—whether it’s counting form submissions, tracking unique interactions, or measuring engagement beyond standard GA4 capabilities. By setting up custom metrics, you can streamline your analysis, compare key data points more easily, and gain deeper insights into user behaviour.

In this guide, I’ll walk you through:

  • What custom metrics are
  • Why you should create custom metrics
  • How to create custom metrics in GA4 

What Are Custom Metrics?

A metric is a measure of quantity. For example, it could be the number of times an event occurred, the number of users who visited your site, or the amount of revenue you generated in a quarter.

Those examples are all metrics built into GA4, but you can now create your own custom metrics. A custom metric allows you to count an event as a metric.

"GA4 provides a wealth of built-in metrics, but sometimes, standard tracking doesn't quite fit the unique needs of your business. I love using custom metrics—they allow you to define and measure what truly matters. In this guide, I explain how to set up and use custom metrics to make your reporting clearer, more insightful, and tailored to your goals."

Lola Watkins, Web Analyst

Lola Watkins, Web Analyst

Why You Should Create Custom Metrics in GA4

Custom metrics make viewing and analysing your data more straightforward, allowing you to compare different metrics more easily.

For example, if you wanted to look at the number of form submissions you get on a page, you would look at the event count by page path and then filter for the event 'form_submit'.

However, if you want to compare this number with the total page views you get to those pages, that filter for 'form_submit' will show you 0 page views as they come from the 'page_view' event. You need to use separate tabs to get the numbers you want to compare, making any analysis tricky.

Custom metrics - Page path and screen class

However, if you have a custom metric for form submissions, you would face no such issue; you would add the two metrics you want to look at and compare.

Create custom metrics - Page path and screen class

How to Create Custom Metrics in GA4

To get a custom metric in GA4, you must first set it up in GTM.  

Then, you need a custom parameter to pull the metric into GA4.   

In GTM, go to the tag that fires the event you want to count and add a new parameter under ' event parameters'. 

In this instance, we are just looking to count this event, so we give it a value of one (1). You can also put a dataLayer variable to count something else or a lookup table variable to only count when meeting specific criteria. 

Creating custom metrics - GA4 form submit

Here, you can see I created a variable with a value of one (1) when the form name is 'Newsletter Signup' and zero (0) otherwise. Then, I added a custom parameter for that. This process allows us to create a metric for the number of newsletter form submissions. 

Create custom metrics - newsletter count

Custom metrics - form submit

Then go to GA4 and 'Admin'> 'Data display'> 'Custom definitions', click the 'Custom metrics' tab and then the 'Create custom metric' button. 

GA4 custom metrics - custom definitions

This action opens a panel where you need to add the name of your custom parameter to the 'Metric name' and 'Event parameter' boxes. You will also need to select a unit of measurement. If you are counting something, the unit will be 'Standard'. Then, you need to click 'Save,' and you have set up a custom metric! 

GA4 custom metrics - new custom metric

You can then add custom metrics to Explore reports like any other metric. Custom metrics can also be added to any of the standard reports in the 'Reports' section by clicking the pencil icon in the top right corner of the report.

You can learn more about how to customise your reports here.

GA4 - customising metrics

You can even use your custom metrics to create 'calculated metrics', which you can find in the tab next to the 'Custom metrics' tab. This feature allows you to take the metrics you already have and create new ones by performing calculations on them. For example, you can calculate the difference between two of your metrics or find the percentage of one out of the other.

By utilising the custom and calculated metrics, you can investigate your data in greater detail (and with less effort), taking your reporting in GA4 to the next level.

Need help with GA4? We can help you optimise your analytics set-up – contact us for support.