Google Analytics Dimensions and Metrics explained in great detail

Index

#1 Introduction to dimensions and metrics #13 Product level dimension
#2 What is a dimension in Google Analytics #14 Classification of dimensions  in terms of scope
#3 What is a metric in Google Analytics #15 Predefined and custom metrics
#4 Differences between dimensions and metrics in Google Analytics #16 Custom metric properties / configuration values
#5 Predefined and custom dimensions #17 Custom metrics scope
#6 Primary and secondary dimensions #18 Classification of metrics in terms of scope
#7 How to include more than two dimensions in your Google Analytics reports #19 Hit level metric
#8 Custom dimension properties / configuration values #20 Product level metric
#9  Custom dimension scope #21 Dimension – metric combinations
#10 Hit level dimension #22 Setting up custom dimensions and metrics
#11 Session level dimension #23 Six stages of custom dimensions and metrics setup
#12 User level dimension #24 Further reading

Introduction to dimensions and metrics

Google Analytics (GA) reports contain two types of data: dimensions and metrics. GA displays data in its reports, usually in the form of a table.

Each row of the table represents dimension and each column represents metrics:dimensions metrics intro

Every Google Analytics report is made up of dimensions and metrics.

What is a dimension in Google Analytics?

A dimension is the attribute of visitors to your website. For example, let’s say a man aged between 25-34 from London visited your website after clicking on an organic search listing on Google which he found by searching for the keyword ‘attribution modelling’.

Let us also assume that he visited your website via a chrome browser which is installed on a desktop computer which run windows.

Now following are the attributes of the visitor to your website along with their values:

Gender – male
Age – 25-34
City – London
Source / Medium – Google / Organic
Keyword – Attribution Modelling
Browser – Chrome
Device Category – desktop
Operating System – Windows

Gender, Age, City, Source /Medium, Keyword, Browser, Device Category and Operating System are all labelled as dimensions in Google Analytics because they are the characteristics of your website users.

What is a metric in Google Analytics?

A metric is a number which is used to measure one of the characteristics of a dimension. A dimension can have one or more characteristics.

For example, following are the characteristics of the dimension called ‘Source / Medium’:

  1. Sessions
  2. % New Sessions
  3. New Users
  4. Bounce Rate
  5. Pages / Sessions
  6. Avg. Session Duration
  7. Goal Conversion Rate
  8. Goal Completions
  9. Goal Value

Sessions, % New Sessions, New Users, Bounce Rate, Pages / Sessions etc are all labelled as metrics in Google Analytics because they are the characteristics of the dimension called ‘Source / Medium’.

Differences between dimensions and metrics in Google Analytics

Difference #1

Though both dimensions and metrics are the characteristics of your website visitors, they are different in the way they are: configured, collected, processed, reported and queried in Google Analytics. For example, you can’t use (or query) dimension as a metric or metric as a dimension in Google Analytics either via the reporting interface or via API.

Difference #2

In Google Analytics, a dimension provides context to a metric. Consequently a standalone metric is meaningless to analyze and report. For example the metric ‘sessions’ is meaningless on its own and make sense only when used together with a dimension like ‘source/medium’, ‘user type’, ‘country’ etc.

Difference #3

Unlike dimensions, metrics are reported under following three categories in Google Analytics:

  1. Acquisition – how visitors arrive at your website
  2. Behavior – how visitors interacted with your website
  3. Conversions – how visitors completed conversions on your website.

acqusition behavior conversions

Examples of Acquisition metrics:

  1. Sessions
  2. % New Sessions
  3. New Users

Examples of Behavior Metrics

  1. Bounce Rate
  2. Pages/Sessions
  3. Avg. Session Duration

Examples of Conversion Metrics

  1. Goal Conversion Rate
  2. Goal Completions
  3. Goal Value

Difference #4

Unlike dimensions, not all metrics can appear in every Google Analytics reports. For example ‘page value’ metric appear in only certain Google Analytics reports. This is because Google Analytics uses different analytics attribution models (not to be confused with attribution models used in multi-channel funnels) to produce certain set of reports or to produce certain set of metrics.

