Tracking Email with Google Analytics

In the past few weeks I’ve gotten a lot of questions about how to track email with Google Analytics. While I did cover the broad topic of online ad tracking in a previous series of posts, email tracking has certain nuances that I think should be addressed.

The Concept

Tracking email campaigns in Google Analytics is done using a process called link tagging. This process is the manipulation of the links in your emails. Here’s a sample link that might appear in an email:

http://www.mysite.com/page.php

To track it with Google Analytics it would be modified like this:

http://www.mysite.com/page.php?utm_campaign=fall-sale&utm_medium=email&utm_source=female-list

And another email link that looks like this:

http://www.mysite.com/page.php?prodid=100

Should be modified like this:

http://www.mysite.com/page.php?prodid=100&utm_campaign=fall-sale&utm_medium=email&utm_source=female-list

When someone lands on your site after clicking on a tagged link, GA removes the information from the URL and stores it in a cookie. Because the info now resides on your machine (in the cookie) GA can associate all visitor actions (like conversions and transactions) with the email. Pretty slick, huh?

How Link Tagging Works

What is all that info I added to the URL? They’re called link tagging parameters. The name of the parameter is on the left side of the equal sign and the value of the parameter is on the right side.

Each parameter represents a different attribute of your email. Looking at the example above we can identifiy the following parameters and their values:

utm_campaign=fall-sale
utm_medium=email
utm_source=female-list

Each one is identified by the Google Analytics tracking code and helps GA understand that the visitor arrived on your site via an email.

You must use the parameters that Google provides. However, you can specify any value for each parameter. This is where the real power lies. By using your own values for each parameter you can add markting information, that is specific to your business, to GA. We’ll get to where that information appears in a second.

