Google Analytics provides a huge list of dimensions and metrics in its API, but it is important to understand the different levels of granularity represented.
Some dimensions are session level dimensions- they relate to entire sessions, and some dimensions are page level dimensions and relate to a specific page.
Lets look at an example- we can look at a report in the GA user interface and see pageviews by page. If we do a query using Analytics Canvas of pageviews by landingPage, we find that the number of pageviews does not match!
Why is there a difference in Session vs Page level dimensions?
Landing page path is a session level dimension. It is the first page in a user’s session. PagePath is a page level dimension, it is used to get metrics on a page by page basis. The Google Analytics view above is showing page path- the API Query made by Analytics Canvas uses landing page. If the query in Analytics Canvas is edited (or another query created, no limit on how many queries) to use pagePath as the dimension, the pageviews match exactly.
Because we are using landingPagePath as the dimension we are not getting pageviews for that page, but we are taking the user’s session and counting the total number of page views in that session (Resulting in a larger number of page views).
In effect- instead of asking Google Analytics “How many pageviews where there for the page?” we are asking “How many pageviews in total were there for sessions where this page was the landing page?” Confused? Don’t be.
Let take a closer look. Say, we are looking at three sessions below.
When we query these data by the session level, using the landing page path dimension, we will get six pageviews for the home page. That’s because the total number of pageviews per session where the home page was the landing page is six.
Setting the page path as the dimension for the query will give two pageviews for this data set, as now it is counted on a page level.
Obviously, if you want to know the page views for a specific page you are looking for the later version. To build this query, you will need to set page path as your dimension and pageviews as your metric as shown below. The other query is useful too, however, to find which landing pages encourage your visitors to view more content- a different, but still very useful question.
Google Analytics is a robust tool with a variety of metrics and dimensions. Navigating Google API can be challenging even for experienced users. Analytics Canvas provides you with the ability to produce reports, add filters and make customizations that are tricky or impossible to do within Google Analytics itself. Give Analytics Canvas a try with full-feature trial version. If you need a bit of help getting started, contact us. We are ready to help you through your learning process.
Whenever you’re ready… here are 3 ways we can help you with your Data Studio reporting challenges:
- Speed up Data Studio reports
- Resolve connection and access issues between your DB and Data Studio
- Clean and prepare data sets prior to reporting in Data Studio
Ready for the next step?
- Start a 30 day risk-free trial. No credit card or sales call required.
- Schedule a demo for you and your team.
- Contact us to discuss plans and pricing or activate your subscription
Wondering if Canvas is right for you? Check out the related articles to learn more about our Data Studio Partner connector.