Where Are My Custom Marketing Channels in Data Studio?

Where Are My Custom Marketing Channels in Data Studio?
Estimated Reading Time: 3 minutes

Google’s free Data Studio tool is amazing for visualizing and reporting on your data. It also plays very well with other Google tools, like Google Ads and Google Analytics. However, it does have some limitations. One of those limitations is that it cannot pull in your custom channel groupings from Google Analytics.

Fortunately, all is not lost as you can use Data Studio’s calculated fields feature to build your own custom channel mappings in Data Studio. Inside your Google Analytics source, set up a calculated field. Then, input the code below:

CASE 
WHEN ((Source=”direct” AND Medium=”(not set)”) OR Medium=”(none)”) THEN “Direct” 
WHEN Medium=”organic” THEN “Organic Search” 
WHEN (Social Source Referral=”Yes” OR REGEXP_MATCH(Medium,”^(social|social-network|social-media|sm|social network|social media)$”)) THEN “Social” 
WHEN Medium=”email” THEN “Email” 
WHEN Medium=”affiliate” THEN “Affiliates” 
WHEN Medium=”referral” THEN “Referral” 
WHEN (REGEXP_MATCH(Medium,”^(cpc|ppc|paidsearch)$”) AND Ad Distribution Network!=”Content”) THEN “Paid Search” 
WHEN REGEXP_MATCH(Medium,” ^(cpv|cpa|cpp|content-text)$”) THEN “Other Advertising” 
WHEN (REGEXP_MATCH(Medium,”^(display|cpm|banner)$”) OR Ad Distribution Network=”Content”) THEN “Display” ELSE “(Other)” 
END

This will build your custom channel map for most standard data sources and mediums.

To add a custom channel, insert another WHEN clause like in this example below:

WHEN Source=”mysource” THEN “mysource”
WHEN Medium=”mymedium” THEN “mymedium”

You can also modify the channel mappings listed above; for example, maybe you call your email “Direct Mail” or you have a source of “Affiliate” instead of a medium.

Note that WHEN clauses are executed in order. Therefore, a session will map to the first WHEN clause seen.

A good way to implement a custom channel map in Google Data Studio is to look at your current custom data map and then copy the values over to this code.

For example, in the screenshot below I created a custom channel for traffic coming from my main domain to another site:

To build this in Data Studio, I would use the following code:

WHEN Source=”maindomain” THEN “Main Domain”

Which looks like this using the full code from above:

CASE 
WHEN ((Source=”direct” AND Medium=”(not set)”) OR Medium=”(none)”) THEN “Direct” 
WHEN Medium=”organic” THEN “Organic Search” 
WHEN (Social Source Referral=”Yes” OR REGEXP_MATCH(Medium,”^(social|social-network|social-media|sm|social network|social media)$”)) THEN “Social” 
WHEN Medium=”email” THEN “Email” 
WHEN Medium=”affiliate” THEN “Affiliates” 
WHEN Medium=”referral” THEN “Referral” 
WHEN (REGEXP_MATCH(Medium,”^(cpc|ppc|paidsearch)$”) AND Ad Distribution Network!=”Content”) THEN “Paid Search” 
WHEN REGEXP_MATCH(Medium,” ^(cpv|cpa|cpp|content-text)$”) THEN “Other Advertising” 
WHEN (REGEXP_MATCH(Medium,”^(display|cpm|banner)$”) OR Ad Distribution Network=”Content”) THEN “Display” 
WHEN Source=”maindomain” THEN “Main Domain”
ELSE “(Other)” 
END

And it looks like this in Data Studio. First, the code:

Second, the data:

With this knowledge, you can easily create custom channel mappings to better display your or your client’s channels as you want to see them.

Have additional questions about Data Studio?

Our team of experts is here to help!

Author

  • Ben Brooks

    Ben Brooks is a Senior Lead Digital Analytics consultant at InfoTrust. In this role, he works with clients to understand their analytics needs and concerns. He then works with developers to implement analytics to support these needs, and end users to understand and visualize the results of said analytics. In his free time, he can be found taking photographs of landscapes and transportation subjects, producing short videos, reading, and walking his miniature dachshund Bella. Ben lives in the Seattle, Washington area.

Facebook
Twitter
LinkedIn
Email
Originally Published: May 26, 2022

Subscribe To Our Newsletter

May 26, 2022

Other Articles You Will Enjoy

Unveiling the Secrets of the Google Analytics 4 BigQuery Schema: A Guide for Marketers

Unveiling the Secrets of the Google Analytics 4 BigQuery Schema: A Guide for Marketers

Understanding how your users interact with your app or website is crucial for any marketer. Google Analytics 4 (GA4) offers a powerful tool for…

8-minute read
Advanced Analysis Techniques in Google Analytics 4: How to Use AI-Powered Insights and Predictive Analytics for Effective Marketing

Advanced Analysis Techniques in Google Analytics 4: How to Use AI-Powered Insights and Predictive Analytics for Effective Marketing

AI-powered insights and predictive analytics are revolutionary tools reshaping the modern marketing landscape. These advanced analytics techniques, particularly prominent in Google Analytics 4 (GA4),…

8-minute read
How to Integrate Google Analytics 4 with BigQuery for Enhanced Data Analysis and Reporting

How to Integrate Google Analytics 4 with BigQuery for Enhanced Data Analysis and Reporting

Has your business found that its reporting needs require advanced analysis of your analytics data beyond what is practical in the Google Analytics 4…

4-minute read

Get Your Assessment

Thank you! We will be in touch with your results soon.
{{ field.placeholder }}
{{ option.name }}

Talk To Us

Talk To Us

Receive Book Updates

Fill out this form to receive email announcements about Crawl, Walk, Run: Advancing Analytics Maturity with Google Marketing Platform. This includes pre-sale dates, official publishing dates, and more.

Search InfoTrust

Leave Us A Review

Leave a review and let us know how we’re doing. Only actual clients, please.