Custom Content Groups in Google Data Studio

Customising Content Groupings or Channel Groupings within your Google Analytics account can be a great way of better attributing marketing efforts, or even just looking at the data a different way. But the issue, like all things GA, is that they only take effect once set up, and historical data won’t be included in the new setup.

There are still advantages to segmenting within the GA account itself, but there’s now a way to attribute all of your data using Google’s Data Studio (historical too!). By connecting Google Analytics to Google Data Studio, you can pull on the API to create new dimensions for use in your reports. These could include:

  • Custom Content Groups
  • Custom Channel Groups
  • Sales Regions

The flexibility of Data Studio allows you to set up a variety of different groups and lets you visualise them side-by-side. For instance, if your site is a clothing brand, you may want to know how men’s products perform vs women’s products. You may also want to know how each item performs, whether this is jeans, shirts, dresses, shoes etc. Both are possible.

How it’s done in Data Studio

This is possible using calculated fields and using the CASE WHEN function available. Here’s an example of how it works:

CASE

WHEN Regex_Match(LandingPage, ‘/mens’) THEN “Mens”

WHEN Regex_Match(LandingPage, ‘/womens’) THEN “Womens”

WHEN Regex_Match(LandingPage, ‘/kids’) THEN “Kids”

ELSE “Other”

END

So, what is this doing?

The example above uses the Landing Page dimension to match with Regular Expressions (Regex) the URL of the page. It then renames the groupings to Mens, Womens, Kids or Other to be more user-friendly in the report.

This creates a dimension you can use in your reports, with the output looking something like this:

Google Data Studio graph

Landing page isn’t the only option here either – you have the API connection to play with, meaning you could group different pages, mediums, sources, countries, cities, campaigns, and more!

Explore how you can segment your data, and gain more insight into how your users are interacting with your business.

Last June Google’s Data Studio quietly added data export functionality, you can read about that here.

Related Posts