⚠️ This is an old post
It's possibly been exported and imported from at least three different blogging platforms over the years. That probably means, at best, there are broken images and links. If the post is technical in nature, any advice is probably out of date and irrelevant. Or it is really old, it was the wafflings of a teenager with too much time on his hands working out what blogging is… If it is the latter I would probably cringe if I re-read it. But it's here because it's part of my past, not my present.
You've been warned! Onwards…
Today I’ve been trying to replicate the content drilldown function from Google Analytics through their Core Reporting API. The solution I came to requests pagePathLevel# in the dimension, and then filters on various pagePathLevel#:
For example if you wanted to the page views for the content drilldown at /level1/level2/level3 you could run this:
metrics=PageView, Sessions, etc
A handy tool to test these queries is the Google Analytics Query Explorer.
In my case I wanted to get a list of the most popular exhibitions at the V&A. The URL structure is: content/exhibitions/[expo-slug], so the query I am running is:
Hopefully this will help someone else.