Previous and Next Page Path in Google Data Studio
23 Nov, 2021 Read Time: 5 Minutes
I’m the biggest advocate for Google Data Studio you’ll likely meet, yet I can acknowledge that visualising page paths in Data Studio is a fiddly task. At the time of writing, Data Studio is yet to offer functionality to create dynamic, diverging pathway visualisations comparable to the Behaviour Flow report from Google Analytics.
What we can do is manually define a specific page (or set of pages) and visualise;
- a) What page people viewed prior, and
- b) What page people viewed after.
Scenario: I want to know more about how users are navigating through my site to reach our top-level blog page. I am also curious as to where they go from there -- are they likely to click a recent blog post, explore a dedicated topic subpage or do something else entirely?
So, let’s get cooking.
First, I built a table with the dimension as Previous Page Path, and have brought the metric of Page Views in twice, per the below. Bear with me here. In the second instance of Page Views, I can hover over where it says ‘AUT’, turning the icon to a pencil. Then, in the Type field, I selected Percent, and in the Comparison Calculation field Percent of Total -> Relative to corresponding data. This means I will have one column showing me the page view count, and the second column expresses this as a percentage. Neat.
Next, I added a table filter to include only Page equal to /blog. Optionally, I wanted to exclude /blog views that didn’t have a previous page view. For the sake of this exercise, I also wanted to exclude views that viewed the /blog page twice in succession. (Note: It can be worth analysing why people view the same page twice in a row -- it could be faulty tracking or poor UX. That’s one for another blog post). In the end, my filter looked like this:
And here is the resulting table, which shows me which pages were most viewed before reaching the blog:
As for which pages were viewed after /blog? Flip the configuration. I duplicated the table, and changed the dimension to Page (not Previous Page Path). I removed the filter, and built a new one which includes Previous Page Path equal to /blog, and (again optionally), excludes Page equal to /blog, to again filter out views to the same page twice in a row.
My result:
So, there we have it. A simple way of analysing the flow of traffic to and from any page on your website. If you're new to Data Studio, or want to up your reporting game, check out our Google Data Studio training course.
This post first appeared on the Data Runs Deep blog. Data Runs Deep joined the Jellyfish global family in 2020 and the knowledge-sharing continues under the Jellyfish banner in Australia and around the world.











