Email Tracking in Google Analytics with MailChimp


This is Part 1 of a 2-part series. >> Part 2

The Problem:

You have some data about your email marketing (for example, open rate) in your email marketing software, and data about visits to your site from email marketing elsewhere (namely, Google Analytics).

Wouldn’t it be great to see an end-to-end view of all that data in one place? With Universal Analytics and the Measurement Protocol, you can, and I’ll show you how, step-by-step.

Today’s post will kick things off by looking first at how to track email opens in Google Analytics. My next post will show how to tag a visitor with a unique ID, so you’ll be able to track them across devices (like in the image below). Finally, we’ll tie it all together so you can see visitor behavior from opening your email to visiting your site and (hopefully!) converting.

Email tracking in Google Analytics with MailChimp

The Solution:

We’ll use MailChimp – a popular (and free, if you want to play along) email marketing manager to walk you through how to set this up, but you should be able to apply the same steps to any email marketing solution you use.

* Disclosure: LunaMetrics uses MailChimp to power our email marketing. However, this post was written independently, without their knowledge or input.

I’ll assume you are comfortable working with UTM campaign parameters to track your marketing activities (you’ll need to know this). For a refresher, check out the following articles:

About Custom Campaigns – Google Analytics Help Center

Best Practices for Creating Custom Campaigns – Google Analytics Help Center

4 Steps to Better Campaign Data in Google Analytics – Dorcas Alexander / LunaMetrics

Google Analytics Campaign Tagging Tool – Jim Gianoglio / LunaMetrics

Step 1:

First things first. You’ll need to create a new custom metric in the Google Analytics admin interface for your Web Property.

Log in to Google Analytics, and click on Admin in the top right. Select the appropriate Account and Web Property, and click on Custom Definitions under the Web Property column. Then click on Custom Metrics.

Custom dimensions and metrics in Google Analytics


In the next window, click on the New Custom Metric button, and give your custom metric a name, formatting type, minimum and maximum value, and make sure the box is checked for Active. I recommend the setting shown below:

Custom metrics in Google Analytics

Step 2:

Next, you’ll need to log into MailChimp (or whatever you’re using) and start a new email campaign. For our example, we’ll use the “Regular Ol’ Campaign” option.

MailChimp - Create a Campaign

Step 3:

Start by following the wizard in MailChimp – it’s a series of 5 steps to launch your campaign:

MailChimp campaign steps

Do the first two – Recipients and Setup – this is where you decide which list your sending to and some other basic information, like subject line, reply-to email address, etc.

Step 4:

Design your email. This is where you choose your template, or work from scratch, to create the content of your email. If you want to follow along with this example, select the Drag & Drop Editor.

MailChimp drag and drop editor

Step 5:

Choose a template to get started, then create your email. Include all the images, headlines, text, and buttons that will make your list subscribers sing your praises, click on your links and buy your products.

Step 6:

Now the good part. You need to add a Text content block to your email. I suggest at the bottom, but anywhere will work.

Adding text block to email in MailChimp


Now you need to edit the content of this block. Click on the angled brackets icon (pictured below) to edit this content in code view.

Tracking email opens in MailChimp

This is where the magic happens – you ready? Put in the following:

<img src=”*|UNIQID|*&t=event&ec=email&ea=open&el=*|UNIQID|*&cs=newsletter&cm=email&cn=062413&cm1=1″ />

Let me break that down for you.

<img src= … Basically, you’re fooling the email into thinking it has to load an image. There’s no real image file, but the source that we specify is the GET request that sends our data to Google Analytics. So when your email tries to fetch the “image,” it’s actually sending the data for you. Keep in mind, the email recipient has to allow images for this to work. This is the API endpoint for the Measurement Protocol. In layman’s terms, this is where we’re sending the data. The data that’s being sent comes next, in the form of query parameters.

v = 1 Protocol Version (required)

tid = UA-XXXXXX-YY Tracking ID / Web Property ID (required)

cid = *|UNIQID|* Client ID (required). This anonymously identifies a particular user, device, or browser. The value – *|UNIQID|* – is a dynamic parameter (aka merge tag) in MailChimp that will fill in the user’s MailChimp ID.

