Collecting data in Google Analytics is very straightforward, but not fully understanding the “scope” of your metrics and dimensions will get you into trouble!
Visits became sessions, visitors became users… This refers to the external appearance or name of those metrics, but the internal data model related to “scope” has remained the same in the last few years.
In this blogpost we will dive deep into the different scopes, pitfalls and how to apply them correctly in any situation.
Table of Contents
- Metrics and Dimensions
- Scope Definition and Four Types
- User Scope
- Session Scope
- Hit Scope
- Product Scope
- Custom Dimensions and Metrics
- Common Mistakes
- Concluding Thoughts
Let’s start with looking into the building blocks of Google Analytics reports: metrics and dimensions.
Metrics and Dimensions
Metrics and dimensions are the building blocks of Google Analytics reports.
These definitions help you to distinguish between both in Google Analytics:
- A dimension is a characteristic of an object that can be given different values -> a dimension describes data
- A metric is an individual element of a dimension which can be measured as a sum or ratio -> a metric measures data
Here is a quick report from Google Analytics:
This report consists of:
- Two dimensions: medium and country.
- Three metrics: sessions, % new sessions and new users.
Visit the Dimensions & Metrics Explorer to learn more about the standard metrics and dimensions available in Google Analytics.
You can learn a ton here about the background of metrics and dimensions:
- Search on a term that matches with (a) particular dimension(s)/metric(s).
- Expand the entire section and go through all items.
- Expand one particular section to explore underlying metrics and dimensions.
Here is an example of dimension “device category”:
In addition to this, Google Analytics allows you to work with custom metrics and custom dimensions (highly recommended).
I will share more about these custom features later in this article.
Scope Definition and Four Types
Google Analytics collects and presents data in a certain way. This is what scope refers to.
Metrics and dimensions are limited to one scope, so you need to align the scope of a metric with the scope of a dimension.
There are a few things that can happen when you mismatch the scope of a metric and dimension.
Most often it comes down to one of these things:
- The report doesn’t return any data.
- The report returns inaccurate data.
In general, you stay out of trouble when you work with standard reports.
However, you need to be fully aware of scope when working with custom reports, custom tables and segments.
Scope Types
Here are four ways that Google Analytics uses to scope dimensions and metrics:
- User: aggregation of sessions of the user and all hits (pageviews) collected.
- Session: aggregation of hits of a user during one session.
- Hit: captures each hit or pageview during one session.
- Product: only applies to websites where Enhanced Ecommerce is enabled. Shows product related data.
Let’s dive into each of these in more detail now.
User Scope
User-level data is collected in Google Analytics with the so-called Client ID. Be aware that in many cases the Client ID changes (or is invisible):
- Automatic deletion of cookies on Safari (ITP).
- Clearing cookies.
- Using different browsers.
- Using different devices.
- Using incognito / private browsing.
Cookies are aligned with browsers and not (always) people.
Example:
“You browse the Google Merchandise Store on Wednesday by iPhone, but decide to buy on Desktop a day later.”
In that case Google Analytics will record two users and two sessions.
However, in general you could say that all metrics and dimensions related to the user journey are “scoped” at the user level.
User – dimension examples
- User Type
- Count of Sessions
- Days Since Last Session
User – metric examples
- Users
- New Users
- Number of Sessions per User
Session Scope
Your session relates to one single visit to the website. In this section Google Analytics monitors your hits (events, pageviews, transactions).
This is completely different from the user journey as it only refers to one of the sessions of a user.
Session – dimension examples
- Source
- Medium
- Session Duration (Bucket)
Session – metric examples
- Bounces
- Bounce Rate
- Session Duration
Hit Scope
Any page you explore or any interaction that you trigger during a user journey is registered as a hit.
Hits are made up of pageviews, events and transactions.
Hit – dimension examples
- Page
- Hostname
- Event Action
Hit – metric examples
- Pageview
- Time on Page
- Unique Events
Product Scope
Product scoped dimensions and metrics only apply to websites that have implemented Enhanced Ecommerce. In most cases they refer to the purchase process on your website.
Product – dimension examples
- Product SKU
- Product Category
- Product Variant
Product – metric examples
- Product Detail Views
- Product Revenue
- Product Refunds
Custom Dimensions and Metrics
Until now we have only discussed metrics and dimensions that are readily available in Google Analytics.
The great thing is that you can extend your set of standard metrics and dimensions with a lot of custom ones.
- Google Analytics free version: 20 custom metrics and 20 custom dimensions.
- Google Analytics 360: 200 custom metrics and 200 custom dimensions.
You can enrich your Google Analytics data with a lot of other data points.
I have written two articles on these topics I recommend to check out.
- The Complete Guide to Leverage Custom Metrics in Google Analytics.
- Step-by-Step Guide to Leverage Custom Dimensions in Google Analytics.
It’s very important to consider the scope when implementing each of your custom dimensions.
This list will get you started right away!
Custom metrics come with just two “scopes”:
- Hit-level.
- Product-level.
I hope by now you understand the logic and thoughts behind scope in Google Analytics. Let’s dive into common mistakes when combining metrics and dimensions in Google Analytics.
Common Mistakes
Here are three examples of scope issues I have often come across when consulting clients.
# 1: Page and Sessions
The dimension “page” has a hit level scope combined with the “sessions” metric (session level scope).
When showing sessions by page, it’s actually showing by landing pages.
Page and Sessions
Landing Page and Sessions
It’s a bit confusing as Google Analytics still displays data when combining “Page” and “Sessions”. It would be great if they warn you in the future when combining an invalid set of metrics and dimensions.
# 2: User, Session and Hit Level Segments
This one is probably the most difficult to understand, but very important when working with Google Analytics data.
In Google Analytics you can set up session- and user-level segments. In addition, with a few tweaks you can define a hit-scoped segment as well!
Here are three examples with a quick description beneath each of those.
User: Pro Customers
- Pro Customers segment, set at the user level.
- Apply this segment to one of the reports to analyze Pro Customers’ behaviour across all sessions in the selected time period.
Session: Query Length Segment
- Query Length segment, set at the session level.
- Apply this segment to one of the reports to analyze visitors’ behaviour on AdWords sessions generated by two word queries.
Hit: Enhanced Ecommerce – Add to Cart – Segment
- Add to Cart segment, set at the hit (and session) level.
- Apply this segment to one of the reports to analyze visitors’ behaviour on sessions where Google Sunglasses are added to cart.
Sequential segments allow you to configure hit-level segments within a session or at the user level, incredibly powerful and not often used!
Concluding Thoughts
By now you should have a better understanding of the importance of scope and how you can apply it to your situation and data. And understanding how Google Analytics collects, processes and presents data is a crucial skill.
Misinterpreting or incorrectly configuring scope on your custom dimensions and metrics negatively impacts your reports and analyses.
It wouldn’t be the first time that someone misinterpretes the data and takes the wrong business decision because of scope issues.
Did you already consider scope when working with Google Analytics or is this concept relatively new to you? Happy to hear your comments!
One last thing... Make sure to get my automated Google Analytics 4 Audit Tool. It contains 30 key health checks on the GA4 Setup.
Aleksa Bozicic says
There is actually nothing wrong with #2 (page and users), every page view hit is tagged with client id. Now if you imagine a table that contains all page view hits you would get something like this:
PAGE Client ID
page 1 123
page 2 213
page 1 213
page 3 123
It is clear that this data can be aggregated by counting unique client ids per page, giving you page and users report you talked about:
PAGE USERS
page 1 2
page 2 1
page 3 1
We cannot sum users, because we would get 4 users when in fact we got only 2 unique users, that’s because the same user can visit multiple pages of our website. If we keep this in mind I do not think there is anything wrong users per page report.
Otherwise, really nice and helpful article.
Paul Koks says
Hi Aleksa,
You’re right! As long as you interpret the data here correctly, you are good to go.
To avoid confusion, I have removed #2 for now and might come up with another example.
Thanks again,
Paul
Doug says
Great stuff, Paul. I really appreciate your regular insights and updates. You make us all a little better at what we do!
Paul Koks says
Thank you Doug, I appreciate the heads up!
maria says
hi Paul, great article. Do you also have each scope’s dimensions and metrics full list to share?
Paul Koks says
Hi Maria,
Thank you for the heads up!
Unfortunately, I don’t have such a list, but you might want to take a look here:
https://ga-dev-tools.appspot.com/dimensions-metrics-explorer/
It will help you determine which metrics and dimensions go together.
Best,
Paul