Import MailChimp Automations in Google Data Studio

Few months ago I wrote an article focused on how to import Mailchimp Campaign data in Google Data Studio.
Now, thanks to your requests and to achieve a full implementation, I just build a new script useful to import the MailChimp Automations’ data into Google Data Studio.
How can we do this? Please follow the next steps.
Find MailChimp Automation’s ID
First of all, you have to create a new MailChimp API Key.
Please follow the path MailChimp Login > Account > Extras > API Keys > Create a Key to create and grab the key.
Now we need to grab the Automations ID created in MailChimp. In order to do this, visit the MailChimp Playground page and insert your API Key into the search box.
In the second page find “Automations” and click on it.
Now you have access to all your automations. Click on the first Automation in order to grab the MailChimp Automations’ ID, as showed in the following screenshot:
Repeat the previous steps for each automation you have set in your account.
Import Mailchimp Automations data in Google Spreadsheet
At this point we need to create a bridge between MailChimp and Google Data Studio using another Google product: Spreadsheet.
First step: create a new file and go to Tools > Script Editor
Second step: download and copy the MailChimp automations in Data Studio into the Script Editor
Third step: insert the MailChimp API Key into the var API_KEY and put the Automations ID into the var workarr. Remember, insert the Automations ID into the []
Fourth step: click on Save and then click on Run (the play button)
Fifth step: accept all the authorization requests
Now your Google SpreadSheet starts to be filled with the MailChimp Automation data as:
- Title
- Subject
- Opens
- Unique Opens
- Open Rate
- Clicks
- Subscribers Clicks
- Click Rate
You can set an automation to get fresh data using the script triggers. In the script editor click on Modify > Trigger current project > Add Trigger and choose when you want to start the update.
Import Google Spreadsheet data in Google Data Studio
The most easy part of the project is to connect the Google Spreadsheet file as a source in Google Data Studio and select which dimensions and metrics you want to represent.
Adding more info in Google Data Studio
If you want to understand the whole mail customer journey you can merge the MailChimp data with the post click information set in Google Analytics using the Google Data Studio’s blending feature.
Isn’t it cool, what do you think? Any suggestions are welcome!
Leave a Reply
-
Analytics Boosters
ItalyVicolo Buranelli, 2
31100 Treviso
Italy
-
Analytics Boosters
United Kingdom41 Devonshire Street
London
W1G 7AJ
United Kingdom
-
Analytics Boosters
United States80 S.W. 8th Street
33130 - Miami
Florida
United States of America
It sounds that MC turned off the APIPlayground functionality …
Do you have an update script to communicate ? I also tried this: https://www.analyticsboosters.com/data-viz/how-to-import-mailchimp-data-into-google-data-studio/ but I am getting an error message: TypeError: Cannot read property ‘appendRow’ of null
Thanks a lot for sharing 🙂
Hi Camille,
we are trying to find a workaround
thanks
Hi – great piece of code. Is there anyway to retrieve campaign data and automation data in the one script? I assume you would need to limit campaign data fields to only those available with automation data?
Any help would be appreciated!
This has been amazing and so helpful!
My Automations have multiple drips. continues to put one drip after another on the same line, which is ideal. But for some reason, they are in the proper order. Any idea on how to solve this?
Thanks again for making this available!
Sorry, I meant they AREN’T in the proper order.
Hi! There are 37 emails sent in my campaign, but the code got only 10 of them. You have an idea why this happen?
Tanks!
Hi Guilherme,
did you check the limits inside the code?
Thanks
Hello! Thank you so much for this information!
When I sync the data, all the e-mails sent appear on a row, instead of vertically. Is there anyway to fix this?
And also, can I organize the e-mails by date?
Thanks you!
I also noticed it has only imported 10 e-mails. Is there any way I can visualize all of them?
Thanks in advance!
Hi Luisa,
It looks like strange.. Do you set all the MCautomations’ ID in the script?
Thanks
I’m having the same issues! I only put in 1 Automations ID though, could that be a problem? I was hoping to see all the emails (+ the data) within that automation on seperate rows.
Any advice?
Hi Manon,
did you erase the second ,[‘automation2’]?
Thanks
Hi Enrico,
Yes I did. Not sure what else to try..
This is very strange.
Could you please drop me a line using the contact form?
Thanks
Enrico