Skip to main content
Data Runs Deep Menu

Main navigation

  • Home
  • Who We Are
    • Careers
    • What We're Up To
    • What We Believe In
    • Ethical Policy
  • What We Do
  • Google Marketing Platform
    • Analytics 360
    • Tag Manager 360
    • Salesforce and GA360
    • Google Analytics App+Web
    • Data Studio
    • Optimize
  • Google Cloud Platform
    • Google BigQuery
      • Google BigQuery Training
      • Google Analytics Integration
  • Consulting
    • Strategy
    • Implementation
      • Google Analytics Audit
      • Google Tag Manager Audit
      • Enhanced Ecommerce Implementation
      • Google Tag Manager
    • Analysis
      • Google Data Studio
        • Google Data Studio Case Study - Mona
      • UX Analysis
  • Training
    • Five Day Google Analytics Online Workshop
    • Advanced Google Analytics Training
    • Google Tag Manager Training
    • Google Analytics 360 Training
    • Advanced Analytics Bootcamp
  • Partnerships
    • Conductrics
  • Blog
  • The Flying Beagle
  • Merch
  • Contact

CASE Statement for Custom Channel Groupings

CASE Statement - Custom Channel Grouping
By: John Camilleri
Posted in
  • Google Data Studio
Article Date
May 08, 2020

Unfortunately custom channel groupings that are configured in Google Analytics aren’t available in Google Data Studio. To have the value of custom channel groupings in Data Studio we can use CASE Statements. This is done by editing the data source and using the ‘add field’ option. 

We then create a custom formula that will categorise or group our data in the way we need. 

Use case

If someone in your team has sent out a facebook post with the source medium ‘facebook / paid-post’ or with the medium ‘edm’ this will likely fall under the default channel grouping of ‘(other)’. By using the following CASE Statement we can regroup this into a channel named ‘Social - Paid’ or ‘Email’ respectively. See additional examples in text format at the end of this post.

These formulas can get quite complex so what we recommend doing is starting simple, one line at a time adding in a condition of how certain traffic should be grouped. We use the following template to help validate how our conditions have worked. Each table has an interactive filter so by selecting the (other) group you can see which Source / Mediums or campaigns are grouped under it. And then select your new grouping Social - Paid to see if your new condition has picked up something you weren’t expecting.

DRD Channel Grouping Monitoring Template - https://datastudio.google.com/s/vijyUqsbhQk

If it is going to be fixing an ongoing requirement, eg our email platform source can't be changed and it's being grouped under other, then it would also be worth updating the default grouping in Google Analytics to reflect it.

Channel Grouping an ongoing process as no campaign tracking process is without its flaws. Utilise the monitoring dashboard to check regularly on how things are being grouped and make required changes to keep it up to date. It goes without saying that a strong campaign process should be implemented to limit the need for too many updates of the custom channel grouping. Enjoy!

 

 

Text Examples

CASE

  WHEN Default Channel Grouping = "(Other)" AND REGEXP_MATCH( Source/Medium, "facebook / paid-post" ) THEN "Social - Paid"

  WHEN Default Channel Grouping = "(Other)" AND REGEXP_CONTAINS(Medium,  "edm|newsletter" ) THEN "Email"

ELSE Default Channel Grouping

END

 

CASE

  WHEN REGEXP_MATCH( Medium, "cpc" ) THEN "Paid - Search"

  WHEN REGEXP_CONTAINS(Medium,  "edm|newsletter" ) THEN "Email"

  WHEN REGEXP_CONTAINS(Source / Medium,  "display|smr" ) THEN "Display"

ELSE Default Channel Grouping

END

 


Related Posts

  • Default and Custom Channel Groupings in Google Analytics

    Article Date
    May 08, 2020

Get in touch

To find out more, email us on hello@datarunsdeep.com.au or complete a quick contact form.

Get in touch

Talk to us: 1300 737 885

08:30 - 16:30, Monday to Friday. We love to chat

Visit us, we’re at:

Level 8, 313 Little Collins Street Melbourne, VIC 3000

Footer

  • Home
    • Who We Are
      • What We Do
      • What We're Up To
      • Careers
      • Contact
  • Training
    • Google Analytics Training Courses
    • Advanced Google Analytics Training
    • Google Tag Manager Training
  • Consulting
    • Analysis
    • Implementation
    • Strategy
    • Google Analytics Audit
    • Google Tag Manager Audit
  • Google Cloud Partner
  • Google Marketing Platform Sales Partner
  • Bitcoin accepted here
  • Registered Looker Consulting Partner Melbourne
  • Twitter
  • LinkedIn
  • Google Plus
  • Blog RSS feed
Copyright © 2009-2021 Data Runs Deep Pty Ltd. All Rights Reserved. Google Analytics is a trademark of Google Inc.
Website by Marin Sekesan