This is a 4 step process:
- MailChimp Campaign setup
- Connect Data Studio to the MailChimp Campaign Data
- Create Google Analytics Calculated Dimension Field in Google Data Studio
- Blend MailChimp & Google Analytics
Step 1: MailChimp Campaign setup
Always make sure that Google Analytics link tracking in MailChimp is activated for the campaign.
Step 2: Connect Data Studio to the MailChimp Campaign Data
In this step you will create at MailChimp Campaign Data Source in Data Studio. You do this by connecting Data Studio to your MailChimp Campaign Data.
You can either do this using a Data Studio Partner Connector for MailChimp, or you can use the solution described in my blog post called Get MailChimp API 3.0 Campaign Data in Google Sheets to get the MailChimp data.
Step 3: Create Google Analytics Calculated Dimension Field in Google Data Studio
The Google Analytics Link Tracking (Campaign Tagging) that you activated in Step 1, will in addition to the Campaign Name, also add the MailChimp Campaign ID in front of the Campaign Name like this: MailChimpCampaignID-Your_Campaign_Name.
By extracting the MailChimp Campaign ID from the Google Analytics Campaign Dimension in Google Data Studio, we now have a key that we can use when blending MailChimp and Google Analytics.
Edit your Google Analytics Data Source, and create a Calculated Dimension Field as shown below.
Below is the formula in a “copy + paste” friendly format.
Step 4: Blend MailChimp & Google Analytics Data Sources
You can create a Blended Data Source using different methods. My preferred “route” is to go through the top menu in Data Studio:
- Resources > Manage blended data
As described in the Google Data Studio help text about blending:
A blended data source is the product of a left outer join operation. In a left outer join of table A and table B, the result is all the records of Data source A and those records in Data source B that share the same key values.
This means that your MailChimp Campaign Data Source should be to the left, and the Google Analytics Data Source should be to the right when blending. The join key is the MailChimp Campaign ID.
Then add the Dimensions and Metrics in both Data Sources that are relvant for your report.
If everything went well, you have now blended MailChimp & Google Analytics in Google Data Studio.
Will MailChimp & Google Analytics always blend?
If you are running a MailChimp A/B-test Campaign, this campaign will not blend with Google Analytics. As shown in the image below, MailChimp A/B-test campaigns will show 0 clicks, and “null” Sessions, Transactions etc.
With that said, happy blending MailChimp & Google Analytics!