What are UTM codes?
A UTM code is a snippet of simple code that you can add to the end of a URL to track the performance of campaigns and content.
UTM stands for “Urchin Traffic Monitor”. This name comes from Urchin Tracker, a web analytics software that served as the base for Google Analytics.
You will often find them when you click on links, and you are directed to a different website. When a UTM code is being applied you will see something like this in the URL bar:
The best thing about UTM Codes is that they can be created easily, and make your analytics so much more accurate.
What can you track with UTM codes?
There are 5 variants of URL parameters which you can track; source, medium, campaign, term and content. When you track audiences and activities via UTM codes, they will show up in your Google Analytics reports and will give you a clearer insight into marketing performance. Particularly because they allow you to gain understanding about specific behaviours and allow to accurately monitor goal conversions.
A UTM code itself has two components:
UTM Parameter – that starts with utm_. There are 5 separate parameters you can track: utm_source, utm_campaign, utm_content, utm_medium, utm_term (more on these below).
Tracking variable – a unique variable to identify the dimension being tracked (such as the name of the traffic source). This variable is preceded by the “=” sign. You can have only numbers, letters, hyphens, ‘+’ sign and periods in the variable (though consider these carefully, as you want to keep your tracking consistent).
UTM codes can be long and complex. Take, for instance;
This UTM code example tracks multiple variables, such as traffic source, traffic campaign, etc.
Adding a UTM code doesn’t impact the page in question, or its content. You (as a user) 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 to track the source of your visitor.
For marketers, this means that you can use these tracking elements to calculate the impact of your campaigns. If you’ve ever struggled with the lack of specificity or lack of detail within analytics, then UTM codes will definitely help.
What do the UTM Code parameters mean?
We have already identified the five different UTM parameters. The first 3 are by far the most used; ‘Source’, ‘Medium’ and ‘Campaign’), but for additional insights you may also choose to track all 5. Here’s exactly what you can track with each:
1. Traffic Source
The source parameter allows you to track where the traffic originated from. The parameter added to your URL is utm_source. Sources you may track could be facebook, google, bing, a business domain, or the name of an email list.
Example: &utm_source=twitter or &utm_source=sports-list
The medium parameter tracks what type of traffic the visitor originated from – cpc, email, social, referral, display, etc. The parameter is utm_medium_
3. Campaign Name
The campaign name parameter allows you to track the performance of a specific campaign. For example, you can use the campaign parameter to differentiate traffic between different Facebook Ad campaigns or email campaigns. (See more on naming conventions below). The parameter is utm_campaign.
In case you have multiple links pointing to the same URL (such as an email with two CTA buttons), this code will help you track which link was clicked. The parameter is utm_content.
5. Keyword Term
The keyword parameter allows you to track which keyword term a website visitor came from. This parameter is specifically used for paid search ads. The parameter is utm_term.
How to use UTM Codes to track marketing activities
You can use these any of these UTM code parameters in any combination by separating each parameter with the ‘&’ sign.
Therefore, you may have a URL that simply tracks visitor actions from an email campaign.
By adding the utm_campaign parameter, you can track the performance of the “Handbag Sale 2021” email campaign in Google Analytics.
Do you want to know how many sales were generated from the email campaign? UTM links are the answer.
You may also choose to have a more complex code that tracks multiple parameters. Here is an example of tracking the source, medium, campaign name, medium and content:
Once you add the UTM code to your campaign’s URL, you can track the performance in Google Analytics in a few different reports.
Create a custom report under “Customization” > “Custom Reports”. Add Medium, Campaign, or Source as a dimension and the metrics you want to view.
Go to Acquisition -> Overview -> All Traffic -> Source/Medium to view traffic.
Go to Acquisition -> Campaigns -> All Campaigns to view traffic based on your custom campaign names.
When should you not use UTM?
As you can see UTM codes can be really powerful both as a tracking and attribution tool. However, they aren’t perfect, and need to be used properly to be effective.
They can look spammy
People can be put off a link if they see a long string of tracking data with words and code they don’t understand. Even as seasoned marketers we can be put-off by long strings of code in links. Remember too that the UTM parameters can be removed from the URL strings. If they are removed, you will lose the tracking ability for that user journey.
When you Show the link to users
Don’t use UTM parameters on displayed links, such as within social media sites. Make sure your anchor text is clear, and the link behind it contains the parameter.
In short, use the UTM code on links that aren’t outwardly displayed, otherwise you will likely turn off those who would otherwise click on your link.
How to create UTM codes?
There are multiple ways to create UTM codes. Below, I’ll cover the most popular ones:
There is nothing technically complicated about UTM codes. Your first option is to manually create and add the parameters.
This is as simple as typing in individual parameters at the end of your URL. The tricky part here is not making any errors, because UTM codes can get pretty lengthy (as we’ve already seen) and longer or more numerous the links, the more likely it is that mistakes will be made, so we generally don’t recommend the manual method.
However, if you simply want to add the name of a campaign or source to the end of a URL, typing it out is a simple option.
For example, suppose you’re submitting a guest post and want to track the number of clicks your author bio link receives. You might add a URL like this to the bio:
Automatic Creation; Google Campaign URL builder
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.
Copy and paste this link with the UTM code into your campaign or content.
How to use UTM tracking
You now know what UTM codes are, what you can track and how to create them, the most important question still remains: how should you actually use UTM codes to track your marketing campaigns?
There are a range of ways which you will want to use these UTM codes:
UTM codes will help you to answer some basic questions about your web traffic:
- Where the traffic coming from; campaign & channel
- Which campaigns and links are driving the traffic
- How is it getting to me?
UTM’s help you know where your traffic is coming from
The top reason to use UTM tracking is to help you know exactly where your website traffic comes from. You can accomplish this by using the campaign, source, and medium parameters.
Google Analytics displays default channel groupings in their dashboard. However, by using UTM parameters, you can track sources with more precision. UTM tracking is especially helpful to understand your referral and direct traffic in Google Analytics.
In Google Analytics, you can navigate to; Acquisition –> All Traffic –> Referrals to see which external sites generated traffic.
Alternatively, you can also do the same for emails; Acquisition –> All Traffic –> Channels –> Email
The difficulty with the referral tab in analytics is that it doesn’t take into account multiple posts from the same website.
For example, you may have guest posted 2+ times on a website, all that traffic will display in the same referral. However, by using UTM tracking parameters you will be able to see exactly which post generated traffic, and discern what actions they have taken.
By adding &utm_campaign=name-of-post to the end of your link(s) within guest posts on a website, you can see in Google Analytics which posts generated traffic. i.e. &utm_campaign=utm-tracking-guide
“Direct Traffic” is often another mysterious traffic source in Google Analytics. It primarily includes visitors that type your URL directly into their browser or bookmarked your page.
But, it also includes visitors that clicked links in emails, ebooks and other offline marketing materials (because they are sent directly to your website).
In order to improve the accuracy of your analytics data add UTM links that specify the source of traffic that would otherwise be categorised as “direct”.
For example, if you write an ebook that includes links to your website, add UTM codes to those links like the following:
In Google Analytics you can filter your traffic by source to understand how your ebook performed in generating traffic and new leads.
Perhaps we should just look at specific campaign traffic?
If you had a new product launch, how 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 Google Analytics 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 organise all your links like this:
Here’s another example: suppose you wanted to track the marketing performance for different customer personas.
You could organise all personas into different campaigns, like this:
These are just some ways to use utm_campaign, ultimately the parameters can be set however you want to ensure your tracking is highly accurate.
Learn which links people are clicking in an email campaign
Suppose you run a newsletter (either for yourself, or for a 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 (Call-To-Actions) driving traffic to your site.
Any good email newsletter provider will show you details such as opens, clicks and CTR (Click-Through-Rate). However, not all will accurately show which links in your newsletter get the most clicks, and which get ignored. Moreover, this isn’t reflected in your Google Analytics data. 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:
When you log into Google Analytics, go to:
Acquisition -> Overview -> Campaigns -> All Campaigns
You’ll then be able to see which link in your “Newsletter1” 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.
Understanding specific social media traffic
Suppose you’re running a social media marketing campaign.
As part of your marketing activities, you share your content on popular social networks – Facebook, Twitter, etc. These show up under the general “Social” channel in Google Analytics.
But, what if you promoted the content on social networks that Google doesn’t recognise as “social” in GA, such as Pinterest?
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 performance across all social networks.
You’ll find that the utm_medium parameter is particularly useful for doing a macro-level analysis of traffic patterns. You can group all links into a few broad mediums – social, cpc (cost-per-click), search, email, referral, etc. – to measure their traffic over time.
The utm_medium parameter is especially helpful for differentiating paid traffic.
For example, all of your traffic from Facebook will appear as “social” by default in Google Analytics. If you are running paid campaigns in Facebook Ads, you don’t want that traffic grouped with your organic social traffic.
By adding utm_medium=cpc or utm_medium=cpm to your Facebook Ads URL, you can group all paid traffic into one report.
Top Tip for using UTM codes
The biggest tip we can give you is to start as you mean to go on; this means naming things properly.
These names need to be easy to understand by you, your clients or colleagues.
Think about the KISS principle; KEEP IT SIMPLE STUPID.
Whether naming campaigns, traffic sources or mediums keep the naming simple. i.e. facebook; email; launch-offer
Notice how those were all lower case. That was intentional.
Capitalisations, dashes and underscores all play a part in UTM codes, so it’s important that whichever you use, you stay consistent with it.
The final part of this tip refers to numbers. Again, the simplicity rule applies. Only use numbers where necessary.
Keep in mind, that anyone in your team or company should be able to understand what the UTM code is about just by looking at it.
Good luck, and happy tracking!