These analytics attribution models are:

#1 Per GIF request attribution model – This model is used to calculate aggregate values for a metric.

#2 Page value attribution model (or forward looking attribution model) – This model is used to calculate ‘page value’ metric for a page or set of pages.

#3 Site search attribution model – This model is used to calculate Goal value and Goal conversion rate for each search term.

Difference #5

A dimension can have any of the following scopes: ‘Hit’, ‘Session’, ‘User’ or ‘Product’. Whereas a metric can have only two scopes, either ‘Hit’ or ‘Product’ (more about scopes later).

Difference #6

The value of a custom dimension is of type ‘text’. Whereas value of a custom metric is of type ‘integer’.

Predefined and custom dimensions

Predefined dimensions are the one which are already available in Google Analytics reports. They are ready to use dimensions. Custom dimensions are user defined dimensions.

If you want to measure the characteristic of a user which can not be measured by any predefined dimension then you need to create and use your own dimension to measure such characteristics. For example you can create your own dimension to determine and store keywords which resulted in a phone call on your website.

Similarly, you can create your own dimension to retrieve website usage data by authors, logged in or logged out users or create your own dimension to measure conversion data and time in Google Analytics. Through custom dimensions you can import the data which google analytics does not automatically collect (like CRM data, phone call data, logged in users data etc) and correlate this non-google analytics data with Google Analytics data.

Primary and secondary dimensions

Both predefined dimensions and custom dimensions can be used as primary dimension or secondary dimension in GA reports:primary and secondary dimensionsYou can use custom dimension as primary dimension in custom reports or as a secondary dimension in standard reports. But you can’t use custom dimensions as primary dimension in standard reports.

How to include more than two dimensions in your Google Analytics Reports

By default you can add only two dimensions to a GA report at a time: one primary dimension and one secondary dimension.

Now if you want to include more than 2 dimensions in your GA reports then follow the steps below:

Step-1: Create a new custom report.

Step-2: Select ‘Flat table’ and then you can add up to 5 dimensions in your GA report:flat table

You can then see the 5 dimensions in your report like the one below:

5 dimensions

This can help you in doing more meaningful analysis.

Note: You can also use custom dimension as an advanced segment in GA reports.

Custom dimension properties / configuration values

Every custom dimension in GA has got following five properties (also known as configuration values):

  1. Name
  2. Index
  3. Scope
  4. Last Changed
  5. State

custom dimension properties

Name is the name of the custom dimension as it will appear in your Google Analytics reports. Use a descriptive and unique name so that you can easily identify and understand the functionality of your custom dimension.

Index (also known as slot) is a number (must be a positive integer) which is used to internally identify and differentiate one custom dimension from another in Google Analytics. Index is like a parking space reserved for your custom dimension. So once an index is used, it can not be used for another custom dimension. The value of index should be between 1 and 200.

Scope determines the hits that will be associated with the value of a custom dimension.

Last Changed is the date when a custom dimension was first created or last modified.

State is the current status of a custom dimension. It can be either ‘active’ or ‘inactive’.

Note: Inactive custom dimensions may continue to appear in your reports but you will not see any new value in reports.

Custom dimension scope

Each custom dimension can have any of the following four scopes:

  1. Hit
  2. Session
  3. User
  4. Product

custom dimension scopes

Custom Dimension – ‘Hit’ Scope

A hit is a user’s interaction with your website/app that results in data being sent to the Google Analytics server.

Following are the examples of some common hits:

  • Pageviews
  • Screenviews
  • Events
  • Transactions

A user can send one or more hits. Value of a custom dimension is sent along with a hit.

So if a custom dimension has been set up, then a user hit is sent along with the value of custom dimension. Otherwise the hit is sent without the value of custom dimension.

When a user hit is sent along with the value of custom dimension and the custom dimension has got hit level scope, then the value of custom dimension is only applied to the hit with which the value was sent.

