MeasureSchool logo

Calculated Metrics in Google Analytics 4 (GA4)

The whole point of web analytics is to be able to measure the performance of your website, which comes down to KPIs and metrics.

Tools like Google Analytics 4 (GA4) cover most of the important metrics out of the box which makes it easier to measure things.

But more often than not, there are cases where you want to measure something that’s not readily available, and that’s when you go on and create your own calculated metrics.

This isn’t something new for you if you’re coming from Universal Analytics (UA), but calculated metrics in Google Analytics 4 are something we haven’t seen since its inception.

But, finally, it’s been rolled out to all the GA4 users and that’s what we are going to discuss in this blog post which includes:

Let’s jump into it.

What are Calculated Metrics?

As the name suggests, these metrics are derived from existing metrics and any custom metrics you’ve added to your GA4 account.

This is done by using any mathematical formulas/operators and a combination of the metrics, so you have something that measures what is more relevant to you.

They help understand things within the GA4 UI that you would have to otherwise calculate using other tools like Google Sheets or Looker Studio.

The good thing about calculated metrics is that they work retroactively so that you can see historical data with your desired metric(s).

These calculated metrics can be used in standard reports, explorations, and the GA Data API. Let’s say that you want to target the engagement of inactive users, so it can be calculated with a simple formula:

{Active Users} - {Total Users}

The curly brackets are how formulas are shown in the Formula field of the Create calculated metric setup interface. More on that in the next section.

How to Set Up Calculated Metrics in Google Analytics 4

So we have some idea about the calculated metrics now, so let’s look into how to set it up. 

In your GA4 account, go to AdminCustom Definitions → Click on the third Calculated metrics tab → Click on the Create calculated metric button.

Create calculated metric in GA4 custom definitions interface

On the next screen, you will see the interface to set the calculated metric, which has five fields to set.

Create a calculated metric setup interface
  1. Name is a required field. Having a clear name will make it easier for anyone who’s looking at the metric to understand it quickly.
  2. API name is populated automatically and can be used to uniquely identify the calculated metric when querying through the API. It may contain alphanumeric characters and underscore only. Special characters, symbols, and spaces are not allowed. The API name must be unique and cannot be changed later on.
  3. The Description is optional, but we’d recommend adding something that gives additional context to users when they hover it in the reports. It appears like a help tip.
  4. The Formula is where all the action happens, as you can use the arithmetic operators like (+, -, /, *) and (). However, this field cannot have another calculated metric. You can use parenthesis to override the arithmetic operators, and the order of preference to the operators is the same as is generally in mathematics. Square brackets don’t work.
  5. The Unit of measurement is how the metric value shows in the reports. There are four categories here: Standard, Currency, Distance (Feet, Miles, Meters, Kilometers), and Time (Milliseconds, Seconds, Minutes, Hours).

Now, let’s try to create an actual metric and see how that shows up in our reports. We’ll continue with the previous example of finding inactive users.

Creating a calculated metric in GA4

After you’ve created a calculated metric, it will show up in the Calculated metrics tab under the Custom Definitions.

Calculated metrics tab in GA4 admin settings

If you click on the three dots, you will have the options to Edit, Copy, and Archive the calculated metrics.

Edit, copy, and archive options in GA4

You cannot recover an archived metric, and any explorations using it won’t work properly either.

Once it’s created, it will take a few minutes until you can find it in the reports and use it:

Using calculated metrics in exploration

And that’s how you can create, edit, copy, and archive (delete) calculated metrics but it’s important to understand when to use calculated metrics, especially with a limited quota.

Examples of Calculated Metrics in Google Analytics 4

When you should use the calculated metrics? The short answer is that you should use them whenever there’s a business requirement that you cannot fulfill with the existing or custom metrics.

Let’s look at some common examples when you can use calculated metrics.

  1. Revenue in another currency – This might be important when you want to view the revenue, costs, and other such metrics in another currency like USD to GBP.  You can use a formula like {Total Revenue} * 1.21. Although the currency exchange rates fluctuate daily, this sort of conversion is just good for an idea. We will use the standard unit of measurement because currency would take the symbol of your chosen currency in the property settings.
  2. New users checkout rate – It might be interesting for a business to understand how new users behave on the website and check out, by using a formula like this {New Users}/{Checkouts}*100 using the standard unit measurement.
  3. Average order value (AOV) – One of the most commonly used metrics in the e-commerce sphere can also be used as a calculated metric by using the following formula: {Gross item revenue}/{Transactions}. This time we can use the currency as a unit measurement so we can see the currency symbol next to the order values.
  4. Item revenue after refund – It might be useful to have a quick view of the actual revenue after any refunds, which can be done with this simple formula: {Gross item revenue}-{Item refund amount}, using currency as a unit measurement.
  5. Engaged sessions per user: This kind of metric can give you an idea about user engagement along with other metrics like engaged sessions, average engagement time, etc. You can calculate this with the formula: {Engaged sessions}/{Total users} and use a standard measurement unit.

