Guide to UTM Codes: What Are They and How to Use Them?

James Parsons by James Parsons Updated Aug 18th, 2024 12 min read 4 Comments

0:00 Listen to audio podcast

Utm Codes

Website traffic is an astonishingly complex subject. You can't just put a hit counter on your pages and get any value out of it. You need to track the information. Let me pose to you a few questions.

  • You write a guest post for a site with two links to your landing page in it; one in the intro paragraph and one near the end. Which one is referring more traffic to your site? They both show up as the same traffic source in analytics.
  • You post every day on Facebook. Which posts are referring the most traffic to your site? They all just show Facebook as their referring URL.
  • You want to get a quick read-out in Google Analytics of all of your traffic that came from email newsletters. Can you get it?

Answering these questions and providing this data is difficult or impossible if you don't have advanced tracking set up.

The solution is UTM parameters or UTM codes.

What Are UTM Codes?

We tend to take Google Analytics for granted, but did you know it wasn't originally developed by Google? The core of what Google Analytics is today was developed by a company called Urchin Software. Google does this a lot; rather than developing a product they want to see, they buy a company that did a lot of the work already and brand the product as their own.

Urchin was an analytics company, and they had several products. Aside from the one that became Google Analytics, they also had a unique set of URL parameters that referred data to their software. No, UTM doesn't stand for Universal Tracking Modules. These parameters were collectively called the Urchin Tracking Modules. Google acquired them back in 2005, rebranded its main analytics as Google Analytics, and kept the tracking modules as an optional tool simply called UTM.

Urchin Analytics

What are they, and how do they work? Well, I guarantee you've seen them before. Here's a real-life example. Moz has a Twitter account, and they frequently link to posts they publish, like this one here:

That Twitter post has a link in it. The link is, of course, filtered through t.co, Twitter's shortlink service, but the page it actually links to is this:

https://moz.com/blog/link-building-webslog

But that's the thing - if you click that link and look up at your URL bar, you'll see something different. You'll see this:

https://moz.com/blog/link-building-webslog?utm_source=twitter.com&utm_medium=social&utm_campaign=2020-link-building-webslog

This URL actually has several elements to it. It has the core URL, and then it has a question mark, and then it has a bunch of extra stuff. Remove that stuff and you still get to the same page. So what is it? Well, if you're paying attention, you can see that all of those additional bits of information – the URL parameters – are prefaced by UTM. Those are UTM codes.

In this instance, we see three of them:

utm_source=twitter.com

utm_medium=social

utm_campaign=2020-link-building-webslog

These are three different kinds of UTM parameters, out of five possible options. Let's dig into each of them and see what they mean.

1. UTM Source: The first parameter is Source, and is generally used to specify the overall source of the traffic. In the Moz example, it's Twitter.com. If you go to their Facebook page and find a post about the same article, you can bet that you would see Facebook.com there instead of Twitter.

2. UTM Medium: The term "Medium" is generally used to specify the type of marketing channel. In this case, it's social, because Twitter is a social media platform. A Facebook version would still say social, as Facebook is a social media platform as well. You can use this to specify other kinds of mediums, including paid advertising, organic traffic (such as from that guest post hypothetical), or email newsletter traffic.

3. UTM Campaign: Campaign is usually used to specify the overall marketing campaign the content is part of. In this case, it's a campaign specifically related to that post they wrote. You often see campaigns like "spring-sale" or "trade-show" or what have you, as ways to specify an overall campaign. This allows you to check back later and see all of the traffic that is related to that campaign in one place.

4. UTM Term: Term is a parameter that isn't often used. It exists to allow you to specify a search term or keyword that was used to find the link. Most of the time, it was used as part of paid ads, to allow you to separate traffic based on a keyword. Since Google Ads and most other advertising platforms have that functionality built-in these days, no one needs to use Term anymore.

5. UTM Content: Content helps answer one of my hypothetical questions at the top: if you have two links in the same blog post pointing to the same landing page, how do you tell which one was clicked? The source, medium, and campaign are all the same, so you differentiate them by using different content specifications.

Note that utm_source, utm_medium, and utm_campaign are all required fields in the Google URL Builder (more on that later) while Term and Content are not. That said, absolutely nothing stops you from only using one of them, it's just not considered to be the best practice.

Required Field For Utm

Also, you can put anything you want in each of those fields. You don't have to use the source to specify a source, the medium to specify a medium, or what have you. You can put codes in there, you can put search terms in there, or whatever you want. The usage specification is just the way Google organizes things and is a sensible way to use UTM codes.

How do these parameters work? Well, they tie into Google Analytics. Google sees the UTM parameters on a URL when a user clicks it, and they record data about the user's visit. It's all of the usual data; bounce rate, dwell time, pages clicked, and so on. That individual data is, however, then tagged with additional information based on the UTM codes.

Utm Tags On Analytics

Z
Z
Z
Is your blog earning you business? If not, let's fix that.

We create blog content that converts - not just for ourselves, but for our clients, too.

We pick blog topics like hedge funds pick stocks. Then, we create articles that are 10x better to earn the top spot.

Content marketing has two ingredients - content and marketing. We've earned our black belts in both.

If you run an internet-based business and are looking to scale, schedule a call to speak with our founder:

What this does is allows you to essentially filter your data by "keyword" in Google Analytics, where the "keywords" are the individual codes. You can view all traffic that falls under the UTM Campaign "Spring Sale" and see how your spring sale marketing did overall. You can filter your traffic by Twitter to see just traffic coming from Twitter that you've tagged as Twitter-sourced, rather than just Google's list of all data coming with Twitter as a referrer.

How Should You Use UTM Codes?