[ NOTE: All you advanced user may be calling my bluff here. You can rename the link tagging parameters that GA uses, but it is an advanced technique that requires a change to the GA tracking code. I'm not going to cover it in this post but you can learn more in the GA help section. ]

Let’s look at each link tagging parameters and some of the logical values for each.

utm_campaign

This parameter identifies the marketing campaign that the email belongs to. It may be that this email is just one part of a bigger online marketing strategy. For example, you may be using paid search, some display advertising and this email to reach new prospects. You can group this email with other marketing activities by using a common value of utm_campaign.

As for suggested values, use something that represents the campaign that your running.

utm_medium

The medium parameter describes how the message got the to visitor. In the case of email I recommend that you always use the same value. I like to use ‘email’. It’s short and pretty darn descriptive.

Using a single value consolidates all email generated traffic into a single line item in the reports.

utm_source

This is where things get interesting. Traditionally, in link tagging, the source is the ‘who’ attribute. It describes who you’re working with to push a message out. But how does the concept of ‘who’ map to an email?

When it comes to email I like to think of the ‘who’ as the list of recipients that you’re sending the message to. This may be a segment of your email list (like a specific gender segment, age segment of purchase history segment) or your entire email list. For example, some potential utm_source values might be:

utm_source=gender:female
utm_source=gender:all
utm_source=purchase:last-30-days
utm_source=purchase:last-60-days
utm_source=purchase:free-shipping-offer

The key here is that by identifying the segment in the utm_source parameter you’ll be able to measure the performance of that segment in GA. You are segmenting your email list, right?

utm_content

The final parameter is named utm_content and helps us test emails. The content parameter identifies the actual content of the email. So if you’re producing different versions of the email for an A/B test you can mesaure the performance of each by varying the value of utm_content. For example:

utm_content=free-shipping-offer
utm_content=20-off-offer
utm_content=product-creative
utm_content=value-creative

Some folks like to use utm_content to describe not only the version of the email that the recipient received, but also the actual location of the link in the email.

utm_content=top-nav
utm_content=call-to-action
utm_content=image-link

Sometimes this can be overkill as it leads to a lot of very granular data. Normally we just use this to measure which email variation performed better.

Think about how powerful this can be. Using utm_content and utm_source you can measure the performance of a specific message to a specific segment of your customer base (i.e. email list). This is a great way to measure if you’re sending the right message to the right person!

How to Tag Your Links

So now that we know what paramters we can use to track our email, how do we actually tag the links? It starts by assigning a value to each parameters. You could use the Google Analytics URL builder: a free tool in the GA help center. Just enter a value for each parameter, along with the URL from your email, and the tool will automatically generate a tagged URL that you can place in your email.

But I find the URL builder can be cumbersome when tagging a large number of links. Just think of all the links that you might have in a single email!

Instead I use a small Google Spreadsheet that has a built in formula. Just enter your campaign values in the columns, along with the URLs from your email, and drag a pre-programmed formula to automatically created your tagged URLs. Then place the URLs in your email.

You may have noticed that a tagged URL is pretty ugly. If you’re sending an HTML email to you can hide the long URL using an anchor tag, but if you’re using a text based email the recipient will see the entire crappy URL. Try using a service like Tiny URL to hide the query string parameters.

Use Tiny URL to shorten an ugly looking tagged URL.

I should note that some email platforms (the cool ones!) have begun to integrate GA link tagging into their tools. Check with your email provider to see if they offer this service.

The Reporting

As I mentioned before, the values used in your link tags get pulled directly into Google Analytics. Each parameter becomes the foundation for a report. Let’s start with the Traffic Sources > Campaigns report:

This report lists all the values of your utm_campaign parameters. You can measure the performance of your email campaigns by finding the values you use for utm_campaign. But be aware, this report will also contain the titles of your AdWords ad campaigns. They’re automatically imported from AdWords. Also remember that you might use the same value of utm_campaign in activities other than email.

Remember utm_source and utm_medium? We can drill into a campaign to determine how the email medium, for a specific source, performed in the campaign. Select a campaign by clicking on the name. Then use the dimension drop down to view all the sources within the campaign.

The above report shows just one source within this campaign, but that’s all that was used. The important thing to understand is how you can see certain sources, specifically email segments, contributed to the success of a campaign.

But what about evaluating a source across multiple campaigns? Try using the Traffic Sources > All Traffic Sources report:

The first column shows all sources and mediums, so in our case we can see how a segment of the email list performed cross all campaigns. We can quickly filter this report by ‘email’, the medium, to identify how well a segment performed. Remember how

What about the utm_content parameter? Where can we find that data? It’s in the Traffic Sources > Ad Versions report.

Here’s where we can evaluate the performance of our different email variations. The Ad Versions report not only contains the values from utm_content, but also the titles from your AdWords campaigns. This is another piece of data that GA automatically pulls in.

And let’s not forget that all of these reports have three tabs full of metrics: site usage, goal conversions and ecommerce (if you choose to use ecommerce tracking). All of these metrics provide insight into the sales or conversion process.

Bounce rate provides insight into the begining of the process. A high bounce rate probably indicates a disconnect between the message in the email and the content on the landing page.

You can quickly switch to the goal conversions tab to measure the other end of the process by looking at the conversion rate for your email. And if you’re using the ecommerce tab you can look at a metric like revenue to qualify the conversion rate.

Don’t Forget the Pre Click Data

While all this data is great, don’t forget that your email provider has a number of metrics that give insight into what happened before the visitor arrived on your site. Such metrics include # emails sent, # emails received, # bounces, # emails opened and click throughs.

I know that metrics like open rate are inherently flawed due to the tracking technology, but you can’t evaluate things like subject line effectiveness using the data in GA. Don’t be afraid to look at metrics like # of bounces when evaluating the performance of email.

Create your Advanced Segment

With GA’s new Advanced Segments we can really drill into the email traffic segment. At the very least, you should create one advanced segment to evaluate email traffic.

To create the advanced segment use the ‘medium’ dimension and enter a value of ‘email’. Remember, ‘email’ is the value we used for utm_medium in the link tagging. Talk about coming full circle!

Using an advanced segment helps you easily identify what content the email segment found interesting, if they converted, how well the progressed through various processes, etc.

Common Problems

The most common problem we see with link tagging is that people forget to tag their links. Link tagging is usually a process related issue, not a tech related issue. Before your organization sends any email communication make sure the links are tagged.

A simple way to test your links is to send the email to a few coworkers and ask them to click on some links. In a few hours you should see the data in your GA reports.

The second most common problem has to do with redirects. Many times a site may have a redirect that strips off the campaign tracking parameters. The simple test mentioned above should tell you if you have a redirect issue. Remember, when you click on a tagged link you should see your link tagging parameters in the URL of your site.

A Note on Privacy

A few people have mentioned that it is possible to add a visitor’s email address to your GA data using link tagging. While this is possible, keep in mind the GA terms of service specifically forbids the collection of personally identifiable information with Google Analytics.

If you’re still reading, and you’re trying to understand how to track other types of online ads, then you may be interested in these posts:

Twitter and Google Analytics: What to Track

A couple of weeks ago I decided to start Twittering. I’ve had a Twitter account for a while, but never really got into it. But after observing some friends for a while, and reading up on how others use Twitter, I started to see some value in the service.

One thing I’ve noticed is the amount of promotion done with Twitter. Whether it be self promotion, like me promoting a blog post, or corporate promotion, like a sale, people are driving traffic to websites using tweets (posts on Twitter). Check out how CNN is driving traffic to their Political Ticker blog using Twitter.

Here’s another great example that was mentioned on the GokDotCom blog. Bryan Eisenberg found a t-shirt coupon posted as a tweet and passed the information on to his coworkers. Here’s the original tweet that Bryan read and sent on via email (I assume he used email):

Who wants a FREE $50 gift code? Here it is: TLTW7897 First come, first serve – and all tees are ON SALE FOR $12!! http://tinyurl.com/yqe9f

This got me thinking, how are people tracking Twitter as a marketing activity using Google Analytics?

Default Tracking Method

By default, traffic from Twitter will be tracked as referral traffic in Google Analytics. if someone clicks on a link to your site from a tweet you will see ‘www.twitter.com’ in the Referrals report.

This data will give you a basic idea of how much traffic your tweets are generating. It’s good, but there is an issue.

What happens if your tweet gets passed along to others, as it did in Bryan’s case? Bryan’s co-workers never clicked on a link at twitter.com, they received a link in an email. How can we identify these visitors as coming from Twitter and not an email?

Preferred Tracking Method

A better way to track a Twitter campaign would be to use GA’s campaign tracking feature. This method will track anyone visiting the site as a result of your tweet, regardless of where they clicked on the URL. It doesn’t matter if it’s in an email client, hosted email app. etc.

Here’s how to make it happen.

Most tweets that include a URL use some type of URL shortening service, like Tinyurl.com. This service shortens a URL by creating a redirect that is hosted on www.tinyurl.com.

The cool thing about Tiny URL is you can add GA’s campaign tracking parameters to your Tiny URL, thus encoding campaign info into the URL you use in your tweet. When someone forwards your tweet using email the tiny URL will contain campaign info identifying the visitor’s source as your Twitter campaign.

This is the secret to tracking tweets with GA: adding campaign information to your tiny URL.

Here’s an example. Here’s a tweet that I posted with a link to this blog:

Help me test tracking Twitter with Google Analytics: Please click on this link http://tinyurl.com/5eyfjo

I added GA campaign parameters to the Tiny URL in the tweet above. If you click the tiny URL in my tweet you get this URL:

http://www.cutroni.com/blog/?utm_campaign=blog&
utm_source=twitter&utm_medium=micro-blog

The campaign information in the URL will bucket the visitor as part of the blog campaign and as someone who was reached by the ‘micro-blogging’ medium. Here’s how the data looks in the All Traffic Sources report:

There it is in all its glory. But let’s dig deeper. I’m really interested in knowing how people are using Twitter. Are they on their mobile (like me) or PC? This can have a big impact on how they interact with my tweet. Let’s segment the tweet by OS:

7 of 25 users are on the iPhone, interesting. I know that I’m an iPhone user and it’s one of the only reasons I twitter. It’s just easy on the iPhone! :)

So if you’re using Twitter to drive traffic to a site:

1. Always use a Tiny URL
2. Always add Google Analytics campaign tracking information to your Tiny URL

If you’re unfamiliar with campaign tracking you may want to check out these posts:

Google Analytics Campaign Tracking Pt. 0: An Overview
Google Analytics Campaign Tracking Pt. 1: Link Tagging
Google Analytics Campaign Tracking Pt. 2: The EpikOne Link Tagging Tool

Update: You can use a number of URL shortening services such as TwwetBurner and SnipURL. Both of these services also provide some basic reports on the number of clicks your shortened URLs generate.

Good luck!