This isn’t an exhaustive list and it will vary depending on your business and its circumstances. Moreover, many metrics used to be calculated in UA, but GA4 also has a lot of them covered.

Best Practices & Limitations

Let’s have a look at some of the limitations of calculated metrics in Google Analytics 4 so we have more awareness when dealing with them.

  1. Permissions – You need to have Admin or Editor permissions to create calculated metrics.
  2. Quota – Just like UA, there is a limited quota for calculated metrics in GA4 as well, i.e., 5 metrics for standard properties and 50 for 360 properties. Five might be a small number for some businesses.
  3. Referencing calculated metrics – You cannot create calculated metrics from an existing calculated metric. Only existing metrics and custom metrics can be used.
  4. Currency unit of measurement – It’s better to use the standard unit of measurement if you want to show values of another currency because the currency unit of measurement only shows your property’s currency symbol.
  5. Changing formulas – You can change the formula at any time and they work retroactively. So, if you change your mind later on, you can always change the formula.
  6. Changing names – You can always change the names of the calculated metrics, but the API names cannot be changed once they are set. It might be a better idea to archive that one and create a new one.
  7. Formula characters – Formulas are limited to 1024 characters only, although, in most cases, you won’t be using such long formulas in the interface. For advanced analysis, you may want to manipulate the data with other tools.
  8. Data restrictions – Some metrics have data restrictions on them which will be carried forward to the calculated metric. This means some metrics won’t work well when paired with others, but you should still test them and see how they work for your formula.
Data restrictions in calculated metrics
  1. String and Boolean – You cannot use an expression in the formula for calculated metrics if the resulting values will be a string or boolean.
  2. Unavailable metrics – It would be nice to be able to use metrics like Exits in the formula field to create a calculated metric like exit rate. However, it doesn’t show up in the formula field for now. Chances are there might be others that won’t work (for now), but who knows, they might be around the corner in the next update.

Hopefully, these limitations will help you to deal with any issues that you might not know of otherwise when you’re starting with the calculated metrics in Google Analytics 4.

Summary

So, there we have it! We explored one of the newest features of GA4 in this post, where we learned what calculated metrics are and how we can set them up.

We also touched on some common examples where calculated metrics can be used. Understandably, they will vary from business to business and use cases.

Learning about best practices and limitations will help to know how we can deal with different issues that might come up, especially if you’re new to the analytics game.

Perhaps one of the most important limitations is the quota of 5 calculated metrics, that’s why it is important to use it sparingly even though GA4 covers a lot of metrics out of the box.

But if all of this is not enough for you, using other tools like Google Sheets and Looker Studio would be great tools to take things further. Pairing up with BigQuery would be even better!

Our post on Looker Studio Calculated Fields is a comprehensive guide that provides solutions to different calculated field-related problems with real-world scenarios.

Have you started using GA4’s calculated fields? If so, what are the metrics you have created? Let us know in the comments!

MeasureMasters

REOPENED!

Master Data & Analytics with MeasureMasters

Exclusive Courses & Workshops | Ongoing Troubleshooting | Support Resources, Tools & much more
JULIAN CORNER

Don't miss it!!!

50% OFF

on Google Tag Manager Essentials

+3 BONUS Courses

Don't miss it!!!

50% OFF

on Google Tag Manager Essentials

+3 BONUS Courses

Related Posts

Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Jamie
Jamie
28 days ago

Any one else not seeing the Calculated Metrics tab yet? Checking almost daily and still haven’t seen it in any of the free or 360 properties I have Admin or Editor access to. Getting frustrated.

Al
Al
26 days ago
Reply to  Jamie

I’m facing the same issue… it appears for one of more properties, but disappears for the other property… so frustrating!

Get a FREE Complete Google Analytics 4 Audit Checklist

GA4 Audit Checklist

now it's time to

Start measuring like a master

Itching to jump into the world of MeasureMasters? This is what you have to look forward to.

Ready to take your digital marketing to the next level?

Subscribe to our newsletter and stay ahead with our latest tips and strategies.