Calculated Metrics in Google Analytics 4

Estimated Reading Time: 4 minutes
July 10, 2024
Calculated Metrics in Google Analytics 4
Calculated metrics in Google Analytics 4 (GA4) take your analysis one step deeper by allowing you to create new calculations based off multiple existing standard or custom metrics. The purpose of calculated metrics is to provide data that cannot be otherwise captured. These calculated metrics can be used in standard and custom reports to complement your data.  Below we will go over a few use cases for calculated metrics that can be beneficial for your business.
  • Inactive Users – The GA4 UI provides ‘Total Users’ and ‘Active Users’ metrics. We can create a calculated metric to find the value for inactive users without having to manually calculate this every time.
  • Item Margin – Product margin aids in understanding the profitability of one or more products.
  • Revenue after Refunds – Within GA4, we have the option to view refund data associated with transactions. We can take this analysis one step further and create a calculated metric to understand total revenue after any refunds have been issued.

Creating Calculated Metrics

There are two ways you can create calculated metrics with your GA4 data: via the GA4 UI or Looker Studio.

GA4 User Interface

To create a calculated metric, navigate to the ‘Custom Definitions’ section in the Admin settings.

In the Calculated Metrics tab, select ‘Create a Calculated Metric’.

Type a name and description for the new metric. The API name will autopopulate with the name of the calculated metric in snake case format, although this API name can be edited if needed.

When clicking on the Formula field, a drop-down list will appear with all the metrics you can use to create a calculated metric with. Start typing out the name of a metric and select it from the list. Do this for any remaining metrics you would like to use within your formula, along with the appropriate operators. 

Ensure that you select the correct unit of measurement for the calculated metric.

Important: some metrics may not be combined due to different scopes. You will see an error message if the combination of metrics you selected are not compatible. Once you save the metric, data will begin to populate for both retroactive and current data. The new calculated metric can be used within the GA4 UI as well as within Looker Studio reports.

Looker Studio Interface

An alternative to creating a calculated metric within the GA4 UI is by creating a ‘Calculated Field’ in Looker Studio. This approach is recommended for calculated metrics that require more complex formulas that the GA4 interface does not support.  Important: Any calculated fields created within the Looker Studio interface are not visible within the GA4 UI. To begin creating a calculated field, click on ‘Add a Field’ >  ‘Add a calculated field’ in the Data settings.

Give the new field a Field Name and begin typing out the formula within the Formula box. 

Once this is saved, you will be able to use this calculated field in your Looker Studio report.

Calculated Metrics (or Calculated Fields in Looker Studio) are a great way to further analyze your website data by using your existing metrics. To learn more about how custom metrics are useful, aside from using them to create calculated metrics, visit this article.

Do you have questions about calculated metrics in Google Analytics 4?

Our team is here to help whenever you need us.

Author

  • As a Digital Analytics Consultant at InfoTrust, Silvia Castro assists clients with all-things analytics. A day in the life of Silvia consists mostly of configuring Google Analytics accounts and ensuring that such implementations are set up successfully. She enjoys conducting interactive trainings on the platform, where clients get to engage and have their questions answered on the spot. In her free time, you can find her at a pilates class or enjoying some outdoor activities with her dog, Sammy.

    View all posts
Last Updated: July 10, 2024

Get Your Assessment

Thank you! We will be in touch with your results soon.
{{ field.placeholder }}
{{ option.name }}

Talk To Us

Talk To Us

Receive Book Updates

Fill out this form to receive email announcements about Crawl, Walk, Run: Advancing Analytics Maturity with Google Marketing Platform. This includes pre-sale dates, official publishing dates, and more.

Search InfoTrust

Leave Us A Review

Leave a review and let us know how we’re doing. Only actual clients, please.

  • This field is for validation purposes and should be left unchanged.