In other words, the value of custom dimension is calculated and send for each hit.

Custom Dimension – ‘Session’ Scope

A session is a group of hits recorded for a user in a given time period.  A user can trigger one or more sessions on the same day or over the course of multiple days, weeks or months. By default a session expires after 30 minutes of users’ inactivity on your website or at midnight or if the user return to your website via a different campaign.

When a custom dimension has got session level scope, its value is applied to all the hits in a current session.

In other words, the value of custom dimension is calculated and send only once per session.

To learn more about sessions in Google Analytics, check out this article: Understanding sessions in Google Analytics

Custom Dimension – ‘User’ Scope

A user is a random unique client ID set by Google Analytics cookie when a browser (like chrome, internet explorer, safari etc) loads your website content for the first time. Every time a new client ID is detected in a session, Google Analytics count it is as a new user. Every time an existing client ID is detected in a new session, Google Analytics count it as a returning user.

Since a client ID exist only on the device (desktop, laptop, mobile, tablet) and the browser where it has been set, Google Analytics can not identify a user across devices and browsers. When a custom dimension has got user level scope, its value is applied to all the hits in the current session as well as future sessions of a user, until there is a change in value of custom dimension or custom dimension has been made inactive.

In other words, the value of custom dimension is calculated and send only once per user.

To learn more about users in Google Analytics, check out this article: Understanding users in Google Analytics.

Custom Dimension – ‘Product’ Scope

A product represents the product you sell on your website. When a custom dimension has got product level scope, its value is applied to the product for which it has been set. In other words, the value of custom dimension is calculated and send only once per product.

Product level scope can be set for custom dimensions only when you have implemented enhanced ecommerce tracking on the website.

In short, ‘Scope’ determine when the value of a custom dimension should be calculated and send. So,

#1 if a custom dimension has got a hit scope, then the value of custom dimension should be calculated and send for each hit or for the hit with which the value is sent.

#2 if a custom dimension has got a  session scope, then the value of custom dimension should be calculated and send only once per session.

#3 if a custom dimension has got a user scope, then the value of custom dimension should be calculated and send only once per user.

#4 if a custom dimension has got a product scope, then the value of custom dimension should be calculated and send only once per product.

Classification of dimensions in terms of scope

Google Analytics dimensions can be classified into following four categories, in terms of scope:

#1 Hit Level Dimensions

#2 Session Level Dimensions

#3 User Level Dimensions

#4 Product Level Dimensions

#1 ‘Hit’ Level Dimension

It is the dimension which has got hit level scope.  A hit level dimension can be predefined or custom.

Following are the examples of predefined hit level dimensions:

  1. Page
  2. Page Title
  3. Page Path level 1
  4. Landing Page
  5. Search Term
  6. Event Category
  7. Event Action
  8. Event Label

Use hit level custom dimension when:

#1 You want to associate the custom dimension value only with the hit with which it was sent

#2 The dimension value change for each hit.

In case of hit level custom dimension, the value of custom dimension is calculated and send for each hit.

For example, here is how you can send the value of a hit level custom dimension with a pageview hit:

ga(‘send’, ‘pageview’, { ‘dimension1′:  dimensionValue’}); // Dimension value is sent for each hit

Here is how you can send the value of a hit level custom dimension with an event hit:

ga(‘send’, ‘event’, ‘category’, ‘action’,{ ‘dimension1′:  dimensionValue’}); // Dimension value is sent for each hit

If you want to send the value of a custom dimension with all the hits on a page then use the set command:

ga(‘set’, ‘dimension1’, dimensionValue);

#2 ‘Session’ Level Dimension

It is the dimension which has got session level scope. A Session level dimension can be predefined or custom.

Following are the examples of predefined session level dimensions:

  1. Source / medium
  2. Source
  3. Medium
  4. Keyword
  5. Query

Use Session level custom dimension when:

#1 You want to associate the custom dimension value with all the hits of a current session

#2 The dimension value doesn’t change often for each hit.

