GA4 Custom Metrics Tutorial – Get Free GA4 ebook

Table of Contents for GA4 Custom Metrics Tutorial

  1. Custom metrics are user-defined metrics
  2. Introduction to event-scoped custom metrics
  3. Creating event-scoped custom metric via automatically tracked parameter
  4. Creating an event-scoped custom metric via a custom parameter
  5. Applying an event-scoped custom metric to an Analysis Hub report
  6. Advantages of using custom metrics in GA4
  7. Custom metrics in Universal Analytics vs GA4
  8. How to edit a custom metric
  9. Quota information for custom metrics
  10. How to delete a custom metric

Custom metrics are user-defined metrics

Create and use custom metrics when you want to measure the characteristics of a dimension (whether default or custom dimension) that cannot be measured by any default metric.

For example, if you have defined the keywords which resulted in a phone call as a custom dimension in GA4 then one of the characteristics of this dimension could be ‘number of phone calls generated by each keyword’.

You can measure the number of phone calls by creating and using a custom metric (e.g. ‘phone calls’).

In the context of GA4, a custom metric is an event parameter. This parameter can be an automatically collected parameter or custom parameter.

Note: Do not send personally identifiable information (e.g. phone number, social security number, etc) to your GA4 reporting view as a value of the custom metric. This is against the Google Analytics terms of service. 

Introduction to event-scoped custom metrics

A custom metric which has an event scope is called an event-scoped custom metric.

Event-scope means the value of the custom metric is calculated and sent for each event. 

Note: In GA4, custom metrics can have only one scope and that is event scope.

 
Get the E-Book (50 Pages)
 
Get the FREE E-Book (50+ Pages)

You can create an event-scoped custom metric by registering a parameter with event scope in the GA4 user interface.

In GA4, the values of custom metrics are supplied by logged event parameters. So, before you create an event-scoped custom metric, you need a logged event parameter in your GA4 reporting view. 

A logged event parameter is one that is already being tracked and reported by your GA4 reporting view. 

Note: You can also create a custom metric before logging the event parameter, but that is not best practice for creating custom metrics.

Creating an event-scoped custom metric via an automatically tracked parameter

Let us suppose you want to register the automatically collected parameter ‘video_duration’ as an event-scoped custom metric. 

To do that follow the steps below:

Step-1: Navigate to your GA4 property view and then click on the ‘Custom Definitions’ link:

Step-2: Click on ‘Custom metrics’:

Step-3: Click on the ‘Create Custom metrics‘ button:

Step-4: Enter the name for your custom metric. This name will appear in your GA4 reports, so use a descriptive name:

Note: You can always change the metric name later if you want. 

Step-5: Enter a description for your custom metric in the ‘Description’ field so that later on it becomes easier to understand what the metric is all about:

GA4 Custom Metrics

Note: Entering a description for your custom metric is optional.

Step-6: Select the event parameter ‘video_duration‘ from the drop-down menu:

The event parameter ‘video_duration‘ supplies the value to your custom metric. 

Note: Once you have selected an event parameter, you cannot change it later.

Step-7: Select the unit of measurement from the drop-down menu and then click on the ‘Save’ button at the top right-hand side:

Note: You can always change the unit of measurement later if you want.

You should now see your new custom metric listed under the ‘Custom metrics’ section:

Step-8: Wait for a full 24 hrs and then navigate to the ‘Engagement Events‘ report in your GA4 reporting view:

Step-9: Find and click on the ‘video_progress‘ event:

You should now see the report on the ‘video_progress‘ event:

Step-10: Scroll down the ‘video_progress‘ event report until you see the data card named ‘CUSTOM_VIDEO_DURATION_SECONDS‘:

You see this data card in the ‘video_progress‘ event report only because you registered the ‘video_duration‘ parameter as a custom metric. Otherwise, you won’t see this data card.

This data card will appear in every event report where you (or GA4) are passing the ‘video_duration’ parameter along with the event. This is one advantage of registering a parameter as a custom metric.

Step-11: Click on the events drop-down menu at the top:

Step-12: Find and click on the ‘video_start’ event:

You should now see the report on the ‘video_start’ event. 

Step-13: Scroll down the ‘video_start’ event report until you see the data card named ‘CUSTOM_VIDEO_DURATION_SECONDS‘:

You see this data card in the ‘video_start’ event report only because you registered the ‘video_duration‘ parameter as a custom metric. Otherwise, you won’t see this data card.

Creating an event-scoped custom metric via a custom parameter

Now let us suppose you are passing the ‘discount_value’ custom parameter with the ‘discount_value’ event and this parameter is being logged (i.e. recorded).

Let us also suppose you registered the ‘discount_value’ parameter as an event-scoped custom metric:

Now follow the steps below:

Step-1: Navigate to the ‘Engagement Events’ report in your demo GA4 reporting view:

Step-2: Find and then click on the ‘discount_value’ event:

You should now see the ‘discount_value’ event report:

Step-3: Scroll down the ‘discount_value’ event report until you see the data card named ‘DISCOUNT_VALUE’:

You see this data card in the ‘discount_value’ event report only because you (technically speaking, ‘Google’ for this demo property) registered the ‘discount_value’ custom parameter as a custom metric. Otherwise, you won’t see this data card.

Applying an event-scoped custom metric to an Analysis Hub report

Once you have registered a logged event parameter as an event-scoped custom metric, you can then apply the custom metric to the Analysis Hub report.

Let’s create a new advanced analysis via the blank report template and then apply the ‘discount_value’ event-scoped custom metric to it.

Follow the steps below:

Step-1: Navigate to ‘Analysis Hub’ in your GA4 demo reporting view:

Step-2: Click on the ‘Blank’ template:

Step-3: Scroll down and then click on the ‘+’ button next to ‘METRICS’:

You should now see a search box (which is used to search for a particular metric) like the one below:

Step-4: Type ‘discount_value’ in the search box:

Step-5: Click on the ‘discount_value’ checkbox and then click on the ‘Apply’ button:

You should now see the ‘discount_value’ metric listed under the ‘METRICS’ section:

Step-6: Click on the ‘Drop or select metric‘ button:

Step-7: Click on ‘discount_value’ from the drop-down menu:

You should now see the ‘discount_value’ metric is applied to the canvas on the right:

That’s how you can apply an event-scoped custom metric to an Analysis Hub report.

Advantages of using custom metrics in GA4

The following are the two main advantages of creating and using custom metrics in GA4:

Step-1: In your event report, you see a new data card added for every logged event parameter you registered as a custom metric:

And this data card appears in every event report where you (or GA4) are passing the same event parameter along with the event. Thus the use of custom metrics enriches your existing event reports.

Step-2: You can report on the same event parameter for as many events as you like (via the Analysis Hub reports) without passing the same parameter over and over again for each individual event.

Custom metrics in Universal Analytics vs GA4

The following are the main differences between custom metrics in Universal Analytics vs GA4:

#1 Different scopes

In Universal Analytics, a custom metric can have anyone of the following two scopes:

  1. Hit
  2. Product

Whereas in GA4, a custom metric can have only one scope and that is event scope.

Note: In GA4, hit scope is referred to as event scope.

#2 Different process for creating custom metrics

In Universal Analytics, creating a custom metric involves the following two steps:

  1. Configuring the custom metric (i.e. setting name, scope, formatting type, minimum value and maximum value) in the user interface.
  2. Writing code to send the values of the custom metric to the reporting view.

In GA4, creating a custom metric involves the following two steps:

  1. Sending an event parameter along with an event. 
  2. Registering the logged event parameter as a custom metric in the user interface. 

#3 Different quota for the custom metrics

In Universal Analytics, you can create up to 20 custom metrics per property. However, if you are using the GA 360 then you can create up to 200 custom metrics per property.

Whereas in GA4, you can create up to 50 event-scoped custom metrics per GA4 property.

How to edit a custom metric

Follow the steps below to edit a custom metric:

Step-1: Navigate to the ‘Custom definitions‘ report in your GA4 reporting view:

Step-2: Click on the ‘Custom metrics’ tab:

Step-3: Click on the three dots menu next to the custom metric you want to edit:

Step-4: Click on the ‘Edit’ option:

Step-5: You can now change the name, description and unit of measurement of your custom metric. Then click on the ‘Save’ button:

Quota information for custom metrics

In GA4, you can create up to 50 event-scoped custom metrics per property. That’s the custom metrics quota allocated to you.

Now if you want to know the total number of event-scoped custom metrics you have already created and the number of custom metrics you are still allowed to create then you can get this information through the ‘Quota information’ feature of GA4.

Follow the steps below to find the quota information: 

Step-1: Navigate to the ‘Custom Definitions‘ report in your GA4 reporting view:

Step-2: Click on the ‘Quota information’ button on the top right-hand side of your screen:

You should now be able to see the total number of event-scoped custom metrics you have already created and the number of custom metrics you are still allowed to create:

