Google Analytics Dimensions and Metrics Explained in Great Detail

What is a dimension in Google Analytics?

A dimension is the attribute of visitors to your website.

For example, let us suppose 27,379 people visited your website via Google organic search in the last one month.

Now all these 27,379 people who visited your website have one common characteristic /attribute. They all visited your website via Google organic search (which is reported as google/organic in Google Analytics).

As a result ‘google / organic’ is one of the attributes of your 27,379 website visitors.

Google Analytics reports the attribute of visitors to your website as a dimension:

Each dimension is made up of names and values.

For example, ‘Source/Medium‘ is the dimension name and ‘google/organic‘ is dimension value.

Let us suppose 247 people visited your website via Google paid search in the last one month.

Now all these 247 people who visited your website have one common characteristic /attribute. They all visited your website via Google paid search (which is reported as google/cpc in Google Analytics).

As a result ‘google / cpc’ is one of the attributes of your 247 website visitors and is reported as a dimension in GA:

Since each dimension is made up of names and values, so ‘Source/Medium‘ is the dimension name and ‘google/organic‘ and ‘google/cpc‘ is dimension value.

A single dimension like ‘Source/Medium’ can have a lot of values:

Another 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 that runs 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

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

Different types of dimensions in Google Analytics

The dimensions in Google Analytics can be broadly classified into two categories:

  1. Default Dimensions – the dimensions that are already available in Google Analytics reports.
  2. Custom Dimensions – these are user-defined dimensions

Note: Both default dimensions and custom dimensions can be used as primary dimensions or secondary dimensions in GA reports.

Different categories of default dimensions in Google Analytics

Following are the various categories of default dimensions in Google Analytics:

#1 User Dimensions – For example User Type, Count of Sessions, Days Since Last Session, etc.

#2 Session Dimensions – For example, Session Duration

#3 Traffic Sources DimensionsCampaign, Source, Medium, Source / Medium, Keyword, etc

#4 Adwords (Google Ads) DimensionsGoogle Ads Campaign ID, Google Ads Ad Group ID, Query Match Type, Placement Domain, Placement URL, etc.

#5 Goal Conversions DimensionsGoal Completion Location, Goal Previous Step – 1, Goal Previous Step – 2, etc.

 

#6 Platform or Device DimensionsBrowser, Operating System, Device Category, Mobile Device Model, etc.

#7 Geo Network DimensionsContinent, Sub Continent, Country, Region, City, etc

#8 System DimensionsScreen Resolution, Java Support, Flash Version, etc

#9 Page Tracking DimensionsLanding Page, Page, Exit Page, Previous Page, Page path level 1, Page path level 2, etc

#10 Internal Search DimensionsSite Search Status, Search Term, Site Search Category, Start Page, Destination Page, etc

 

#11 App Tracking DimensionsApp Name, App ID, Screen Name, Landing Screen, Exit Screen, etc

#12 Event Tracking DimensionsEvent Category, Event Action, Event Label

#13 Ecommerce DimensionsTransaction ID, Product SKU, Product, Product Category, Product Category (Enhanced Ecommerce), Shopping Stage, etc.

#14 Social Interactions DimensionsSocial Network, Social Action, Social Type, etc

#15 User Timings DimensionsTiming Category, Timing Label, Timing Variable

 

#16 Exceptions DimensionsException Description

#17 Content Experiments DimensionsExperiment ID, Variant, Experiment ID with Variant, Experiment Name 

#18 Custom Variables or Columns DimensionsCustom Dimension XX, Custom Variable (Key XX), Custom Variable (Value XX)

#19 Time DimensionsDate, Year, Month of the year, Day of the month, Hour, Minute, Hour of Day, etc

#20 DoubleClick Campaign Manager DimensionsCM Ad (GA Model), CM Advertiser (GA Model), CM Campaign (GA Model), CM Ad, etc

 

#21 Audience DimensionsAge, Gender, Affinity Category (reach), In-Market Segment, etc

#22 DoubleClick for Publishers Backfill DimensionsGAM Line Item Id, GAM Line Item Name