In case of session level custom dimension, the value of custom dimension is calculated and send only once per session.

For example, here is how you can send the value of a session level custom dimension with a pageview hit:

ga(‘set’, ‘dimension1’, dimensionValue); // Dimension value should be sent only once per session
ga(‘send’, ‘pageview’);

Here is how you can send the value of a session level custom dimension with an event hit:

ga(‘set’, ‘dimension1’, dimensionValue); // Dimension value should be sent only once per session
setTimeout(“ga(‘send’,’event’,’Profitable Engagement’,’time on page more than 3 minutes’)”,180000);

Note: Session level custom dimensions can be set at any time during a session.

#3 ‘User’ Level Dimension

It is the dimension which has got user level scope. A User level dimension can be predefined or custom.

Following are the examples of predefined user level dimensions:

  1. Age
  2. Gender
  3. Affinity category
  4. In-Market segment
  5. Country
  6. Region
  7. City

Use User level custom dimension when:

#1 You want to associate the custom dimension value with all the hits of current and future sessions of a user.

#2 The dimension value doesn’t change often for a particular user, until there is a change in value of custom dimension or custom dimension has been made inactive.

In case of User level custom dimension, the value of custom dimension is calculated and send only once per user.

For example, here is how you can send the value of a user level custom dimension with a pageview hit:

// Dimension value should be sent only once per user
ga(‘set’, ‘dimension1’, dimensionValue);
ga(‘send’, ‘pageview’);

Here is how you can send the value of a user level custom dimension with an event hit:

// Dimension value should be sent only once per user
ga(‘set’, ‘dimension1’, dimensionValue);
setTimeout(“ga(‘send’,’event’,’Profitable Engagement’,’time on page more than 3 minutes’)”,180000);

#4 ‘Product’ Level Dimension

It is the dimension which has got product level scope. A Product level dimension can be predefined or custom.

Following are the examples of predefined product level dimensions:

  1. Product
  2. Product SKU
  3. Product Category (Enhanced Ecommerce)
  4. Product Brand
  5. Transaction ID
  6. Product list name
  7. Product list position

Use Product level custom dimension when:

#1 You want to associate the custom dimension value with a particular product.

#2 The dimension value change for each product. For example product name change with each product.

In case of Product level custom dimension, the value of custom dimension is calculated and send only once per product.

You can send the value of a Product level custom dimension only with enhanced ecommerce product data.

For example, here is how you can send the value of a Product level custom dimension with enhanced ecommerce product data:

product level custom dimension

Predefined and custom metrics

Predefined metrics are the one which are already available in Google Analytics reports. They are ready to use metrics. Custom metrics are user defined metrics. If you want to measure the characteristic of a dimension (whether predefined or custom dimension) which cannot be measured by any predefined metric then you need to create and use your own metric to measure such characteristics.

For example, if you have defined the keywords which resulted in a phone call as a custom dimension in GA then one of the characteristics of this dimension could be, number of phone calls generated by each keyword. We can measure this characteristics of the custom dimension by creating and using a custom metric say ‘Phone Calls’.

The whole setup would look like the one below:custom dimension metric setup1

custom dimension metric setup2

Through custom metrics you can import the data which google analytics does not automatically collect (like CRM data, phone call data, logged in users data etc) and correlate this data with Google Analytics data.You can use custom metrics with both predefined dimensions and custom dimensions. Google Analytics provides more than 200 predefined dimensions and metrics. Get the entire list.

Custom metric properties / configuration values

Every custom metric in GA has got following eight properties or configuration values:

  1. Name
  2. Index
  3. Scope
  4. Formatting type
  5. Last Changed
  6. State
  7. Minimum Value
  8. Maximum Value

custom metric configuration

custom metric configuration2

Name is the name of the custom metric as it will appear in your Google Analytics reports. Use a descriptive and unique name so that you can easily identify and understand the functionality of your custom metric.

Index (also known as slot) is a number (positive integer) which is used to internally identify and differentiate one custom metric from another in Google Analytics.

It is like a parking space reserved for your custom metric. You can not use same index for two or more metrics. The value of index should be between 1 and 200.

Scope determines the hits that will be associated with the value of a custom metric.

Formatting Type determines how the value of a custom metric should be displayed in reports. Formatting type can be: Integer, Currency (decimal) or Time:formatting type

Integer is a whole number.
Currency is a decimal number.
Time is number of seconds (but it appears as HH:MM:SS in your GA reports)


Last Changed
is the date when a custom metric was first created or last modified.

State is the current status of a custom metric. It can be either ‘active’ or ‘inactive’.

Note: Inactive custom metrics may continue to appear in your reports but you will not see any new value in reports.


Minimum Value
is the minimum value of a custom metric that should be processed and displayed in your reports.

Maximum Value is the maximum value of a custom metric that should be processed and displayed in your reports.

Custom metrics scope

Each custom metric can have any of the following two scopes:

  1. Hit
  2. Product

Custom Metric – ‘Hit’ Scope

When a custom metric has got hit level scope, then the value of custom metric is only applied to the hit with which the value was sent. In other words, the value of custom metric is calculated and send for each hit.

Custom Metric – ‘Product’ Scope

When a custom metric has got product level scope, its value is applied to the product for which it has been set. Product level scope can be set for custom metrics only when you have implemented enhanced ecommerce tracking on the website.

Classification of metrics in terms of scope

Google Analytics metrics can be classified into following two categories, in terms of scope:

#1 Hit Level Metrics

#2 Product Level Metrics

#1 Hit Level Metrics

This is the metric which has got hit level scope. A hit level metric can be predefined or custom.

Following are the examples of predefined hit level metrics:

  1. Sessions
  2. % new sessions
  3. Bounce rate
  4. Avg. session duration

Use hit level custom metric when:

#1 You want to associate the custom metric value only with the hit with which it was sent

#2 The metric value change with each hit.

In case of hit level custom metric, the value of custom metric is calculated and send for each hit.

For example, here is how you can send the value of a hit level custom metric with a pageview hit:

ga(‘send’, ‘pageview’, { ‘metric1′: metricValue’}); // Dimension value is sent for each hit

Here is how you can send the value of a hit level custom metric with an event hit:

ga(‘send’, ‘event’, ‘category’, ‘action’,{ ‘metric1′: metricValue’}); // Dimension value is sent for each hit

If you want to send the value of a custom metric with all the hits on a page then use the set command:

ga(‘set’, ‘metric1’, metricValue);

#2 Product Level Metrics

This is the metric which has got product level scope. A Product level metric can be predefined or custom.

Following are the examples of predefined product level metrics:

  1. Product revenue
  2. Unique purchases
  3. Quantity
  4. Average price
  5. Product refund amount

Use Product level custom metric when:

#1 You want to associate the custom metric value with a particular product

#2 The metric value change for each product. For example ‘product colour’ often change with each product.

In case of Product level custom metric, the value of custom metric is calculated and send only once per product.

You can send the value of a Product level custom metric only with enhanced ecommerce product data.

For example, here is how you can send the value of a Product level custom metric with product data:

product level custom metric

Dimension – metric combinations

Not all dimensions and metrics can be queried / used together. Only those dimensions and metrics can be used / queried together which have got the same scope. Therefore we can have valid and invalid dimension-metric combinations.

  1. Example of valid dimension-metric combination: ‘user type’ and ‘users’
  2. Example of invalid dimension-metric combination: ‘source’ and ‘users’

‘user type’ and ‘users’ is a valid dimension-metric combination because both the dimension and metric have got the same user level scope.

‘source’ and ‘users’ is an invalid dimension-metric combination because both the dimension and metric have got different scope. The dimension ‘source’ has got session level scope whereas the metric ‘users’ has got user level scope.

Similarly, ‘page’ and ‘users’ is an invalid dimension-metric combination because the dimension ‘page’ has got hit level scope whereas the metric ‘users’ has got user level scope. Get a complete list of valid dimension-metric combinations

Note: Hit level scope is also knowns as ‘action’ level scope.

Setting up custom dimensions and metrics

Important points to remember before you setup custom dimensions and/or metrics:

#1 Custom dimensions and metrics can be set up only in Universal Analytics and not in classic Google Analytics.

#2 In classic Google Analytics we use custom variables instead of custom dimensions.

#3 Both custom dimensions and custom metrics are set at the property level and not at a view level.

#4 You can create up to 20 custom dimensions and 20 custom metrics per property in Universal Analytics.

#5 If you are using Google Analytics Premium then you can create up to 200 custom dimensions and 200 custom metrics per property.

#6 Once you have setup a custom dimension or custom metric in your GA property, you can’t delete it. However you can edit it.

#7 You can disable a custom dimension or metric by unchecking the ‘Active’ checkbox:

uncheck to disable

#8 Google recommends not to re-use/edit (i.e. change name, scope etc) a custom dimension or custom metric as it can create data integrity issues which can’t be easily fixed. So setup custom dimensions/metrics after a proper thought and planning.

#9 The values of custom dimensions (with hit,session or user scope) and custom metrics (with hit scope) are sent to Google Analytics as parameters attached to other hits (like pageviews, events etc).

Consequently values of custom dimensions and custom metrics can’t be sent after a hit has already been sent.

So, the following code won’t send the value of custom dimension to Google Analytics:

ga(‘create’, ‘UA-1235-12’, ‘auto’);
ga(‘send’, ‘pageview’);
ga(‘set’, ‘dimension1’, ‘Value 1’);

The code below will send the value of custom dimension to GA:

ga(‘create’, ‘UA-1235-12’, ‘auto’);
ga(‘set’, ‘dimension1’, ‘Value 1’);
ga(‘send’, ‘pageview’);

Similarly, the following code won’t send the value of custom metric to Google Analytics:

ga(‘create’, ‘UA-1235-12’, ‘auto’);
ga(‘send’, ‘pageview’);
ga(‘set’, ‘metric1’, ‘Value 1’);

The code below will send the value of custom metric to GA:

ga(‘create’, ‘UA-1235-12’, ‘auto’);
ga(‘set’, ‘metric1’, ‘Value 1’);
ga(‘send’, ‘pageview’);

#10 The values of custom dimensions and custom metrics with product level scope are sent to Google Analytics as parameters attached to a product data.

Consequently values of custom dimensions and custom metrics can’t be sent after after the product data has already been sent.

Six stages of custom dimensions and metrics setup

There are six stages of creating and using custom dimensions and metrics in GA. They are:

#1 Planning – at this stage you create a road map of exactly how you will collect the data and send it to Google Analytics via custom dimensions / metrics.

#2 Configuration – at this stage custom dimensions and metrics are defined via Google Analytics property settings or GTM container tag settings.

#3 Collection – at this stage you collect the required data (like values of custom dimensions or metrics) from your implementation and then send it to Google Analytics server.

#4 Processing – at this stage GA server process the collected data according to their configuration values (like scope) and reporting view filters.

#5 Reporting – at this stage the processed data become available in the GA reports.

#6 Querying – at this stage a GA user can query the data either via the reporting interface or via the GA API.

I have explained all of these stages along with examples in great detail in the article: How to correctly measure conversion date and time in Google Analytics.

Further reading

You should also need to check out this complete guide to calculated metrics in Google Analytics

Announcement about my new books

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.

Himanshu Sharma

Certified web analyst and founder of OptimizeSmart.com

My name is Himanshu Sharma and I help businesses find and fix their Google Analytics and conversion issues. If you have any questions or comments please contact me.

  • Over eleven years' experience in SEO, PPC and web analytics
  • Google Analytics certified
  • Google AdWords certified
  • Nominated for Digital Analytics Association Award for Excellence
  • Bachelors degree in Internet Science
  • Founder of OptimizeSmart.com and EventEducation.com

I am also the author of three books:

error: Content is protected !!