t = event  Hit type (required). We’re tracking this with event tracking, hence the event hit type.

ec = email Event Category

ea = open Event Action

el = *|UNIQID|* Event Label

cs = newsletter Campaign Source

cm = email Campaign Medium

cn = 062413 Campaign Name

cm1 = 1 Custom Metric 1

You can learn more about these parameters by reading up on the Measurement Protocol Parameter Reference guide.

Keep in mind, you want to be consistent in your naming conventions for your campaign source, medium and content. Any links in your email that go to your site should be tagged with the same source, medium and campaign as above. Following the example above, your links would be tagged as follows:

Step 7:

Finish the remaining steps of the email campaign wizard (Plain-Text and Confirm) and send out that email!

Step 8: (optional)

Log into Google Analytics and open up your Real Time reports to see people opening your emails in real time. Can I get a “woop-woop?”


The results:

Now, when someone opens up your email, it will record an Email Open as a metric, and you’ll see this showing up in your event tracking reports:

Email opens in Events Reports


In Part 2, I show you how to connect visits from the same visitor across devices. This will let you see if John Doe opened your email on his phone, then later visited your site from a link in the email on his desktop, then came to your site from a paid search ad on his tablet.

Jim Gianoglio is a Manager for the Analytics & Insight department. He works with implementation, analysis and training of Google Analytics and Google Tag Manager. Before focusing on analytics, he led the SEO campaigns of Fortune 500 companies in the insurance, retail and CPG industries. Things you didn’t know about Jim: he’s biked from Pittsburgh to Washington DC in 41 hours, roasts coffee beans and has done voiceovers for TV commercials.

  • Yoray

    woop-woop! 🙂
    cool post luna

    cid = client id – not user id

  • Thanks Jim. That’s a neat trick. Also, I didn’t realize Google had this API to simulate a website visit.

    Do you know if other email service providers, like ConstantContact fill the “cid = *|UNIQID|*”?

    Also, I have noticed that you guys do what you preach. There are always some UTM tags in my browser URL when I visit this blog.

  • Hi Jim! Thanks for this! I was looking for a way to get data from GA that I can compare with what MailChimp is providing.

    Subscribed and shared! Looking forward to the next post.

  • Nice implementation Jim. Very helpful and innovation idea. If you could match the CID to link user session you could find initial traffic source details to email openers with more dimentions .

  • @Yoray – thanks for the “woop-woop” 🙂

    @Puru Choudhary – I haven’t looked into any other email providers yet, but I’m sure many of them will have some way to dynamically add these parameters. For example, in Constant Contact you can use “contact variables” to fill in this info. Look at page 34 of this doc for more details:

    @Niroshan – I’ll cover that in the next post 😉

  • Clever, definitely going to try this at some point!

  • James

    Thanks for a great tip!

    We’re looking into whether we can insert a mailchimp merge tag for the cn= campaign name element, so that we can ‘set and forget’, as every other element will stay the same for every campaign.

    Our best guess so far is *|CAMPAIGN_UID|* – will this work?

    • @James –

      The *|CAMPAIGN_UID|* merge tag only pulls in the unique ID for the campaign (for example, “df6195c352”). If you select the option in MailChimp to “Add Google Analytics™ Tracking To All URLs” in the Setup step, you then have to type in the “Title for campaign.”

      So if you type in “My Campaign” as your campaign title, and someone clicks on a link in your email, it will show up in GA with utm_campain=df6195c352-My+Campaign

      So if you want the campaign name for your email opens to match the campaign name for visits from that email (of course you do!) then you’d want to use:


      If your campaign name stays the same for all your emails, then you can just “set and forget”, like you mentioned. But if you campaign name changes, you’d have to manually change it (I haven’t found a merge tag for campaign title).

      Also, here’s the list of merge tags available – there’s all kinds of other info you could be pulling in:

  • This is a fantastic post. Using this great API trick gives some great data insights into email marketing. Often, many email management software companies (aweber)say they provide this type of analytics insight but actually don’t give as much information as detailed in this post. Thanks Jim, looking forward to your next post.

  • Oh Jim, this is pretty amazing, just because I was looking for more info about Google Analytics and now I found this. AS you can see, I am more on d-i-y seo that is why a post such as this is a gem to me. Thanks, I will try this out.

  • This is a very creative approach, but doesn’t it violate google analytics regulations on personally identifiable information (PII)?

    • Rob – that’s a very good point! In the case of a MailChimp ID, the ID in and of itself is not PII within GA. By itself, it does not identify a user – it’s just a string of characters and numbers. It’s similar to a transaction ID (which you have in GA if you have ecommerce tracking).

      Google can’t identify a user by the transaction ID or MailChimp ID alone. You can – because you have data outside of Google Analytics that you can match up with those IDs. As long as the PII (name, email, phone, credit card number, etc.) isn’t within GA, you’re fine.

      There’s always a concern with articles like these that people will see what’s technically possible and do something like putting a person’s name and email in GA (which is easy to do with the merge tags in MailChimp). However, since that’s against GA TOS, the consequences are getting your entire account deleted. Good bye data.

  • Hai Le

    Thanks for a great tip

  • GREAT!!!
    5 day of my life ^) rescue

  • Giuseppe

    Thanks a lot for this method, it’s going to be very helpful in many ways.

    Just one question: does the event hit affects bounce calculations?

  • @Giuseppe –

    Yes – these hits will affect your bounce rate. It may be a good idea to filter these out of your main profile (so your average bounce rate isn’t adversely affected) and then create a profile that does include them.

  • Evgeniya

    Hello, thanks for the post!
    we have tasted this method, and we have a problem:
    in letters which receives our clients, in the source code remains only tag , all our request like src=”*|UNIQID|*&t=event&ec=email&ea=open&el=*|UNIQID|*&cs=newsletter&cm=email&cn=062413&cm1=1″ />
    is removed.
    when we send the same request just trough the browser, we see it in real-time in Google analytics interface.
    Maybe you could give us advice on this problem?

  • @Evgeniya – when you say “in the source code remains only tag” what exactly are you referring to? Do you mean the utm campaign parameters in links?

    I can’t really say why the request is being stripped off – I’m afraid I don’t have enough information about your situation.

    What email service are you using (MailChimp, Constant Contact, etc.)? How are you embedding the request in the email? Are you following the example above, or some other way to fit your needs?

  • Evgeniya

    Thank you for your response, we solved this problem

  • Boki

    What kind of code should I use if I don’t use MailChimp? I would like to add tracking in my email messages sent from gmail.

  • @Boki –

    I’ve played around a little with trying to do this in Gmail and haven’t yet found an easy solution. There are ways it can be done with server side coding, but I was hoping to be able to just go into the Gmail settings and add a “fake” image to the signature. Unfortunately, it doesn’t work.

  • Jeremy

    Hey Jim, I’ve been looking into better open tracking, this is a great tip 🙂

    One question though –

    Will the user’s ‘device category’ (‘Desktop’, ‘Tablet’, or ‘Mobile’) and other system info be sent along with the data, so we can track mobile vs desktop vs tablet opens? If not, how could we sent the user’s device info to GA along with this GET request?


  • This is pretty cool and is a great post.


    This appears to be a clunky, manual way of getting Google Analytics to do less than what marketing automation systems do automatically.

    Build email, send email. Email gets opened. The software knows and shows you who opened it. Email recipient clicks a link and visits pages on your site. All of this activity – every page view, is tracked and reported along with the recipient’s name, email address etc.

    Two weeks later prospect visits from their tablet or phone. The software knows. They download a pdf. The prospect submits a form. The software knows.

    The system scores each of these events and can alert you when their score reaches a user-defined threshold or when they take a high-value action of your choosing.

    I love the direction this post is going but thought readers may want to know that marketing automation systems take this train of thought much further down the track and do it automatically.

    I founded a well-known marketing automation software company ( to take this same path several years ago. Data-based marketing and attribution get me all geeked out 🙂

  • @Jeremy –

    The device information automatically comes through in the http request header – you don’t have to specify this.

    @Michael Ward – I appreciate your comment and agree, there are many systems that take a much deeper dive and connected approach than what is offered in this article. I am merely presenting the options and capabilities that are now possible with Universal Analytics – baby steps first 😉

    @C Jeffers – thanks for the heads up on your product. It’s always good to see new software that takes advantage of GA and other common products.

  • Robin

    Hey Jim,
    Many thanks for this info, I am sure it will prove to be most useful. I still haven’t had a chance to play around with universal analytics yet, all my sites are still using classic analytics. But i would love to try it out with this open rate tracking. Although open rates are available through most e-marketing software, it is very handy to have the ability to track in GA along with visits, goals and transactions.

    I do have one question though regarding outlook. How exactly does it know if the user has actually double clicked the email to ‘open’ it? Because some people might a)read the email in the reading pane, b)not read it and continue to scroll to the next email. Can we get accurate data from outlook users, because the image may load even if the user doesn’t open the email.

    Many thanks in advance

  • Andrew

    Sorry to ask a dumb question…. but I don’t have the option to create ‘custom metrics’ under ‘custom definitions’. The only option available to me is ‘custom data sources (beta)’. Love the post and technique… and I’d like to use the suggestion.

    Thank you

  • @Robin – great question!

    It’s been a while since I’ve used Outlook, but as long as the it sends a request for the “image” in the email, then it will be tracked. If you can see email images in the reading pane without double clicking the email, than it will be tracked.

    This is somewhat analogous to ad impressions. Just because an ad is served doesn’t mean the person sees it.

    @Andrew – If you only see “Custom Data Sources” and not “Custom Metrics” or “Custom Dimensions” that means your web property is not a Universal Analytics property – it’s a “Classic Analytics” property (i.e. asynchronous tracking code).

    Currently to get Universal Analytics, you need to create a new web property or account. Eventually there will be a process for upgrading existing web properties/accounts to Universal, but that’s not available yet.

  • Vin

    I want to track info list first name, last name, Company, and Phone numbers etc for my email campaigns using google analytics. Please help me.

  • Can you give an example of a measurement protocol call (URL) that would send an eCommerce transaction? I’m still pretty confused about that. Sending single hit types is fine, but does an ecommerce request need two separate hits to be sent? Or can the transaction item be added then the item added after in the same string?

  • @Vin –

    Tracking PII (personally identifiable information) in Google Analytics (e.g. name, phone number, etc.) would be in violation of GA’s TOS. A unique identifier (like MailChimp user ID) is not PII. The rule of thumb to use here is if someone from Google looked in your analytics, would they be able to identify an individual using the data in GA. Since MailChimp ID by itself does not identify an individual user, it’s fine. You’re more than welcome to take that unique ID and use it as a key outside of GA to match up with PII – OUTSIDE of GA.

    @Dave Davis –

    The ecommerce data needs to be sent with 2 (or more) hits: 1 transaction hit (http request) that sends the transaction data, and additional item hit(s) for each item purchased.

    Here’s the documentation specific for ecommerce tracking with the measurement protocol:

    Let me know if that doesn’t clear it up – I’m happy to drum up some examples 🙂

  • Bobby

    Interesting but am not seeing any data. Do I need to enable the API or something in order to use the collect function?

  • @Bobby –

    Are you using Universal Analytics? Or are you still using “classic” analytics? One way to find out is to view the source code of a page on your site and look for your Google Analytics tracking code. If you see something like _gaq.push([‘_trackPageview’]) you’re using the classic code. If you see something like ga(‘send’, ‘pageview’) you’re using Universal.

    You need to be using Universal to track anything using the measurement protocol. That could be the reason you’re not seeing the data.

  • Blue_Meanie

    Hi! thank you for the useful tips. I’m using the pixel for my email campaign however get only the real time data, not the event report. Even after 2 days after the setting. Any advice on what to check? Thank you.

  • Hi Jim,

    This was a huge help and will only lead to bigger things as UA becomes implemented across campaigns ‘universally’. As @Michael Ward pointed out, this post lacks a few identifying characteristics of user information, that could easily be added with using your own site as the src pointer, and adding the necessary custom variables that would be processed on the server side of the 1-pixel image display. One thing you touched on that has me searching for answers, is how this will affect Analytics information. I have noticed that the visits are not counted as bounces (0.00% bounce rate), however, they generate 0 pageviews/visit, and will affect conversion rate and pageviews/visit for the site. Other than separating views in Analytics, is there another way to exclude email opens and other non-visit events from visit tracking to retain proper rate metrics? Thanks again for this post, it was a huge help!

  • Alison

    Hi Jim.

    Thank you a lot for sharing this useful tip.

    I am new to GA. I am trying to put this in my MailChimp campaign but after testing it, I could not see the “Email opens” metric incresed at GA.
    That is the link that I am using:

    What might be going wrong? Does it take a while to be processed in GA? Maybe it is not being increased because I am only testing the campaign?


  • Alison

    Sorry. That is the li9nk I am using:
    img src=””*|UNIQID|*&t=event&ec=email&ea=open&el=*|UNIQID|*&cs=Livre%2C+Leve+e+Lendo&cm=email&cn=78c4af325f-lll_newsletter_campaign&cm1=1″

  • han

    I don’t use Mailchimp or anything like that–I use a page to test it out. I can see the opens in real-time under events in Google Analytics, but then the data does not show under Behavior > Events. I waited over 24hrs. Just in case, my code is:

    Any ideas?

  • han

    Oops, the code:

    img src=””

  • Sandra


    This is a great post! Im testing it out but, im currently using constact contact and I’m not sure what to put for:

    cid = *|UNIQID|* Client ID (required). This anonymously identifies a particular user, device, or browser. The value – *|UNIQID|* – is a dynamic parameter (aka merge tag) in MailChimp that will fill in the user’s MailChimp ID

    Thank you!

  • I can’t understand why I couldn’t look up any companies Analytics ID and complete mangle their data. Where’s the security?

  • Christopher

    Has anyone figured out how to get this to work with Constant Contact?

  • I am not getting the custom metrics it is just showing custom data sources

  • bekabug

    Does this post need to be updated? I see the broken image in my emails but I’m not finding any reports for this traffic. Help?

  • Hi

    Great post. Now that GA’s been updated any chance you’ll update the walkthrough?

  • Mary

    Great post..
    I am trying to see if I have any luck putting this into place within MS Publisher, as the staff member here likes using this platform for his newsletters. He likes the simplicity of how MS Publisher pushes emails out via Outlook. I have converted our Publication to a Web Publication, and I have now been able to insert a HTML code Fragment.

    I’m still trying to get my head around the code and what i need to change in order to make it work.

  • Ryan

    Can this kind of process be done using KissMetrics?

  • Ryan
  • Justin F

    This will no longer work for users opening the email with Google:

  • Justin

    Any revision or resolution now that gmail proxies images as mentioned by Justin F?

  • Great post guys. I’m looking to track the step RIGHT before the campaign gets sent: The list signup. I’m working on a wordpress site, using mailchimp, and I’m looking for the line of code where I should add my event.. but i’m having a hard time finding it… what should i be looking for? Maybe this is blog-post worthy?

  • @David Booth –

    It depends on the plugin you’re using to implement your MailChimp form. Generally speaking, you’ll only want to fire the event after the form fields have been validated (as opposed to adding a click listener on the form submit button).

    @Justin & Justin F –

    I’m still looking into this issue. I’ll post a comment with any updates.

  • I think this info will help for mailchimp users only.

    Can you provide me more information about other off line tools like robomail or sendblaster ???

  • @Raju –

    Sorry, but I’m not intimately familiar with robomail or sendblaster. In fact, there are many, many email service providers out there, too many for me to cover all of them.

    My hope is that you can use the information in this post (and the “part 2” post) to get this set up. If you use MailChimp, then it’s easy. Just follow the instructions. If you use a different email service provider (Constant Contact, AWeber, robomail, sendlist, etc.) then you’ll need to work within the tool to get the right information sent.

    This may not even be possible for every tool. For example, you need to be able to dynamically insert the unique user ID for each email recipient. In MailChimp, that means using merge tags. In other email tools, you’ll need to figure that one out (again, it may not be possible in all tools).

  • LV

    Very helpful, however the ‘email opened’ event is triggered every time as soon as the email is sent to a Gmail account. And after that every time it is opened it is triggered again. Any idea what could be the issue here?

  • @LV – I think this may be related to the issue of Google caching images in email (but I’m not 100% sure on that).

    @Justin and @Justin F – It’s on my list to revisit this and determine the implications and any workarounds. It seems like the image caching in Gmail will still allow us to track the first time an email is opened, just not subsequent opens. This response from MailChimp sums it up better than I can:

    I’ll update this blog post after I’ve had a chance to do some more testing.

  • I am publishing here a twitter exchange I had with the author. I think it will be valuable for others.

    @jgianoglio I suspect that the method described here boosts unfairly the sessions for the source. Agree? -Cheers!

    Jim Gianoglio ‏@jgianoglio:
    @itso Yes – every email open gets counted as a session. Best to create a new View specific to email info, exclude from main View.

  • “woop-woop”. Thank you! I found other articles about tracking emails with GA, but this was the best explained!

  • Anurag

    How can we track leads coming from different email publishers using if we have single landing page

    • the url comes to your site should be diff and with diff ga events name

  • Chris Morton

    woop woop – hot dog it works

  • Yevhenii

    Hello Jim!
    Thank you for this article.

    I found one problem – every hit (every time the event occurs) i get one unique session which goes to direct traffic channel. Is there any possibility to see events only without getting those additional sessions?
    The problem is I can’t use utm_medium / utm_source to move these sessions to another channel cuz this is used in system emails (so if I use those, i will wipe my previous sources and mediums). Tracking is very important for us but getting those sessions under channel “Direct” is not very good. Is there any possibility to fix it?

    Thanks in advance!

    • no you can use another ac for mails only under your subdomain create it

  • Hi Jim,… and thanks a lot for this open email tracking. Works Fine.
    I’m just having a trouble since I implemented it : my audience (sessions, users) started duplicating, with the same source/medium I specified in cs/cm. Is there a way to avoid this ? Or did I missed something ?

    • i think you are using same name for session as whenever somebody open mail it will ping to ga so your previous mails are opened up by your user and if you wanna make diff you can create 50 acc in ga use diff account every month and after fnishing lets 12-13 you can again use first one

  • Access and play the exciting games: KiziKizi in the top new games and fun today you said is very interesting with a lot of game genres and different levels, this helps you somewhat relieve the fatigue stress.

  • Sunil Acharya

    Is this option available in gmail service? I want to use in my company website I’m using Google email service right now

    • you can use yesware like free plugin for few free credits

      • Sunil Acharya

        I think you didn’t get my point. How can I use tracking email in chrome. let me explain you. If I send email and I want to know the status is open or not ?

        • For watching the opens you need to see in ga if user opens it just before 29mins you can see means only within 30mins scenario you can see over there after this you need to wait for 24hours means tommorow you will get report from ga in your ga account or use yesware addon for chrome

    • Jim Gianoglio

      Hi Sunil –

      The method presented in this post will not work in Gmail. I can’t vouch for any third-party chrome extensions that may do this – just be careful about giving permissions to any extension.

  • no issue it pings every time its functionality to see like if somebody forward your mail then how would you know by geo location of that events and if same geo sorry cannot say as they are pulses so ga grabs every pulse and insert in your acc

  • if any provider give you option to insert html go and insert it it will work more hemp contact us on

  • place it anywhere we can place a html tag for more info ask on enquiry form

  • just directly place this url and name anything you want and your ga account id no need to make custom metrics sorry for late responses as i today read this post on internet

  • Kizi – Play top free online game for kids funny.!

  • How to do all this with Google Tag Manager?
    kindly some one point out the method

  • Christian Willadsen

    Quite a few has commented that this pixel triggers an extra session in analytics.
    You can prevent this by setting event non interaction to 0, in the url just &ni=1 in the end.

  • Drew_DA

    Hi Jim, thanks for sharing this cool GA “hack”!

    Question for you:

    Why go to all the trouble following part two of the post when we already have access to the MailChimp user id in this post? Why not just make the event label our custom dimension value as well and be done with it; that is, can’t we just add a “cd1” value of the MailChimp user id onto the query string? In fact, I see now that this is exactly what is shown in the screen capture, but not in your following breakdown of the parameters!

    Hope that made sense, and I’m probably missing something, which is why I’m asking…

    Thanks! 🙂

  • roxos

    Hi Can I do this with an old GA script that have yet to migrate to new one?

  • Rip

    Thanks Jim. I will try it in my website.

  • John Peterson

    Gotta love mail chimp!!

  • Brian Maher

    Hello, does this method still work? I have managed to create everything, with the only difference being that I am using GTM. However, the pixel tag doesn’t seem to fire on open. Any reason for this? Thanks Brian

    • Jim Gianoglio

      It could be due to image caching. Are you looking at Real-Time reports in GA to confirm if the hit is sent? Are you seeing anything show up in your standard event reports?

      • Brian Maher

        Thanks Jim, yes – it appears it is due to image caching. I am able to see these in reports but not real time, unless I open the mail and click through

        • Sean

          I am having a slightly different problem with this. I sent an email out 4 days ago. After sending it I saw quite a few hits in real-time but looking under Audience or Campaigns I am seeing a very small number over these 4 days and only 2 hits for the day I sent it out.

  • This Looks pretty impressive knowledge sharing article, Was wondering how to track the email visitors and openers in GA finally found JIM. Thanks Jim.

  • Alberto Jimenez

    is there a way to see in Google Analytics a report of the links clicked on or opened in a given MC campaign?

    • Jim Gianoglio

      See the above response to prot-on’s comment 🙂

  • prot_on

    Hi Jim, great post, but I have a question: If I need to know what email click in my link? How can i do it.

    • Jim Gianoglio

      If you want to know which link in your email they clicked, just specify that with campaign tagging on the link (e.g. ?utm_source=newsletter&utm_medium=email&utm_campaign=big-sale&utm_content=top-link

  • Joshua Chesner

    I’m also trying to track “clicks” in my emails. I have them all properly tagged using the appropriate utm triggers. However, when I attempt to look at clicks, I get nothing. Rather, I have to look at sessions. Is there a way to see them under clicks or is that only for AdWords?

    • Jim Gianoglio

      No – the “Clicks” group of metrics is only available in the AdWords reports (and DCM and DBM reports if you have those integrated). Those “Clicks” metrics are being imported from AdWords.

      By using utm campaign tagging, you’re not necessarily tracking clicks on the links per se, you’re actually tracking how many visits (sessions) to your site resulted from users clicking on those links.

      If you want to know literally how many clicks occurred on those links, you’d be better off checking the analytics of your email service provider.

  • Is it possible to use this trick or another one to be able to identify and add the email client teat the contact opened you email in and use this as the source code in the utm?

    • Jim Gianoglio

      Hmmmm, it may be possible, but I can’t say for sure without digging into this. I’m sure a quick search on StackOverflow would reveal the answer 🙂

  • Admirador de Damas

    MailChimp not free now?

  • Pedro Coenen

    It’s clear for me how to make the Custom Metric. However, where in GA can I find the report with the results?

    • Jim Gianoglio

      You just need to make a custom report (and select your custom metric when building the report).

  • Cameron

    You mention that the email client needs to allow images for this to work. Isn’t that a pretty significant hurdle? Or do you find that most clients allow images?

    • Jim Gianoglio

      Now that Gmail automatically shows images by default, this is less of an issue than before. But you are correct, there will still be a portion of uses who manually turn off images by default, or use email clients that don’t show images by default.

      This affects all email tracking, whether you’re using Constant Contact, Mail Chimp, etc. It is something to be aware of.

      I tried looking (briefly) for some recent data about default image blocking settings for the many email clients, but couldn’t find anything within the past year. I’m sure if you search hard enough, you can probably find the data that will give you a broad sense (i.e. 17% of all emails never display images…). But just remember that those are estimates.

  • Joan Nin

    Thanks for this guide. But is posible to get the email address instance the Mailchimp ID?

  • Antxon

    Hi Jim, thanks for the post, as usual really helpful.
    I have a tricky question for you. Do you know any way to extend your method to see how long subscribers spend reading your email? We have done several experiments base on image open simulation. In our Apache we measure how log the request open. Is this possible using Ga? That will allows to measure duration of engagement. Any ideas?

    • Jim Gianoglio

      As far as I know, this is not possible, but maybe there are some cool code tricks that I haven’t thought of that could do it. Sorry!

  • K Miller

    Hi Jim, and thanks for this helpful article. I’d assume you can use this same method in a DSP with a variant of the code firing on impression view of display banners – But I’m wondering if you know of a way for the resulting event to tie in with the same user regardless of the source of that user’s eventual click that lands them on the site. Your step 2 is sort of a closed loop scenario where they’re just engaging with Mailchimp ads on different devices, but what if they see a Mailchimp email and then navigate to the client’s site via google search? Perhaps it’s not possible, but this is what I’d like to see happen, ultimately I’d like to be able to see the event “ad impression” in an assisted conversion path ahead of the traditional GA channels. Please reach out if you have any solutions in mind for that. Thanks!

  • Thanks very helpful

  • Miloš Milosavljević

    Hi, great article and a question. Can I replace the cid value, and instead of MailChimp’s unique ID, place the GA Client ID I extracted as a custom dimension when a first time visitorsigned up for the list. Then place the this Client ID as a value in hidden form field and then add it to the image tag as the cid value and cd1 value. The idea is to be able to track a conversion that starts with a signup on the form, passes through an email (even after the session expires) and ends up on the thank you web page.

  • Lucy Hill

    Hi there,

    I need to do this with anonymous user ID – a work around I found elsewhere. But so far no events have been tracked.

    Is the issue with the code? I’ve removed tracking ID. (I am new to GA)

    • Jim Gianoglio

      Hi Lucy,

      It looks like you have an issue with some extra quotes in there. There are 2 double quotes after img src= and then additional quotes after cid=.

      Try putting everything in a single set of quotes, like:

  • Nathan Brunetti

    Hey Jim,

    How do I generate a random “cid” if I’m not using MailChimp as my email provider? Everything else I have set up but I want to make sure I’m doing that correct.

    • Jim Gianoglio

      Hi Nathan –

      You don’t want to generate a random cid — the whole point is to use the ID your email provider uses to identify the users in your list. For MailChimp, that ends up being the *|UNIQID|* merge tag. You’ll have to check the documentation for you email service provider to determine how to get that value.

  • Mukul Bhagia

    gmail strips src attribute in img. I have tried url encoding the url – still doesn’t work. I can see the img src in the original source.

    • Jim Gianoglio

      Are you referring to the image caching that happens with Gmail? This is a known issue and has been written about by the MailChimp team here:

      • Mukul Bhagia

        I placed the Img src in my html code and sent the html email from Gmail, not mail chimp. Will it not work if I do it this say? According to mailchimp’s article, Gmail hits the Img url the first time someone opens it. But I can’t see the data even for a unique open. And upon inspecting, I notice that the src attribute had been stripped

        • Jim Gianoglio

          That’s a good question. I haven’t researched doing this through Gmail directly (or any other email services like Yahoo, Hotmail, etc.).

          It’s possible there may be a way to do it, but I don’t have that answer for you. Sorry! Try posting to the Google Analytics community on Google+

          • Mukul Bhagia

            Sure. Thanks for your help Jim.

  • Frank Marcel Fonseca

    So… you don’t actually need the custom metric. You were just showing off (joke!) You’re tracking email opens as events already. There’s no need for a custom metric. Right?

    • Jim Gianoglio

      Hi Frank –

      Yes, and no 🙂

      You’re right in that we can already get the same number through the event tracking and related metrics. The benefit of using a custom metric is primarily cosmetic and to ease confusion. By having a metric explicitly named “Email Opens” you can create a custom report that non-technical can understand without having to explain the difference between “Total Events” and “Unique Events.”

      • Frank Marcel Fonseca

        Alright, I’m with you now 😉
        Thanks for your quick reply! Kudos on the whole idea!

  • Steev Brown

    this is very good way to tracking . Thanks Again

Contact Us.

Follow Us



We'll get back to you
in ONE business day.
Our Locations
THE FOUNDRY [map] LunaMetrics

24 S. 18th Street
Suite 100

Pittsburgh, PA 15203


4115 N. Ravenswood
Suite 101
Chicago, IL 60613


2100 Manchester Rd.
Building C, Suite 1750
Wheaton, IL 60187