UTM codes are a rabbit hole. They can give you a lot of extra insight into your traffic. As Buffer says, they can answer three primary questions about your traffic:

  • "Where is the traffic coming from?"
  • "How is it getting to me?"
  • "Why is it coming to me?"

The thing is, you can't retroactively gain this information. UTM tags only track information about URLs with the tags attached.

Therefore, the first thing you need to do to use UTM parameters is to decide how you want to use them. How granular do you want your information? Do you want to use the two optional parameters or just the three required parameters? The most common scheme is, of course, the way the parameters are defined above.

Now, how do you implement them?

Technically, all you need to do is type the parameters after your URL anywhere you want to use it.

Of course, manually typing parameters can be tedious, time-consuming, and prone to errors, which is why most people use a URL builder.

The core URL builder is provided by Google. You can find it here. It has fields for the base URL, each of the five terms, and a field for the completed URL. Enter each of your parameters, copy the full URL, and use it on your social media, paid ads, or other marketing channels.

Campaign Url Builder On Google

There are other URL builders you can use instead of (or in addition to) it - if you want. UTM.io offers a chrome extension, for example, and many platforms like Buffer have one built into their marketing tools.

Once you've implemented UTM tracking on your URLs, you just have to figure out how to make use of that data. To do that, you need to browse it in Google Analytics. It's easy enough; just log into your dashboard and click on the acquisitions tab. Under "All Traffic" you'll see Source/Medium, which will list out those parameters for you. Under Campaigns, you'll see the campaigns you've tagged and can filter there as well.

I do have a few "protips" for you when using UTM parameters.

  • Try to only use -s instead of _s or +s or anything else you'd want in place of spaces in terms. So, "Facebook-ads" instead of "Facebook+ads".
  • Stick to consistent capitalization. "LinkedIn" and "Linkedin" are different terms.
  • Be descriptive. Yes, people can read your URLs and see what you're tracking, though few do. Still, it's better to have campaign=spring-sale than campaign=ae53n2q and then have to have a reference document to know what ae53n2q means.

You may also want to use a URL shortener to "hide" those tracking elements from users. Some people online are very skeptical of lengthy URLs and will avoid clicking them when they're full of tracking nonsense. A short URL can at least partially hide them until they've clicked it. Extremely savvy users might use a URL expander to reverse it, or might avoid clicking on short links too, but the number of people you lose to that is minuscule.

Are There Drawbacks to Using UTM Codes?

It seems like UTM codes give you a bunch of useful information, so are there any drawbacks to using them?

First of all, there's the point I mentioned already, that some people don't like being tracked and will avoid clicking on links that have tracking data attached. These days the number of people doing so is pretty small, so this isn't a huge concern.

Some marketers are also concerned that there may be SEO implications. After all, aren't parameterized URLs the entire reason rel="canonical" was invented? Yes, and no. Google is smart enough to ignore everything after the ? in a URL, so you won't get pinged for duplicate content or anything like that. There are no SEO implications for UTM parameters.

Canonical Illustration

A more pressing concern is that, well, the data isn't entirely accurate.

See, studies have shown that 82% or more of sharing online, from person to person, is done via copy and paste of a URL. If I click on a Twitter link and like the page, so I copy and paste the URL to a friend of mine through Discord or Facebook Messenger, and they click it… your Google Analytics data shows two people clicking it through Twitter. All that tracking code is still there, but now it's incorrect. Worse, this can cascade.

UTM segmentation isn't perfect. Imagine I'm a powerful influencer on Facebook. I click on your link on Twitter, and I like the content, so I copy and paste it and share it with my Facebook audience. I have thousands of people who then share that post, and refer tens of thousands of hits to your site. However, that post is still tagged with Twitter's UTM data. The visitors are referred by Facebook, but the traffic source will be called "Twitter" in your Analytics due to the tags in my initial share.

Now, this is knowledge in and of itself. If you recognize that this can happen, you can see that specific data set by filtering for one referrer and one source that differ. Still, it's something you need to be aware of.

Also, keep in mind that some people strip URLs and only use clean URLs when they click or share. I do this myself, both for when I link to an article in my blog posts, and for when I share links to friends. When this happens, any traffic coming from, say, Discord, with stripped parameters, will show up in your analytics as Direct Traffic. This is often called "dark social" traffic and can be quite a conundrum for marketers to deal with.

I've also seen a few companies go absolutely overboard with UTM tracking. They use all five parameters, and they use unique parameters for every individual link in their orbit, from Facebook shares to paid ads to the link on their website's logo.

Example Paramaters

Sure, you can collect a ton of data with a granular set of tracking codes but it's also extremely tedious to manage. You need to keep spreadsheets of all the parameters you use, use them consistently, and more importantly, know how to extract value from them.

So, before you implement UTM parameters, you need to ask yourself what information you want to get out of them, and how best to implement them. Chances are, it's not more granularity. I recommend only using them on a few buttons or call to action areas that you want to watch closely.

What did you think of our guide on UTM parameters? Did we miss anything? Do you have anything you'd like to add? Do you have any questions for us? Let me know in the comments section down below! I respond to each and every comment.

Written by James Parsons

James Parsons is the founder and CEO of Content Powered, a premier content marketing agency that leverages nearly two decades of his experience in content marketing to drive business growth. Renowned for founding and scaling multi-million dollar eCommerce businesses through strategic content marketing, James has become a trusted voice in the industry, sharing his insights in Search Engine Watch, Search Engine Journal, Forbes, Entrepreneur, Inc, and other leading publications. His background encompasses key roles across various agencies, contributing to the content strategies of major brands like eBay and Expedia. James's expertise spans SEO, conversion rate optimization, and effective content strategies, making him a pivotal figure in the industry.