Originally written by Michele Kiss on January 8, 2019

That’s So Meta: Tracking Data Studio, in Data Studio

In my eternal desire to track and analyze all.the.things, I’ve recently found it useful to track the usage of my Data Studio reports.

Viewing data about Data Studio, in Data Studio? So meta!

Step 1: Create a property

Create a new Google Analytics property, to house this data. (If you work with multiple clients, sites or business units, where you may want to be able to isolate data, then you may want to consider one property for each client/site/etc. You can always combine them in Data Studio to view all the info together, but it gives you more control over permissions, without messing around with View filters.)

Step 2: Add GA Tracking Code to your Data Studio reports

Data Studio makes this really easy. Under Report Settings, you can add a GA property ID:

You’ll need to add this to every report, and remember to add it when you create new reports, if you’d like them to be included in your report.

Step 3: Build the report

Tada! Blog post done!

Just kidding, there are a few more details I’d like to share.

The Real Step 3: Clean Up Dimension Values

Once you have tracked some data, you’ll notice that the Page dimension in Google Analytics is a gibberish, useless URL. I suppose you could create a CASE formula and rewrite the URLs in to the title of the report…Hmmm… Wait, why would you do that, when there’s already an easier way?!

You’ll want to use the Page Title for the bulk of your reporting, as it has nice, readable, user-friendly values:

However, you’ll need to do some further transformation of Page Title. This is because reports with one page, versus multiple pages, will look different.

Reports with only one page have a page title of:

Report Name

Reports with more than one page have a page title of:

Report Name > Page Name

If you want to report on the popularity at a report level, we need to extract just the report name. Unfortunately, we can’t simply extract “everything before the ‘>’ sign” as the Report Name, since not all Page Titles will contain a “>” (if the report only has one page.)

I therefore used a series of formulas (and newly-created dimensions) to manipulate the Page Titles:

Formula 1 (I called this “Page Title + > (Step #1)”)

What it does: Appends “>” to the end of all Page Titles. Now every page title contains at least one “>”

If a report has multiple pages, it will end up reading Report Name > Page Name > but that’s fine – we’re never going to actually use that value.

CONCAT( Page Title ," ›")

Formula 2 (I called this “Page Title Combined (Step #2)”)

What it does: Chooses which value to use – the original Page Title, or the one created by Formula 1. Where there is already a “>” in the Page Title, it will use the original Page Title. If there is no “>”, it will use the Formula 1.

CASE WHEN REGEXP_MATCH( Page Title ,".*›.*") THEN Page Title ELSE Page Title + > (Step #1) END

Formula 3 (I called this “Report Name – Final”)

What it does: Extract everything before “>”

This will give you just the “Report Name”, for every Page Title, regardless of the number of pages and the presence (or absence) or “>” in the original Page Title

REGEXP_EXTRACT( Page Title Combined (Step #2) ,'(.*).*›.*')

Why so many formulas? I tried combining them in to one uber-formula, and unfortunately Data Studio could not cope with that kind of adversity.

Step 4: Build your report

Here’s an example of one I have created:

Which metrics should I use?

My general recommendation is to use either Users or Pageviews, not Sessions or Unique Pageviews.

Why? Sessions will only count if the report page was the first page viewed (aka, it’s basically “landing page”), and Unique Pageviews will consider two pages in one report “unique”, since they have different URLs and Page Titles. (It’s just confusing to call something “Unique” when there are so many caveats on how “unique” is defined, in this instance.) So, Users will be the best for de-duping, and Pageviews will be the best for a totals count.

What can I use these reports for?

I find it helpful to see which reports people are looking at the most, when they typically look at them (for example, at the end of the month, or quarter?) Perhaps you’re having a lot of ad hoc questions coming to your team, that are covered in your reports? You can check if people are even using them, and if not, direct them there before spending a bunch of ad hoc time! Or perhaps it’s time to hold another lunch & learn, to introduce people to the various reports available?

You can also include data filters in the report, to filter for a specific report, or other dimensions, such as device type, geolocation, date, etc. Perhaps a certain office location typically views your reports more than another?

Of course, you will not know which users are viewing your reports (since we definitely can’t track PII in Google Analytics) but you can at least understand if they’re being viewed at all!

Want to learn more?

Join me for a half-day Data Studio training at ACCELERATE on January 24 and 25, in beautiful Los Gatos, California! I’ll be sharing a ton of Data Studio tips and tricks, ranging from how to get started, to some creative use cases.