From the screenshot above we can conclude that I have created six event-scoped custom metrics out of 50. 

Therefore, 44 (50 minus 6) event-scoped custom metrics are still available to me.

How to delete a custom metric

In GA4, you can create up to 50 event-scoped custom metrics per property. 

However, once you have reached your custom metrics quota, you can then no longer create any new custom metric.

In that case, if you still want to create new custom metrics, then you would need to delete the ones you are no longer using.

Follow the steps below to delete a custom metric:

Step-1: Navigate to the ‘Custom Definitions‘ report in your GA4 reporting view:

Step-2: Click on the ‘Custom metrics’ tab:

Step-3: Click on the three dots menu next to the custom metric you want to delete:

Step-4: Click on the ‘Archive‘ option:

Step-5: Click on the ‘Archive’ button:

Note: Archiving a custom metric is permanent. It can not be undone and the corresponding data can not be restored. Any segment or funnel using this custom metric in Analysis would stop working.

Other articles related to GA4 (Google Analytics 4)

#1 GA4 Intro

  1. What is GA4 (Google Analytics 4) – The Apps + Web Property?
  2. Key Benefits of Using Google Analytics 4 (GA4)
  3. How to upgrade to GA4 (Google Analytics 4)
  4. Google Analytics 4 (GA4) vs Universal Analytics – What is the difference?
  5. Google Signals GA4 – See demographics (gender, age) in Google Analytics 4
  6. Understanding Google Analytics Measurement ID (GA4)
  7. Google Analytics 4 training and tutorial
  8. Using the GA4 test property

#2 GA4 Integration

  1. How to connect GA4 (Google Analytics 4) with Google Data Studio
  2. How to link GA4 (Google Analytics 4) with Google Ads
  3. GA4 BigQuery – Connect Google Analytics 4 with BigQuery

#3 GA4 Events

  1. GA4 (Google Analytics 4) Event Tracking Setup Tutorial
  2. How to set up GA4 Custom Events via Google Tag Manager
  3. GA4 (Google Analytics 4) Enhanced Measurement Tracking Tutorial
  4. Events Report in Google Analytics 4 (GA4)
  5. GA4 User Properties (User Scoped Custom Dimensions) – Tutorial
  6. Event Scoped Custom Dimensions in GA4 – Tutorial

#4 GA4 Conversions

  1. GA4 (Google Analytics 4) Conversion Tracking Guide
  2. How to import conversions from GA4 property to your Google Ads account

#5 GA4 Dimensions and Metrics

  1. GA4 Metrics Tutorial with Free Google Analytics 4 Ebook
  2. GA4 Custom Metrics Tutorial
  3. GA4 Dimensions Tutorial
  4. GA4 Custom Dimensions Tutorial

#6 GA4 Ecommerce

  1. GA4 (Google Analytics 4) Ecommerce Tracking via GTM – Tutorial

#7 GA4 Specialized Tracking

  1. Cross Domain Tracking in GA4 (Google Analytics 4) Setup Guide
  2. GA4 Site Search – Tracking Site Search in Google Analytics 4
  3. GA4 (Google Analytics 4) Scroll Tracking Tutorial
  4. How to Install Google Analytics 4 on Shopify
  5. Self-referral Google Analytics 4 – Referral exclusion GA4
  6. GA4 Data Import Tutorial

#8 GA4 filters

  1. GA4 filters – Understanding data filters in Google Analytics 4
  2. How to create and test filters in Google Analytics 4 (GA4)?
  3. Exclude internal traffic in GA4 (Google Analytics 4) via IP filter

#9 GA4 Analysis Hub

  1. Analysis Hub Google Analytics – Exploration Report in GA4 (Google Analytics 4)
  2. How to use the user lifetime report in Google Analytics 4 (GA4)
  3. How to use path analysis report in Google Analytics 4 (GA4)
  4. How to use Segment Overlap Report in Google Analytics 4 (GA4)
  5. How to use the Funnel Analysis Report in Google Analytics 4 (GA4)

#10 GA4 Advanced

  1. How to use Debug View report in Google Analytics 4 (GA4)
  2. Understanding GA4 measurement protocol
  3. How to create a remarketing audience in Google Analytics 4 (GA4)
  4. GA4 Audiences – Creating custom audience in Google Analytics 4
  5. How to build comparison (Advanced segment) in Google Analytics 4 (GA4)

#11 GA4 Reporting

  1. How to create custom insights in Google Analytics 4 (GA4)

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade
error: Alert: Content is protected !!