 # Calculated metrics in Google Analitycs

We will talk about calculated metrics in Google Analytics. It is quite simple to create it and then use it directly in reports in the web interface, build graphs, tables, etc.

There is often a situation when it is necessary to calculate individual indicators to assess the effectiveness of advertising channels. Most do it manually in Microsoft Excel or Google SpreadSheet by first importing data from Google Analytics, and then adding algorithms and formulas to the document itself. There are options to do this faster and easier. We will talk about calculated metrics in Google Analytics. It is quite simple to create it and then use it directly in reports in the web interface, build graphs, tables, etc.

Limitations:

This feature is only available for assets using Universal Analytics.

You can create a maximum of 5 calculated measures per view

• Click the Admin tab and select the view you want.

• In the VIEW column, select Calculated Measures> + CALCULATED RATIO  The “Add a calculated measure” page will open with 4 fields:

• name;

• external name;

• formatting type;

• formula.  Name – well, everything is clear. This is the name you give the indicator. It is worth giving a name so that it is understandable not only to you, but also to other people who use web analytics or read your reports.

External name – this value will be used when exporting data from Google Analytics, for example, via API.

It consists of two parts:

The first part is “prefix”, which cannot be changed, and the second part, which we set ourselves.

It is important that after creating a calculated measure, you cannot change its external name!

Formatting type – select the format of our indicator from the available list: Formula – actually the formula itself by which our indicator will be read.

As soon as you start typing the formula, a list of standard measures that you can add to it appears.

Examples of valid operators:

• Plus (+)

• Minus (-)

• Divide by (/)

• Multiply by

• Brackets

Negative numbers are not supported (that is, “A – B” can be written, but “- B + A” cannot). The formula must contain no more than 1024 characters.

• Where you can use calculated measures:

• Special reports

• Custom dashboards and widgets
API for viewing Google Analytics reports

Examples of using:

• Example 1: Converting Currency from USD to UAHName
• : Income in GRNExternal name:
• revenuegrnFormatting type:
• Currency (decimal format)Formula
: {{Income}} * 27  Where “27” is the current rate

• Example 2: Transaction CostName
• : CPTExternal name:
• cptFormatting type:
• Currency (decimal format)Formula
: {{Cost}} / {{Transactions}}  This tool makes the work of Google Analytics even faster and easier. Write questions and examples of using this tool in the comments.