#23 Lifetime Value and Cohorts DimensionsAcquisition Channel, Acquisition Campaign, Acquisition Source, Acquisition Medium, etc

#24 Channel Grouping DimensionsDefault Channel Grouping

#25 DoubleClick Bid Manager DimensionsDV360 Advertiser (GA Model), DV360 Exchange, DV360 Insertion Order, DV360 Site ID, etc

#26 DoubleClick Search DimensionsSA360 Campaign, SA360 Ad Group, SA360 Keyword, SA360 Agency, SA360 Advertiser ID, etc

Note: To see the complete list of all the default dimensions available in Google Analytics along with their description and usage, check the Dimensions & Metrics Explorer.

What are default dimensions?

Default dimensions are the dimensions that are already available in Google Analytics reports. They are ready to use dimensions. 

The following are examples of default dimensions:

  • Gender
  • Age
  • City
  • Source / Medium
  • Keyword
  • Browser
  • Device Category
  • Operating System

What are custom dimensions?

Custom dimensions are user-defined dimensions.

If you want to measure the characteristic of a user that can not be measured by any default 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.

What are primary dimensions?

A primary dimension is the default dimension applied to a report in Google Analytics.

When you navigate to a report say ‘Channels’ report then the default dimension that you see being applied to the report is the primary dimension:

How to change the primary dimension in a Google Analytics report

Google Analytics lists all the available primary dimensions at the top of the data table in a report:

To change the primary dimension just click on one of the primary dimensions.

For example, if you click on the ‘Source / Medium‘ primary dimension then your data table is going to look like the one below:

If you don’t see your primary dimension being listed at the top of the data table then click on the ‘Other’ drop-down menu:

Click on the ‘Commonly Used’ drop-down menu to see the list of commonly used dimensions:

Now click on the dimension you want to apply to your data table.

If you still can’t find your dimension then there are three things that you can do:

#1 Click on the drop-down menus listed under the ‘More Dimensions’ section one by one and then find your dimension:

For example, you can click on the ‘Acquisition’ drop-down menu:

#2 Click on the checkbox ‘Display as alphabetical list‘.

This will list all the available dimensions for your data table in the alphabetical order:

#3 Use the search box to find your dimension.

If you already know the name of your dimension then you can simply search for it:

What are secondary dimensions?

A second dimension that you apply to a report is called a secondary dimension.

In order to apply a secondary dimension to a report click on the ‘Secondary dimension‘ button:

You should now see a drop-down menu from which you can select your secondary dimension:

Let’s apply a secondary dimension called ‘Country’ to our ‘Channels’ report:

Now the data table would look like the one below:

Note: You can use custom dimensions as primary dimensions in custom reports or as a secondary dimension in standard reports but you can not use custom dimensions as primary dimensions 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.

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

Step-1: Navigate to main reporting view of your Google Analytics account and then click on the ‘+ New Custom Report’ button:

Step-2: Click on the ‘Flat Table’ button:

Step-3: Click on the ‘+add dimension’ button:

Step-4: Select the dimension you want to add to your custom report:

Step-5: Repeat Step-3 and 4 to add more dimensions. You can add up to five dimensions to your custom report:

Step-6: Click on the ‘+add metric’ button:

Step-7: Select the metric you want to add to your custom report:

Step-8: Repeat Step-6 and 7 to add more metrics to your reports.

Step-9: Click on the ‘Save’ button to save your custom report.

You should now be able to see the five dimensions added to your custom report like the one below:

 

This can help you in doing more meaningful analysis.

Note: You can also use custom dimensions as a custom segment in GA reports.

How dimensions and metrics are reported in Google Analytics

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 (called the data table). Each row of the table represents the value of a dimension and each column represents the value of a metric:dimensions metrics intro

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

What is a metric in Google Analytics?

A metric is a number that is used to measure one of the characteristics of a dimension.

A dimension can have one or more characteristics.

For example, the 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 labeled as metrics in Google Analytics because they are the characteristics of the dimension called ‘Source / Medium’.

