Category

Analytics

Date posted

30 Nov 2023

Read Time

Related Articles

Analytics

Unlock the potential of Google Analytics using BigQuery

Analytics

RocketMill is a Google Analytics Certified Partner

Analytics

Creating calculated metrics in Google Analytics 4

What are calculated metrics?

Calculated metrics have recently been added into Google Analytics 4 via a phased rollout by Google. This is now expected to have been added across the majority of Google Analytics 4 properties.

They are metrics that combine one or more existing or custom metrics within a mathematical formula. They can be used to create a new metric which is valuable to your business needs and reporting. 

The types of metrics that can be combined for calculated metrics are as follows:

  • Metrics are a quantitative measurements, such as a percentage, ratio, or average. These are available out of the box by Google Analytics – you can find a list of available metrics here.
  • Custom metrics are a metric that is not collected out of the box by Google Analytics. These are quantitative measurements specific to your business – you will need to set up tracking for them yourself. 

Calculated metrics are a great way to add further customisation to your existing website and/or reporting. However, they are most useful for Google Analytics 4 configurations which already utilise custom metrics, as you’re able to further combine standard and custom metrics together.

How do you create a calculated metric in Google Analytics 4?

To create a calculated metric in Google Analytics 4, follow these steps:

  1. Go to your Google Analytics 4 property
  2. Click the admin button in the bottom right hand corner of the interface
  3. Go to the ‘Data display’ section and click ‘Custom definitions’
  4. Click the tab called ‘Calculated metrics’
  5. Click the ‘Create calculated metric’ button
  6. You’ll then need to complete the following fields to define the calculated metric:
Name Enter a logical name for the calculated metric that you are creating
API Name This is automatically populated by Google but you can change this name if you wish. This is useful if you’re using the Google Analytics 4 API
Description Add an explanation about the custom metric and what information it provides your business
Formula This is where your custom metric is defined. As you type you’ll see your available metrics that can be selected. When selected correctly these metrics are surrounded by single curly brackets e.g. {Sessions}

The following operators are available to define your custom metric formulas:

– (minus or negative)
+ (addition)
* (multiplication)
/ (division)
() (parenthesis)
Unit of Measurement Select your required unit of measurement for your calculated metric

What are some use cases for custom metrics?

You can create any calculated metric formula which suits your business’s needs. To get you started on this journey here’s a few useful examples:

Average Order Value (AOV):
Shipping Revenue % of Total Revenue:
Engaged sessions per user:Total Revenue minus Tax:

Why should you be using calculated metrics?

There are some key benefits to using calculated metrics in GA4:

  • Customised reporting – You can now easily create new metrics for your business needs which can be applied to standard reports or explorations.
  • Metric consistency –  Your calculated metrics are available via the Google Analytics 4 API meaning any analysis performed outside of the platform (e.g. via Looker Studio or Google Sheets) uses the same metrics.
  • Retroactive application – Any calculated metric you create works retroactively, meaning it formulates your historical data too.

What are the limitations of calculated metrics?

There are also limitations of calculated metrics, which are listed below:

  • Calculated metric quota – You can create up to five calculated metrics per standard property and 50 calculated metrics per 360 property.
  • Google Analytics 4 permissions – You must be an Administrator or Editor to create a calculated metric.
  • API name changing -You can’t change the API name once you create the calculated metric.
  • Formula character restrictions – Formulas are limited to 1024 characters.
  • Limited metric availability – Not all standard metrics are available for calculated metrics.

Further Reading

For further reading on all things metrics, please see the below resources from Google:

Or get in touch for support or advice from our team: