As a marketer, you know 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 generated leads and which ones failed?
An old Peter Drucker quote – "what gets measured gets managed" – 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 comes into play.
These special codes can be added to the end of any URL to track clicks and the performance of marketing activities.
In this post, I will help you understand UTM parameters and show you how to use these codes to track your marketing performance.
You’ll also get access to two Google Analytics report templates that will streamline your client reporting–these will save you loads of hours by automatically tracking your clients’ web analytics under one roof and showing your impact in easy-to-understand reports!
Looking for the Google Analytics 4 version? Check out the guide to Building UTM Parameters for GA4.
What Are UTM Tracking Codes?
UTM parameters are simple snippet codes that you add to the end of a URL to track the performance of campaigns and content. You can track 5 standard variants of UTM parameters: source, medium, campaign, term, and content. Dimensions you track via UTM codes show up in your analytics reports to give you a clearer insight into marketing performance.
UTM stands for Urchin Tracking Module, although some in the digital marketing industry still refer to it as the Urchin Traffic Monitor. Whichever one you use, 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 starting after '?' is the UTM code. As you might have guessed, this particular code tracks who sent the traffic to the page (i.e. the source).
The UTM tagging code itself has two components:
UTM Parameters - that starts with utm. There are 5 standard parameters you can track: utm_source, utm_medium, utm_campaign, utm_content, and 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). The "=" sign precedes this variable. You can have only numbers, letters, hyphens, '+' sign and periods in the variable.
UTM parameters can be long and complex. Take, for instance, this Inbound.org URL (from a Facebook post-click):
This UTM code example tracks multiple variables, such as traffic source, traffic campaign, etc.
Adding the UTM tracker doesn't impact the actual page. You can very well delete the UTM code from the URL, and the page will continue to load normally.
Why Are UTM Codes So Important?
The code only serves one purpose: to help your analytics tool track the source of your visitor.
For agency marketers, this means you can use these UTM parameters to calculate the impact of your campaigns. If you've ever struggled with marketing attribution, UTM codes will come in extremely handy.
What Can You Track With UTM Parameters?
There are five different UTM parameters. The first 3 are by far the most used parameters (Source, Medium, 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
Use traffic source UTM parameters to track where the traffic originated from. The parameter added to your URL is
utm_source. Traffic sources could be Facebook, Google, Bing, inbound.org, or the name of an email list. Remember, this should be the main traffic source and not a specific social media post (we'll get to that later).
UTM Parameters Example:
The medium UTM parameter tracks what type of traffic the visitor originated from – CPC, email, social, referral, display, etc.
These UTM tags help differentiate between paid social media ads and organic social media traffic based on viral Instagram posts, for example. The parameter is
UTM Parameters Example:
3. Campaign Name
The campaign parameters allow 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, Google ads campaign ID, or email campaigns. (See more on naming conventions below.) The parameter is
UTM Parameters Example:
In case you have multiple links pointing to the same URL (such as an email with two CTA buttons or various social media posts), use UTM parameters to track which link was clicked. The UTM parameter is
UTM Parameters Example:
You can also use these UTM tags to track the
effectiveness of your agency's YouTube SEO processes
by including the name or ID of the YouTube video that drove the click.
5. Keyword Term
The keyword UTM 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 Parameters Example:
Subscribe to the AgencyAnalytics Newsletter
Receive Agency Growth Tips, Delivered to Your Inbox
How To Use the UTM Parameters in Google Analytics
You can use these codes in any combination by separating each of the UTM parameters with the '&' sign.
Thus, you might have a simple URL that simply wants to track visitors’ actions from an email campaign.
By adding the utm_campaign parameter, you can track the performance of your "Spring Sale" email campaign in Google Analytics. If you run a Spring Sale every year, add the year to the parameter (e.g. utm_campaign=spring-sale-2022) to differentiate each year's campaign within the UTM tags.
Do you want to know how many sales were generated from an email campaign? UTM links are your answer.
You may also choose to have a more complex code that tracks multiple UTM parameters. Here is an example of tracking the source, medium, campaign name, medium, and content:
How to View UTM Code Performance in Google Analytics
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.
How To Create UTM Codes in Google Analytics?
There are multiple ways to create UTM parameters. Below, I'll cover the most popular ones:
1. Manual Method
There is nothing technically complicated about UTM codes. Your first option is to add the parameters manually.
This is as simple as typing in individual UTM parameters at the end of your URL. The tricky part here is not making any errors! UTM codes can get pretty lengthy, and you're bound to make mistakes, so I 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 I'm submitting a guest post and want to track the number of clicks my author bio link receives.
Thus, I might add UTMs tags to a URL like this in my bio:
2. Google URL Builder
Google's URL builder gives you a quick way to create UTM parameters. 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 UTM 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.
Create Professional Google Analytics Reports in MinutesStart Your Free Trial Today!
Ways To Use UTM Parameters
You now know what UTM parameters 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 essentially three ways you'll want to use these codes:
1. Know Where Your Traffic Is Coming From
The top reason to use UTM parameters is to know exactly where your website traffic comes from. You can accomplish this using the campaign, source, and medium parameters.
Google Analytics displays default channel groupings in their interface, making it easy to track UTM links.
However, using UTM codes, you can track sources more precisely. UTM parameters are especially helpful in understanding your referral and direct traffic in Google Analytics.
In Google Analytics, you can navigate to Acquisition -→ All Traffic -→ Referrals to see which sites generated traffic.
In this sample account, we see referral traffic from Quora.com.
However, what if you wrote 10 posts on Quora and wanted to know which post generated traffic?
&utm_campaign=name-of-post UTM parameters to the end of your link on Quora, you can see in Google Analytics which posts generated traffic.
Direct Traffic is often another mysterious traffic source in Google Analytics. It primarily includes visitors that type your URL directly into their browser or bookmark your page.
But, direct traffic also includes visitors that click links in emails, ebooks, and other offline marketing materials.
Add UTM links that specify the source of traffic that would otherwise be categorized as "direct."
For example, if you write an ebook that includes links to your website, add UTM parameters 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.
Use the Google Analytics dashboard template in AgencyAnalytics to see your refferal traffic in an intuitive way.
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 and which get ignored?
This is another situation where UTM parameters 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 UTM tags 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 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.
3. Group Traffic by Medium
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, Instagram, TikTok, 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 use UTM parameters to track your performance across all social networks.
You'll find that the
utm_medium parameter is particularly useful for conducting a macro-level traffic pattern analysis. To measure their traffic over time, you can group all links into a few broad mediums – social, CPC, search, email, referral, etc.
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!
utm_medium=cpm to your Facebook Ads URL, you can group all paid traffic into one report.
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.
Don’t Waste Another Billable Hour on Manual Reporting!Try AgencyAnalytics Free for 14 Days
Best Practices for UTM Tracking
Before you add UTM codes to your campaign links, there are a few things you should keep in mind:
1. Establish a UTM Naming Convention From the Start
It's important to establish naming conventions that your entire team will use. If half the people on your team are using "facebook.com," and the other half are 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. "paid search", etc.) and traffic sources ("facebook" vs "facebook.com" or "reddit" vs "reddit.com").
Even capitalizations or spaces will make your analytics a mess by splitting the same campaigns into two if you follow different conventions. Set up rules from the beginning.
Generally, it’s best practice to use all lowercase in your UTM links.
2. Use Easy-To-Understand Names
The UTM parameters for your campaign, content, and source links should be easy to understand. Anyone looking at the code should be able to figure out what the code means at one glance.
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 during the past 30 days.
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. Sure, you can create a naming convention that associates a campaign with a numerical code. But you're making analysis a lot more difficult by not creating an easy-to-understand name.
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 a tool like Bit.ly or Rebrandly, you can turn lengthy links into more shareable URLs. The shortened link will still keep the UTM parameters intact.
This is especially helpful for your social media posts.
Over To You
Improve your client reporting instantly with a SEM reporting tool that automates the data-retrieval process for all your clients.
Use this exact Google Analytics report template to automatically populate your clients’ latest data. Try AgencyAnalytics free for 14 days and automate your client reporting in minutes.
And remember to use the right naming conventions and hide lengthy links using link shorteners.