I am amazed at how little attention the new Google Data Studio has gotten. I’ve been working with complex systems out there; There are a ton of “data studios” which are extremely complex that need trained people to operate and deliver something (usually not that pretty) on the screen.
The Google Data Studio is pretty simple and offers great integration of the default data sources, especially Google Analytics. More important they also offer Google Sheets support which means, everything you need to import you can simply import into Google Sheets (which has various Plugins for APIs) and then get it into Google Data Studio.
Here is a simple example but powerful of Google Data Studio. We will implement “Content Groupings” for historical data.
What Are Content Groupings?
Content Groupings let us compare different parts of the same website. For instance:
- The news part of a website
- subpages displaying product information
- parts like FAQs, forums,…
- an online shop
- corporate information like job listings or the legal notice
The target groups for those kinds of content may differ. Accordingly, the visitor intent and thus key metrics like conversion rates, bounce rates and the likes vary quite a bit.
We’d also might be interested in comparing specifically designed SE landing pages versus blog entries or the likes for their effect on conversion rates.
So let’s try to implement this feature in Google Data Studio to analyze historical data. The steps involved are pretty simple.
Step 1: Create a new data source (your Google Analytics view)
Step 2: Create a new “calculated metric” which will be your content grouping to group the page URLs into the content groups.
Step 3: Connect your data source to a new Data Studio Report
Step 4: Make a pretty report
Step 1: Create a New Data Source
Go to the Google Data Studio, sign up or sign in; Create a new data source by clicking the large “+” on the bottom right. Then select Google Analytics, your property and data view. Don’t forget to give it a name.
Then click on “connect”. You will be redirected to a long list of metrics and dimensions that are now in that data source.
Now we will create a new metric out of the old ones.
Step 2: Create the Content Grouping
To create a new calculated metric, the content groupings, select the blue “+” icon on top of the “Field” column.
Give it a name, I called it “Content Group”.
The interesting part is the formula. For a reference on the type of formula we want to create, a CASE WHEN formula, you can check out the Google Support Answer.
The formula we will use is the following (I’ll explain in a moment):
CASE WHEN REGEXP_MATCH(Page, “.*(/basic/).*”) THEN “Basic Content” WHEN REGEXP_MATCH(Page, “/about/”) THEN “Aboutpage” WHEN REGEXP_MATCH(Page, “/$”) THEN “Homepage” ELSE “Blogpost” END
Let’s dissect the formula. It’s a CASE WHEN formula using regular expression matches. We have four different cases.
- If the imported dimension “Page” contains the phrase /basic/, which I reserve for basic overview articles, I want the content group to be “Basic Content”.
- If the imported dimension “Page” exactly matches “/about/“ then I want it to be marked as “About Page”
- If it’s the home page I wanted it marked as one and
- if it’s none of the above, it will be a blog post (which as they are the only purpose for this blog to exist, have the shortest and most readable URLs possible.)
Step 3: Connect your Data Source
You can now either put the data source right away in a report (with the button on the top right) or create one and then add this data source.
Step 4: Make a Pretty Report
Two specific things you could add are for instance a table displaying the sessions in a certain period (see left side) or a graph displaying trending graphs for each different content group. You can create that by selecting as “break down dimension” your new metric “Content Group”.