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!
Facebook
Twitter
LinkedIn
Email
Last Updated: May 26, 2022

Other Articles You Will Enjoy

Why Do Organizations Need Google Cloud Platform (BigQuery) If Snowflake Is Their Primary Data Warehouse?

Why Do Organizations Need Google Cloud Platform (BigQuery) If Snowflake Is Their Primary Data Warehouse?

Executive Summary There is no doubt that virtual data warehousing (the “cloud”) is becoming increasingly important and is the future of how enterprises use…

10-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.