Devon Smith, mentor on our Digital Lab shares insights on UTM Codes
One of the great benefits of online marketing is the ability to measure the direct impact of your marketing efforts. In order to measure the success of emails, social media, all manner of online ads, and other online marketing efforts, each of those needs to be tagged with a UTM code.
UTM codes are deceptively simple and complex. You can add a UTM code to any link that you control (links that you add to an email, social media post or ad, a digital ad in an online newspaper, an entry in an online community calendar, etc), and the information in that code is then automatically passed to Google Analytics. In short – by adding UTM code to links, you can get more and better data into your Google Analytics, so that you can evaluate whether, for example, visitors from email bought more tickets than visitors from social media, or exactly how many donations were made by visitors who arrived as your site from that end-of-year giving email campaign.
That’s the easy part:
Link + UTM Code = More data in Google Analytics
The hard part is making sure all of the UTM codes on all of your marketing links use the same structure and conventions, because Google Analytics is maddeningly precise in how it organizes those UTM codes in analytics reports.
Before we dive into figuring out how to solve that issue, first a little nerd history: before Google Analytics existed, there was a similar service called Urchin; it was Urchin that developed the “Urchin Tracking Module” code that we now shorthand as UTM. Google acquired Urchin and folded in the Urchin Tracking Module (UTM) code method into Google Analytics. This is why Google automatically attaches UTM codes to all Google AdWords ads by default (and so you shouldn’t be adding UTM codes to your AdWords links!).
UTM code must have the “Source” parameter (a parameter is the type of information being passed to Google Analytics) and can have up to 4 additional parameters (so if you don’t want to use any of the 4 parameters, just leave them out of the code entirely). Each parameter follows the same structure: utm_parameter=youdecidewhatgoeshere and those parameters are joined to each other with an ampersand (&).
Source: intended to identify the name of the website where the link is placed or the name of the email client (particularly if you are a large organization that, for example, uses Mailchimp for some emails and DotMailer for others). So, your Source parameter is often identified as facebook, twitter, mailchimp, theguardian, etc.) and looks like:
Medium: intended to identify the type of marketing channel where this link is being placed, for example: email, social, referral, display, etc. Google Analytics has very strict rules about how it will use the Medium parameter to identify traffic in the default “Channels” report. If you don’t following Google’s rules for the Medium parameter, lots of your traffic will end up identified in the “(Other)” category for this report. After tagging all of your links with UTM codes, you want a Channels report that looks something like this, where the “(Other)” category is quite small:
Default channel grouping chart example
All the rules that Google has for formatting and using the Medium parameter can be found here, but the basic idea is for traffic to end up in these channel groupings. For traffic to appear in the Channel of:
- Social use Medium of exactly: social, social-network, social-media, sm, social network, or social media.
- Email use Medium of exactly: email
- Affiliates use Medium of exactly: affiliate
- Referral use Medium of exactly: referral
- Paid Search don’t add UTM codes to any of your Google AdWords! But if you use other paid search network, (Bing, Yahoo, etc) then use Medium of exactly: cpc, ppc, or paidsearch
- Other Advertising use Medium of exactly: cpv, cpa, cpp, or content-text
- Display use Medium of exactly: display, cpm, or banner
So your Medium parameter is often identified as social, email, referral, or display and looks like:
If your Medium parameter doesn’t exactly match one of the terms in that list (spelling, capitalization, spacing must all match), then your traffic will get grouped in the “(Other)” category in this Channels report. If that happens, or for some reason you can’t follow the default definitions of Medium that Google has created, you do have the option to update those definitions in Google Analytics!
You can create your own rules for how to sort traffic based on UTM parameters in the Administrative section of Google Analytics, under “Custom Channel Grouping.”
Campaign: intended to identify the name of the thing you are promoting. Ideally, you will have lots of different Sources and Mediums that all share the exact same Campaign code. This is often the name of the performance, exhibit, course, or fundraising campaign. It’s a best practice to use dashes or underscores to separate words, use all lowercase, and minimize the number of words used so your Campaign parameter might look like:
Term: Google uses this parameter specifically for Google AdWords to identify what keyword was bid on, but YOU can use this parameter for anything you want! It’s a total free-for-all. If I’m tagging a social media ad, I’ll often use this parameter to identify the audience segment I was targeting. If I’m tagging an email, I’ll use this parameter to identify the date the email was sent or the list segment the email was sent to. So use the Term parameter for whatever you want that you think will help you better analyze your marketing efforts, and it might look like:
Content: google uses this parameter specifically for Google AdWords to identify which ad the link was placed in, but YOU can use this parameter for anything you want! Again, it’s a total free-for-all. If I’m tagging a social media ad or an email, I’ll often use this parameter to identify the type of content in the social post or email, such as a video, slideshow, or image, or I’ll use it to identify the specific text copy that we might be testing. So use the Content parameter for whatever you want that you think will help you better analyze your marketing efforts, and it might look like:
Put it all together: UTM codes are joined to the link that you’re posting by a question mark and by convention typically appear in the order listed above. So we put all of those things together, and your link might look like:
This is the full link that you would include in your email newsletter on 31 December using a 30 second video to promote Beauty and the Beast. If there are two different places in that same email where you’re promoting that show, just change the Content parameter. If you’re also promoting the show via a video Facebook ad, change the Source, Medium, and Term (but leave Campaign and Content as-is).
Google created the “Campaign URL Builder” website to help you create that long link:
‘Enter the website URL and campaign information example chart’
There’s also a plethora of free or cheap tools you can find online that help automate this process, including Excel add-ons, Chrome extensions, Google Sheets add-ons, etc. Do a little googling to find the one that fits your needs best.
If you decide to go the manual route, it’s still great to use a spreadsheet to keep track of all your parameters throughout a campaign, and that spreadsheet might look like:
Capitalized letters can wreak havoc on your well structured and planned UTM codes. For example, if you accidently use “beauty_beast” and “Beauty_Beast” Google will think that those are two different campaigns, and not group the data together in your Campaigns reports. If you think you might get a little sloppy with capitalization (I know I’m guilty of that!), create a filter in Google Analytics that will force all URL data into lowercase automatically:
Creating a filter in google analytics example
Have you lost sight yet of why we started using UTM codes to begin with? Now that your UTM codes are on all of your digital marketing links, you can start using them to understand which source, medium, term, and content is performing the best for each of your campaigns. So if everything went as planned, you have a nice organized list of campaigns:
Campaign list showing acquisitions
And you can click on any of those campaigns, and see which marketing channel is generating the most ticket sales:
More campaign acquisitions information
Or which audience segment that you created for a Facebook ad campaign is generating the most ticket sales:
example sheet showing which audience segment is generating the most ticket sales:
Or which type of content is generating the most ticket sales:
Once you understand the rules and conventions of how to use UTM codes, there’s a world of analysis that’s possible in Google Analytics – hopefully making more efficient use of your limited marketing budget. But it’s not enough for a single person to follow all the rules and conventions – everyone at your organization has to share the same practices! I often find that’s one of the hardest parts of campaign code management – just keeping everyone on the same page and using the same naming conventions. It’s helpful to share a single spreadsheet that tracks all UTM code parameters at the organization, and to have regular meetings with all of your marketing staff who might need to use UTM codes in their work so that everyone can work out discrepancies.
Good luck with your campaign tagging and may the magic of UTM codes help all of your online marketing efforts succeed!
Header Image courtesy of Liverpool Biennial 2016 © Joel Chester Fildes — Rita McBride, Portal, 2016.