UTM Tracking: What Are UTM Codes and How Do I Use Them?
As a marketer, you know that your marketing is driving traffic to your client's websites, but do you have the hard data to prove it? On a client call, can you show which exact tweets or guest posts helped generate leads, and which ones failed?
There is an old Peter Drucker quote – "what gets measured gets managed" – that is more applicable than ever to modern agencies. Unless you can measure the impact of your marketing, you can neither improve it nor use it as proof of your work.
This is where UTM tracking come into play.
These special codes can be added to the end of any URL to track the performance of your marketing activities.
In this post, I'm going to help you understand UTM codes and show how you can use them to track your marketing performance.
What are UTM codes ?
A UTM code is essentially a snippet of text that helps you track the success of a content piece across the web. Metrics you track via UTM codes show up in your analytics report to give you a clearer insight into content performance.
UTM stands for "Urchin Traffic Monitor". This name comes from Urchin Tracker, a web analytics software that served as the base for Google Analytics.
A UTM code looks something like this:
The part in red starting after '?' is a UTM code. As you might have guessed, this particular code tracks who sent the traffic to the page (i.e. the source).
The UTM code itself has two components:
- UTM Parameter - that starts with utm_. There are 5 separate parameters such as utm_source, utm_content_, etc. (see more below)
- Tracking variable – a unique variable that to track the metric being measured (such as traffic source). This variable is preceded by the "=" sign. You can have only numbers, letters, hyphens, '+' sign and periods in the variable.
UTM codes can be long and complex. Take, for instance, this Inbound.org URL (from a Facebook post click):
This code tracks multiple variables, such as traffic source, traffic campaign, etc.
Adding the UTM code doesn't impact the actual page. You can very well delete the UTM code from the URL and the page would continue to load normally. The code only serves one purpose: to help your analytics tool track the visitor.
For agency marketers, this means that you can use these codes to calculate the impact of your content. If you've ever struggled with marketing attribution, UTM codes will come extremely handy.
What can you track with UTM codes ?
There are five different UTM parameters. Here's what you can track with them:
1. Traffic source: This helps you track where the traffic originated from. The parameter is utm_source
- Example: utm_source=twitter
2. Source content: In case you have multiple links on a page pointing to the same URL (such as a landing page with two CTA buttons), this code will help you track their performance. The parameter is **utm_content
- Example: utm_content=navlink
3. Traffic medium: What medium the traffic originated from – search, social, referral,etc. The parameter is **utm_medium_
- Example: utm_medium=socialmedia
4. Campaign: This helps you group campaigns together in your analytics. The parameter is **utm_campaign
- Example: utm_campaign=example-campaign
5. Keyword term: What keyword term the visitor came from (mostly used in PPC tracking). The parameter is **utm_term - Multi-word keywords are combined using the '+' sign.
- Example: **utm_term=growth+hacking+tactics
You can use these codes in any combination by separating them with the '&' sign.
Thus, you might have a simple code that tracks your campaigns, like this:
Or you might have a more complex code that tracks the campaign, traffic source, medium and content, like this:
Once you create a UTM code, you can track it in Google Analytics by going to Acquisition -> Overview -> All Traffic -> Source/Medium, or Acquisition -> Campaigns -> All Campaigns. You might see something like [this]:
How to create UTM codes ?
There are multiple ways to create UTM codes. Below, I'll cover the most popular ones:
1. Manual method
There is nothing technically complicated about UTM codes. If you're running a small campaign or just testing how they work, you can go ahead and create them manually.
This is as simple as typing in individual parameters at the end of your URL.
For example, suppose I'm running a guest blogging campaign and want to track the number of clicks to my author bio link on social media.
Thus, I might have a URL like this:
Keep in mind that you're completely free to use any variable you want with the UTM parameter; you don't have to write 'social' for medium. You can very well use 'xyz' instead.
Of course, using standard variable names (such as "facebook" for source or 'ppc' for medium) makes tracking things easier.
I don't really recommend the manual method for anything beyond testing. UTM codes can get pretty lengthy and you're bound to make mistakes.
2. Google URL builder
Google's URL builder gives you a quick way to create UTM codes. You can find this tool here.
To use it, simply enter your website address. You are required to enter the campaign source (so that you can keep track in All Traffic -> Source/Medium); the rest of the parameters are optional.
After entering your desired parameters, scroll down to see your URL.
You can now use this in your campaigns.
Ways to use UTM tracking
You now know what UTM codes are, what metrics they can track and how to create them.
The most important question still remains: how do you _actually _use UTM codes to track your marketing campaigns?
There are essentially three ways you'll want to use these codes:
1. Know where your traffic is coming from
Every visitor to your site essentially has three 'sources' of traffic:
- The medium the visitor came from, such as a social network or a search engine.
- The exact source within the medium, such as Google Plus or Facebook (among social networks).
- The exact referrer within the source, such as a specific Facebook page or Twitter user.
Thus, when someone asks you "where did this traffic come from?", you might say that it came from social media -> Twitter -> HuffingtonPost.
Google usually does a good job of tracking the source in case of popular websites. You can see in your Google Analytics how many visitors came from Facebook or Twitter.
But what if you wanted to track traffic from forum posts and blog comments?
In such a case, Analytics would simply show the traffic as a "Referral".
However, by using the utm_source parameter, you could tag all links posted on forums separately.
For instance, you might have two links for different traffic sources:
Facebook: utm_campaign=socialposting&utm_source=facebook Forums: utm_campaign=forums&utm_source=forum
Every time you left your link in a forum post, you'd use link #2. This would enable you to track the exact traffic source in Google Analytics.
2. Know which links people are clicking in a campaign
Suppose you run a newsletter for your client. Every week, you send out half a dozen links to interesting stories from around the web. In-between, you also include a couple of CTAs to your client's site.
You probably already know the newsletter open and click rates. But do you know which links in your newsletter get the most clicks, which get ignored?
This is where UTM codes come in handy.
By adding the _utm_content _parameter to different links in the newsletter, you can track the number of clicks they receive:
Thus, a shopping newsletter might have two separate codes for shoes _and _jackets, like this:
Now when you log into Google and go to Acquisition -> Overview -> Campaigns -> All Campaigns, you'll be able to see which link in the _mailchimp _campaign drove more traffic.
There are countless ways to use this UTM parameter. For instance, you might create separate utm_content codes for individual banners in a banner ad campaign. Or you might add a custom code to your email signature link to track its total clicks.
3. Bunch traffic from different mediums together
Suppose you're running a social media marketing campaign for a client.
As part of your marketing activities, you share your content on popular social networks – Facebook, Twitter, etc. These show up under the "Social" channel in Google Analytics
However, what if you promoted the content on social networks that Google doesn't recognize as "social" in GA, such as imgur.com?
In such a case, you'd have no way to show your social marketing results.
This is where you can use utm_medium. By adding utm_medium=social to all links you share on any social channel, you can track your marketing performance.
You'll find that the utm_medium parameter is particularly useful for doing a macro-level analysis of traffic patterns. You can club all links into a few broad mediums – social, search, email, referral, etc. – to measure their traffic over time.
4. Track traffic for different campaigns
If you had a new product launch, can you tell with certainty that the traffic came from the launch campaign? How many of your holiday marketing campaigns led to successful conversions?
Tracking these metrics is one of the hardest things for marketers. Basic GA data makes it next to impossible to figure out which marketing campaigns are driving your current results.
The utm_campaign parameter solves this problem.
For instance, if you were running a new 20% off discount campaign, you could organize all your links like this:
Here's another example: suppose you wanted to track the marketing performance for different customer personas.
You could organize all personas into different campaigns, like this:
These are just some ways to use utm_campaign. As an agency marketer, you'll find this parameter indispensable.
Things to keep in mind when using UTM codes
Before you start using UTM codes in your campaigns, there are a few things you should keep in mind:
1. Establish naming standards from the start
It's important to establish naming conventions at the start of each campaign. If half the people on your team are using facebook-com, the other half using facebook under "utm_source", you'll just get muddy data.
Before you start a campaign, agree on naming conventions for common parameters. This should include the names for different mediums ("social" vs. "social media", "search" vs. "organic search", etc.) and traffic sources ("facebook" vs "facebook.com" or "reddit" vs "reddit.com").
2. Use easy to understand names
Your campaign, content and source links should be easy to understand. Anyone looking at the code should be able to figure out at one glance what the code means.
For instance, here is a UTM tracking code used by Inbound.org
Based on the campaign name alone, you can see that it targets worldwide Facebook users who have been logged in for 30 days or more.
Anyone can understand this UTM code even if they have no idea what's going on behind the scenes.
In contrast, consider this UTM code:
Not only does this code use the same name for multiple parameters (term, medium, and campaign), the name itself is nonsensical. Without context, it is impossible to understand what this code is actually tracking.
3. Use link shorteners for user-friendly URLs
The complexity of a UTM code is directly related to its length. As you start running more sophisticated campaigns, your URLs will become longer and longer.
This isn't the best thing from a UX perspective.
The solution: link shorteners. By using Goo.gl or Bit.ly, you can turn lengthy links into more shareable URLs.
Over to you
If you've ever struggled to track the performance of your marketing or justify expenses to clients, UTM tracking will come extremely handy. You can track everything from the performance of each campaign to the source of your traffic.
Just be sure to use the right naming conventions and hide lengthy links using link shorteners.