Google Analytics is an excellent free tool for creating and using calculated metrics. And since using google products ubiquitously within a single company brings the most results, you also have an opportunity to create calculated metrics in Google Data Studio by using calculated fields and in Google Sheets by combining different metrics together. 

Before we begin reviewing Google Analytics calculated metrics in use, it’s important to remember calculated and custom metrics are not the same thing. While custom metrics are created to track data that is not automatically collected by Google, like user heart rate or daily steps, calculated metrics utilize metrics that are already available within your reports but computes them in a way to create new ones.

Now that you are informed and hopefully well-fed (you’re so gonna need that brainpower 😉 ) let’s take a look at how to create and use calculated metrics in different spaces. 

How to Create Calculated Metrics in Google Analytics 

A couple of minutes before we get to actually play with user-defined metrics we’ll need to create them. There are a number of limitations – only 5 calculated metrics per reporting view (or 50 if you’re premium) and only employees with admin access can create them. Here’s how.

Go to your Google Analytics account home page > Admin > View > Calculated Metrics > Add Calculated Metric. 

Here you’ll see a couple of parameters to fill out. First – the Name, which could be anything, but better be a descriptive and concise title that clearly states what this new calculated metric is about. “Goal Completions per Event” or “Newsletter Subscriptions per Session” would be perfect examples, but if you got it wrong the first time — don’t worry, you can change the name later.

Next – the External Name. This parameter generates automatically and serves as an API name for your new metric. Therefore we can happily jump to the following parameter called the Formatting Type. There are 5 formatting types in total, each used for a unique calculating purpose: 

  • Float — showcases numbers with only two decimal places, so if you have a number like 23.477 it will be displayed as 23.48 in your reports. 
  • Integer — displays only whole numbers, removing any figures after a decimal point, turning your original 23.48 into 23.
  • Currency — shows values in a dollar amount or any other currency you have set for the current view, which in our example looks like $23.48. 
  • Time — converts all numbers into time measurement, turning our original value of 23.477 into 23 hours, 28 minutes and 37 seconds. 
  • Percent — represents the final value as a percentage with the first two decimal places, so our example number 23.477 turns into 2347.7%. 

Now, the formula. You have a number of operators to create Google Analytics calculated metrics, which include addition (+), substruction (-), division (/) and multiplication (*), along with parenthesis and positive cardinal numbers with decimals. In order to create a calculated metrics formula all you have to do is type in the two of the already existing metrics and place mathematical symbols between them. 

Your formula for, say, “Goal Completions per Event” should look like this: {{Goal Completions}} / {{Event}} and you can blissfully press Create. Now that we know how to create metrics in Google Analytics let’s take a look at areas where we can use them. 

How to Use Calculated Metrics in Google Analytics 

Once we’ve created our calculated user-defined metrics let’s move to a step by step review on how to actually use them. First things first, you can start using calculated metrics right in your custom reports. 

Calculated Metrics in Custom Reports

To begin, go to the left-side menu tab > Customization > Custom Reports > New Custom Report > Metric Groups > Add Metric > Other > find your newly-created calculated metric > Save.

If you have an existing Google Analytics report you’d want to add your brand new user-defined metrics to, go to your current report dashboard > Edit > Metric Groups > Add Metric > Other > find your newly-created calculated metric > Save.

Calculated Metrics in Dashboards & Widgets 

Yes, you can easily be using calculated metrics in dashboards and widgets, too.
Awesome, right?

To start doing so go to your left-side menu tab > Customization > Dashboards > choose a widget > Widget Settings > Graph the following metric over time > uncheck ☐ Display as alphabetical list > Other > find your newly-created calculated metric > Save.

Calculated Metrics in Google Data Studio

When you create new calculated metrics in Google Analytics you can automatically access them in Google Data Studio too. You can also create user-defined metrics in GDS directly, but they won’t be accessible for you within your Google Analytics account. 

In order to use pre-existing calculated metrics previously created in Google Analytics you have to open your Google Data Studio dashboard > Metric picker > Default Group > find your newly-created calculated metric. 

Calculated Metrics in Analytics Reporting API

Okay, so you can not directly query a calculated metric through Google Analytics API. Yet. Or ever. We don’t know. But what we do know is there is a way around it.

What you can do in order to receive relevant analysis with custom metrics via API is query metrics which form your final formula separately, and then use formulas (say in Google Sheets) to compute your newly-calculated metric automatically.

Conclusion 

Yay! We did it! Now you know how to create and use calculated metrics in Google Analytics, Google Data Studio and API. Here’s a list of awesome Google Analytics articles you shouldn’t miss: