Integrate Google Analytics tracking with Mailchimp

Google Analytics Mailchimp integration

So you use Mailchimp and designed the ideal e-mail campaign? You felt great about the copy and the visuals and pressed SEND. Great! After your e-mail is sent, Mailchimp provides you with reports and who received the email, who opened it and who clicked it. It also has a section about those pesky unsubscribers. But now you’re thinking:

“That’s great but what if I could track the performance of my e-mail campaigns based on what my subscribers do once they reach my site?”

– every e-mail marketer ever

In this post, I will show you how to integrate Google Analytics tracking with Mailchimp and how to track e-mail performance, with the help of Google Tag Manager.

Ready? Let’s get started!

Linking Google Analytics with Mailchimp

The first thing you want to do is go to your Mailchimp account and go to Integrations. This is where you will see which external services can be linked to Mailchimp. Down the list, locate the Google icon for Google Analytics, Docs, and more. Click to connect and follow the authorization process until you’re back at the Integrations screen. Frankly this step should be optional but it’s required to turn on automatic campaign traffic. We will see how you can still do this manually later on.

Google Analytics - integration in Mailchimp
List of integrations in Mailchimp, including Google Analytics.

Enabling tracking for your campaign

From my recent post on campaign tracking, you know you MUST track all your marketing efforts using UTM codes; in your email’s links for example. So when you’re in design mode in the Mailchimp interface, should you tag each link? Wait, before we get there, we can turn on Google Analytics tracking when we create the campaign! Now that you have enabled Google Analytics integration, go ahead and create/replicate a new campaign.

Look at the bottom of the campaign overview screen and locate the grey box that mentions Google Analytics:

From the campaign overview, click the Edit link under Settings & Tracking

In the Settings & Tracking box, make sure you check three following boxes:

  • Track clicks
  • Track plain-text clicks
  • Google Analytics link tracking

You will also notice that the text box next to “G.A. link tracking” is filled with encoded characters which really represent:

  • My campaign’s name (My campaign)
  • the date I created the campaign (2019/03/08),
  • with spaces encoded as %2B.

Just enabling that G.A link tracking checkbox will automagically track links and generate UTM link parameters in each link fo your e-mail, with the following structure:

  • utm_source = {Your list’s name}
  • utm_medium = email
  • utm_campaign = {some campaign identifier} {the campaign title you put in the box}

Note that Mailchimp can also use up utm_term to store subscriber tokens.

There! That’s all there is to it: you can now enjoy newsletter tracking in Google Analytics!

PRO TIP

When replicating campaigns, make sure you update your campaign title!

Tagging links manually

So you’re feeling masochistic? Have I got a treat for you! You can leave the Settings & Tracking boxes unchecked. All you need to do now is go to your campaign’s design mode and manually insert your UTM parameters in each link!

If you have only a handful of links, this can be done rapidly. If you have a large number of links, you’ll be tempted to copy/paste the same link over and over, or at least the same UTMs – which can be time-consuming and actually make your reporting underwhelming.

But let’s assume I want to track which creative element or which bit of copy drove the most clicks. To achieve that, I’ll want to use utm_content to tell me what was clicked.

Google Analytics mailchimp insert link
Adding only utm_content to the link, specifying I clicked on my e-mail’s title

In the above example, I still have tracking enabled so I just added utm_content to my link. This means we will have the following URL after Mailchimp sends out the email:

https://juliencoquet.com/en/?utm_content=title&utm_source=Newsletter+EN&utm_campaign=53e3e1552f-My%252BCampaign%252B2019_03_08&utm_medium=email&utm_term=0_6cee7a8285-53e3e1552f-

This translates to:

https://juliencoquet.com/en/
?utm_content=title
&utm_source=Newsletter EN <-- My Mailchimp's list name
&utm_campaign=53e3e1552f-my Campaign 2019_03_08
&utm_medium=email
&utm_term=0_6cee7a8285-53e3e1552f- <-- a subscriber-related token

And utm_content is really the only UTM parameter you can play with while tracking settings are enabled. Source, medium and campaign are automatically filled out.

Worse: assuming you had inserted utm_source or utm_campaign manually with tracking turned on, Mailchimp will overwrite your parameters. This is because if a UTM parameter is used twice, thrice or more, the last (rightmost) value will overwrite the previous value(s).

https://mysite.com/?utm_source=foo&utm_source=bar&utm_source=yolo

In the URL above, utm_source will end up with a value of yolo, ignoring foo and bar. So be careful when inserting UTMs manually!

Training wheels are off!

So you unchecked the boxes in your Mailchimp campaign’s Settings and Tracking and are now ready to type in links manually. I salute you for your courage and your dedication! When in doubt, refer to my UTM campaign tracking guide or use the URL builder.

What if I want to use campaign IDs?

Ah, yes, you must have read my post on UTMs and are now hooked on campaign IDs! If you want, you can maintain a CSV file containing IDs that correspond to each trackable element in the newsletter. That way you only have to mange short URLS.

More complicated? Yes.
More powerful? Most definitely! 😉

Where is my data?

Mailchimp links can end up generating this nice little report:

Super sexy campaign names ^_^

As you take this information even further, you can look for advanced metrics associated with this campaign, such as conversion rate!

Viewing your conversion rate for that February e-mail campaign, not too shabby!

So always build reports that take into account the Email channel and your e-mail campaigns. Use them with secondary dimensions for landing pages, events, etc.

Better: use segments or a dedicated view, filtered to only include medium=email

And of course, you should definitely be using Google Data Studio!

Should I really bother with all this tracking?

The short answer is: yes, absolutely!

The longer answer is: Mailchimp’s campaign report can leave you frustrated so you need more data!

What Mailchimp will show you in reports:

  • Number of e-mails sent
  • Number of bounces/unsubscribe
  • Number of e-mail opens (unreliable / questionable because it implies that the recipient’s e-mail client or webmail loads images)
  • Number of clicks and which clicks were clicked by whom

However, Mailchimp will not show you:

  • which page subscribers really landed on
  • what your subscribers do once they’re on your site
  • how much subscribers contribute to your goals (engagement, eCommerce, etc.)

Sure, Mailchimp has a Goals module but the data for Goals stays in Mailchimp with virtually no useful integration unless you know how to use their API.

Extra credit: using Mailchimp Merge Tags in URLs to track users in Google Analytics

If you used Mailchimp merge tags, you know you can use placeholders to send data about your subscriber along with the e-mail, either in your copy or in your links. There are lots of fields you can use and insert in your design so take a look at the Merge Tags Cheat Sheet.

For instance, *|USER:UID|* is a placeholder for my subscriber’s ID. Mailchimp will replace it an anonymous number. In the screenshot below, you will see how to insert it in a link:

Notice that I am passing the subscriber ID to my URL with parameter uid. Now we need to capture that parameter with the help of a bit of JavaScript code… or Google Tag Manager!

You can go to your container and create a new variable based on the URL where you capture the “uid” part of the querystring (the part after the “?”) as shown below:

Create a variable just to capture the uid URL parameter

Now you can use that variable in your Google Analytics settings variable so that users coming from the newsletter with be recognized next time they return to your site!

Pretty powerful stuff, right? Just don’t forget to create a user-ID-enabled view in order to collect that kind of data.

As I am sure you guessed already, you can use Mailchimp Merge Tags to pass information to Custom Dimensions and more!

Actually, I recommend copying that Mailchimp subscriber ID in a custom dimension. Why? So that you can pull reports in GA of specific engagement points for a given subscriber ID. This can be imported back into Mailchimp and help you drive better campaigns!

In closing

You just went through a fairly comprehensive guide to e-mail tracking in Mailchimp using Google Analytics. Congrats for making it to the end 🙂

Here are a few takeaways just in case:

  • Turning on Google Analytics automatic integration in Mailchimp only takes a couple clicks and it totally worth it
  • Unless you *need* to track each clickable element in the e-mail, stick to automatic tracking
  • You can now start re-thinking CRM and outreach strategies by using this guide

Of course, I’ve been mentioning Mailchimp and Google Analytics but this methodology can apply to other emailing and analytics vendors 😉

What about you? How do you integrate email and analytics? Have you adopted similar best practices? Something totally different?

Let me know in the comments 😉

Author: Julien Coquet

Julien Coquet is a veteran of digital analytics, with 20+ years of experience in al things data, web and app. He is currently Senior Director of Data, EMEA @ Monks.

10 thoughts on “Integrate Google Analytics tracking with Mailchimp”

  1. Nice way of thinking Julian! However, looking ar unneccesary data collection: putting data in the url that leads back to personal details seem contradictionary to any gdpr best practises. Any way you could cover such data in less easy extractable ways?

    1. Hi Etienne and thanks for the feedback!
      Normally I’d say you’re right: passing as little user information as possible is better.
      Having said that, and in the light of GDPR, personal data includes any data that, through reasonable effort, could be used to identify an individual. In that regard, a Mailchimp subscriber ID hardly qualifies as personal data, unless one has access to my subscriber’s database. Furthermore, you can choose to only use Mailchimp lists based on subscribers that have explicitly provided consent during signup.

      Cheers,

      Julien

  2. Awesome article, thanks Julien. This is the only advanced article I’ve found on integrating MC and GA. Unfortunately, I had to figure most of this out on my own through trial and error because I didn’t see your article! You did provide some extra tips that I’ll be sure to use when our email list gets bigger. Drives me crazy that Mail Chimp doesn’t let you add custom utms except campaign & content. This seems like a no brainer to me and shouldn’t be that hard for them to integrate.

  3. Hi Julien,
    Interesting as a starting point.
    But, I was actually looking for a little more.

    I have lot of website visitors leaving my website with abandoned cart. But who don’t sign in and might have suscribed newsletter.

    So, i am looking for a way to trigger abandoned cart email to those visitors who left.
    And I thought it could be easy to use google analytics add to cart goal/event.

    I connected my google analytics to mailchimp, but seems like google analytics doesn’t important any information to mailchimp.
    Si, I thought I could do so through zapier. But didn’t find a way.

    Any tips to give about it ?

    Thanks 😉

    1. Hi Philippe,
      I presume you read my post extensively but if you missed it, implementing User ID means you can segment users in GA, especially those who reached a key page (such as shopping cart) but did not convert.
      You can then use those user IDs to create a new Mailchimp list and target undecided shoppers.
      This of course implies that said visitors gave consent to be tracked.

      KR,

      Julien

  4. Hi,

    Why is it not necessary to connect with a Google Analytics UA-code? I don’t understand how the email campaign connects to the right property. Has someone any idea?

    Jaimy

    1. Hi Jaimy,
      this method ensures links to the site contain the right UTM IDs.
      The rest is up to the site’s tracking, so basically to which property ID you’re using on the site.

  5. Nice article – I’m interested in tracking the source / medium of leads who sign-up through my mailchimp form. Is there a way to have that information passed from google into mailchimp when they sign-up? At the moment I have to go and cross reference this using the User Explorer in GA and segmenting the goal conversion which takes some time!

    1. Hi Sam,
      source/origin counts as personal info especially if you’re capturing it in a third system such as Mailchimp so I’m assuming you collected consent to track personal information?
      You would need to add hidden form fields mapped to Mailchimp custom values and populate those using JavaScript.

  6. Hi Julien,
    Thanks for the great article. I actually only came here to learn about getting the userID feature working in GA and getting Mailchimp to be the assigner of this value. I’m grateful to have found this article. I wanted to share an issue that I’m running into though. Upon testing and investigating, the *|USER:UID|* field doesn’t seem to change when using the live preview in Mailchimp. Additionally, when I look into this particular tag, it seems that the value is not supposed to change when the contact changes. Here’s what the Mailchimp documentation says about this merge tag:

    “Displays the “u” parameter from your hosted Mailchimp audience forms.”

    Could it be a typo and you were referring to a different Mailchimp value to put into the links?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.