Get the E-Book (50 Pages)

Get the E-Book (62 Pages)

 

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 makes sense only when used together with a dimension like ‘source/medium’, ‘user type’, ‘country’ etc.

Difference #3

Unlike dimensions, metrics are reported under the 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 appears 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 a certain set of reports or to produce a certain set of metrics.

These analytics attribution models are:

  • Per GIF request attribution model – This model is used to calculate aggregate values for a metric.
  • Page value attribution model (or forward-looking attribution model) – This model is used to calculate the ‘page value’ metric for a page or set of pages.
  • 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 the value of a custom metric is of type ‘integer’.

 

Get the E-Book (50 Pages)

Get the E-Book (62 Pages)

 

Custom dimension properties / configuration values

Every custom dimension in GA has got the 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. 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.

The 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 the custom dimension. Otherwise, the hit is sent without the value of the 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 the 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 returns 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 the 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 counts it as a returning user.

Since a client ID exists 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 the value of custom dimension or custom dimension has been made inactive.

In other words, the value of a 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 the 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 determines when the value of a custom dimension should be calculated and send.

#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 the 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.

Get the E-Book (50 Pages)

Get the E-Book (62 Pages)

 

Classification of dimensions in terms of scope

Google Analytics dimensions can be classified into the 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 that 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 a 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 the case of hit level custom dimension, the value of the 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 that 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 a 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 the case of session level custom dimension, the value of the 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

This is the dimension with 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 a 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 the value of custom dimension or custom dimension has been made inactive.

In the case of a user level custom dimension, the value of the 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 that 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 a 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 the case of a product level custom dimension, the value of the 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 is 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 the number of phone calls generated by each keyword.

We can measure the 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 the 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 (a 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 the 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 a custom metric is only applied to the hit with which the value was sent.

In other words, the value of a 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 the following two categories, in terms of scope:

#1 Hit Level Metrics

#2 Product Level Metrics

#1 Hit Level Metrics

This is a metric that 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. Percentage of new sessions
  3. Bounce rate
  4. Avg. session duration

Use a 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 the case of a hit level custom metric, the value of the 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 a metric that 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 a 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 changes with each product.

In the case of the product level custom metric, the value of a 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 a different scope.

The dimension ‘source’ has got session level scope whereas the metric ‘users’ has 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 set up 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 set up 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 that can’t be easily fixed. So set up custom dimensions/metrics after 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 page views, 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 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.

Frequently Asked Questions about dimensions and metrics

What is a dimension in Google Analytics?

A dimension is the attribute of visitors to your website. Google Analytics displays data in its reports, usually in the form of a table. Each row of the table represents a dimension.

What are predefined and custom dimensions?

Dimensions which are already available in Google Analytics reports are called Predefined dimensions. These are ready to use 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. Such dimensions are called 'Custom dimensions'.

What is a metric in Google Analytics?

Google Analytics displays data in its reports, usually in the form of a table. Each column of the table represents a metric. A metric is a number that is used to measure one of the characteristics of a dimension. A dimension can have one or more characteristics.

What are predefined and custom metrics?

Metrics which are already available in Google Analytics reports are called Predefined metrics. These are ready to use 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.

What are the differences between a dimension and metric in Google Analytics?

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.

How to classify 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.

 

Further reading

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

   

EXCLUSIVE FREE TRAINING REVEALS....

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


(even if you are completely new to analytics)


Here’s what we’re going to cover…

#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.

Himanshu Sharma

Digital Marketing Consultant and Founder of Optimizesmart.com

Himanshu helps business owners and marketing professionals in generating more sales and ROI by fixing their website tracking issues, helping them understand their true customers' purchase journey and helping them determine the most effective marketing channels for investment.

He has over 12 years of experience in digital analytics and digital marketing.

He was nominated for the Digital Analytics Association's Awards for Excellence. The Digital Analytics Association is a world-renowned not-for-profit association that helps organisations overcome the challenges of data acquisition and application.

He is the author of four best-selling books on analytics and conversion optimization:

error: Alert: Content is protected !!