Most web businesses send two types of email: Auto-responses and Marketing Messages. Most marketing messages are sent using sophisticated email marketing tools like Mailchimp or Campaign Monitor. That’s the smart thing to do.
But what about those messages automatically sent by your site. Emails like:
Thanks for signing up
Here’s your password reset code
Hey, we haven’t seen you in a while
We’ve deleted your account
… and everything in between.
What’s different about these messages is they are one off messages, specific to a user and generally triggered by a user action. So, using a mass email tool doesn’t make sense.
But, if you send it from your server, you lose visibility into user behavior. Luckily, if you’re using google analytics (and why aren’t you? It’s free), we can use some clever magic to understand how many clicks that email is getting.
Let’s take a look at what happens to your analytics normally when someone clicks a link in an email?
Well, if it’s webmail, google analytics will log the referring URL – so you’ll be able to see a bunch of email applications as inbound traffic into your site.
Interesting, but not very useful. If it’s coming from an email client like Outlook or Apple’s Mail.app, google analytics thinks it’s a direct hit, i.e. the person typed in the full address into their browser.
So, how can we make this more useful? Luckily it’s easy. For each URL you have in an email, append some magic, and google will track which links people are clicking on.
You can use a tool like this destination URL builder, but I prefer to build the links by hand.
So, you can see it’s a link to this website, Iamnotaprogrammer.com, but what are those other things appended to the end of the URL? They’re specific tags that google has created. They allow you to define how you want to bucket certain types of people based on where they saw your link.
Let’s dissect the rest of the example.
utm_source – Since this is from a “newsletter” I theoretically sent today, let’s use that as the source
utm_campaign - This mailing is part of my push to get traffic on my blog, so I’m going to call it “launch“.
So now, when I paste this link into my emails that I’m sending, regardless of what email client people have, they will always be in the Newsletter / Email / Launch bucket.
You don’t need to do any configuration in google analytics to make this work – it just does. You should start to see the Source and Medium combination show up in “traffic sources” in analytics as:Newsletter / Email within a few hours of someone clicking.
Have fun with this, and keep in mind that this works for twitter, facebook and anything else you want to set up customized links for too.
Update:
I eat my own dogfood. Here are the links I set up for this article in google analytics.
Track links in email and social media using google analytics
Most web businesses send two types of email: Auto-responses and Marketing Messages. Most marketing messages are sent using sophisticated email marketing tools like Mailchimp or Campaign Monitor. That’s the smart thing to do.
But what about those messages automatically sent by your site. Emails like:
… and everything in between.
What’s different about these messages is they are one off messages, specific to a user and generally triggered by a user action. So, using a mass email tool doesn’t make sense.
But, if you send it from your server, you lose visibility into user behavior. Luckily, if you’re using google analytics (and why aren’t you? It’s free), we can use some clever magic to understand how many clicks that email is getting.
Let’s take a look at what happens to your analytics normally when someone clicks a link in an email?
Well, if it’s webmail, google analytics will log the referring URL – so you’ll be able to see a bunch of email applications as inbound traffic into your site.
Interesting, but not very useful. If it’s coming from an email client like Outlook or Apple’s Mail.app, google analytics thinks it’s a direct hit, i.e. the person typed in the full address into their browser.
So, how can we make this more useful? Luckily it’s easy. For each URL you have in an email, append some magic, and google will track which links people are clicking on.
You can use a tool like this destination URL builder, but I prefer to build the links by hand.
Here’s what a link I would create looks like:
http://iamnotaprogrammer.com/?utm_source=newsletter20100118&utm_medium=email&utm_campaign=launchSo, you can see it’s a link to this website, Iamnotaprogrammer.com, but what are those other things appended to the end of the URL? They’re specific tags that google has created. They allow you to define how you want to bucket certain types of people based on where they saw your link.
Let’s dissect the rest of the example.
So now, when I paste this link into my emails that I’m sending, regardless of what email client people have, they will always be in the Newsletter / Email / Launch bucket.
You don’t need to do any configuration in google analytics to make this work – it just does. You should start to see the Source and Medium combination show up in “traffic sources” in analytics as:
Newsletter / Emailwithin a few hours of someone clicking.Have fun with this, and keep in mind that this works for twitter, facebook and anything else you want to set up customized links for too.
Update:
I eat my own dogfood. Here are the links I set up for this article in google analytics.
Related Links