BLACK FRIDAY SALE - up to 57% off memberships for a limited time!

Explore our Email Marketing and Marketing Automation Toolkit

Email campaign tracking with Google Analytics

Author's avatar By Dave Chaffey 30 Jun, 2017
Advanced Advanced topic

A short tutorial and example showing how to track your email marketing campaigns by tagging links in your email with Google Analytics

I was prompted to write this how-to post since some email marketers I speak to during Email Marketing training courses, use Google Analytics, but weren't aware it can be used for email tracking "beyond the click". This means that as well as getting reporting in your email marketing system on opens and clicks for your sends, you can also isolate visits from email in your Google Analytics to see which pages are viewed and whether visitors convert.To set this up email tracking you will need to tag your email with 'Google Analytics campaign tracking codes as explained later with the example in this article.

Once you're using tracking, Google Analytics segments can be used to isolate visitors referred from email to understand their preferences and behaviours. This really helps prove the value of email for your list members and to your company particularly if you have goals set up in Google Analytics.

This is powerful insight since you can then compare different email campaigns and newsletters to see which produce the best results.

 

Note: Before you go ahead and follow the advice in this article to manually set up campaign tracking, be aware when selecting an email broadcasting system that many email providers have added functionality to make it easy to track with Google Analytics or other web analytics systems such as Adobe Analytics. So, check with your Email Service Provider to check whether they support automated link tracking. This is a huge time saver since  you can set up the campaign tracking tags within the email system rather than having to manually add them to the links or write your own scripts as we do, or use spreadsheets like that for our members as described below.

Member resources

About email campaign tracking 'beyond the click'

"Beyond the Click tracking" is the tracking that occurs once the visitor has clicked through from your email to the website.

It is where your web analytics tracking tool can take over the tracking or your email system may be able to track if you have tracking code from your email system on your webpages to review interaction with different pages or outcomes such as leads or sales.

When selecting new email services it's well worth checking what your email provider offers support for tracking website visitors and conversion points and automatically tagging email campaigns with analytics campaign tracking - it's very tedious otherwise.

All sites will use a standard web analytics solution such as Google Analytics, Omniture, Coremetrics or Webtrends and if you have a standard coding for campaign tracking you will be able to track your email. Here we look at Google Analytics.

Setting up an Advanced segment in Google Analytics to report just on your email traffic

If you setup email campaign tracking in this way or via your ESP I recommend you create a custom Advanced segment where you isolate visitors from email (or different types of email) so you can understand how they behave and convert.

Update: To add an advanced segment for Email marketing in Google Analytics, you should select the advanced segment option using the down arrow at the top left above the reports in Google Analytics, then choose “Create New Segment” and set the medium to “Email”.

email-marketing-analytics-segments

The Advanced segment should be based on all visits to the site with a medium of ‘email’ set, provided that this is how you have labelled your links by tagging them. The next section shows you how to tag your links using the campaign tracking in Google Analytics.

Recommended email campaign coding / tagging with Google Analytics

To learn about the principles of tracking campaigns, read this other post which introduces tracking campaigns in Google Analytics.

To setup email tracking, the links from your email to the landing pages should be tagged with standard campaign tracking parameters. These are up to 5 "name-value" pairs which are part of the query string for the URL (denoted by everything after the "?" in the web address as in the example below). FWIW, UTM refers to the "Urchin Tracking Module" on which Google Analytics is based.

Here is an example tagged URL (split across several lines):

http://www.domain.com/landing_page.htm?
utm_campaign=EnewsNov17
&utm_medium=email
&utm_source=HouseList
&utm_term=editorial-link
&utm_content=header

For Email marketing the parameters I recommend are:

  • utm_medium -  medium used for marketing, i.e. email
  • utm_campaign - campaign name, e.g. EnewsNovember
  • utm_source -  This is usually the media owner, but for email marketing can be used to specify the source of email list or type of email, e.g. HouseList, Welcome email, Abandoned-basket, etc
  • * utm_term - In AdWords used to identify the keyword used to trigger the ad, can be used in email marketing to identify individual links (optional), e.g. Offer1, can be based on click text summary
  • * utm_content - Used to track an individual or segments response (optional), this could be based on any field in database, e.g. user-id, user email, etc.

Note that term and content are optional.

If you want to try setting up Google Analytics, try the Google URL Builder that enables you to add the parameters for a destination page from your email campaign as follows:

Once you know how this work it's straightforward to create a spreadsheet for creating links, but it's really laborious to copy and paste, so for an enewsletter it's best to write a script that creates an HTML page with tagged links included - that's what we do for our Enewsletter since our ESP doesn't automatically support tagging.

Here is a guide from an email service provider giving an example of email tracking in Google analytics [PDF]

Making sure you staying within Google's terms of service on Privacy

Some commentators have recommended that you should use someone's email address to in the &utm_content field. Aside from potential privacy concerns, this is personally identifiable info and so not possible without breaking Google Analytics's terms of service (See #7). 

The precise wording is:

"You will not (and will not allow any third party to) use the Service to track, collect or upload any data that personally identifies an individual (such as a name, email address or billing information), or other data which can be reasonably linked to such information by Google".

They also state that you can't match any clickstream data to any individual user of your site. So issuing each person a unique id and passing that through utm_content is also prohibited. As some comments below make clear, you can still track an individual ID provided it can be linked back to an individual.

Author's avatar

By Dave Chaffey

Digital strategist Dr Dave Chaffey is co-founder and Content Director of online marketing training platform and publisher Smart Insights. 'Dr Dave' is known for his strategic, but practical, data-driven advice. He has trained and consulted with many business of all sizes in most sectors. These include large international B2B and B2C brands including 3M, BP, Barclaycard, Dell, Confused.com, HSBC, Mercedes-Benz, Microsoft, M&G Investment, Rentokil Initial, O2, Royal Canin (Mars Group) plus many smaller businesses. Dave is editor of the templates, guides and courses in our digital marketing resource library used by our Business members to plan, manage and optimize their marketing. Free members can access our free sample templates here. Dave is also keynote speaker, trainer and consultant who is author of 5 bestselling books on digital marketing including Digital Marketing Excellence and Digital Marketing: Strategy, Implementation and Practice. In 2004 he was recognised by the Chartered Institute of Marketing as one of 50 marketing ‘gurus’ worldwide who have helped shape the future of marketing. My personal site, DaveChaffey.com, lists my latest Digital marketing and E-commerce books and support materials including a digital marketing glossary. Please connect on LinkedIn to receive updates or ask me a question.

Recommended Blog Posts