The web is perfect for direct marketing. It’s so easy to use emails, ads, and social media posts to drive traffic to your website.
However, it’s very important to know exactly where your traffic is coming from. You can improve your business only if you measure it.
The good news: With marketing attribution, it’s easy to track your online campaigns.
The bad news: Most of us don’t know how to do it.
This is where UTM parameters come into play.
Pretty much all modern analytical tools support using UTM parameters. They’ve become practically the industry standard. If you aren’t using them, you’re missing out on the full potential of your analytics.
What Are UTM Parameters?
UTM stands for Urchin Tracking Module, and there are five UTM parameters you can add to a URL that points to your website.
When a visitor lands on your website, the UTM parameters attached to a URL tell you the source of that lead.
The five UTM parameters are:
- utm_content (optional)
- utm_term (optional)
I’ll go over what these mean in a minute.
The parameters were originally created by the company Urchin Web Analytics (that explains their name). In 2005, Google purchased Urchin and eventually turned Urchin’s product into what we know today as Google Analytics.
Why Use UTM Tracking Codes?
Bottom line: You want to know the source of a click to your website. Especially if you’re paying for traffic.
Typically, when a visitor clicks on a link on a webpage, the web browser passes back the previously visited webpage. This is known as an HTTP referer. (Note the misspelling — the person who created this feature didn’t know how to spell “referrer.”)
Want to see HTTP referer in action? Click on this link: What Is My Referer?
What you should see:
That link should show you something similar to what you see above (it may vary, based on how you arrived at this article).
The important thing is that it shows that you came from my website. That’s because the analytics on whatismyreferer.com noted LarryLudwig.com as the source of the website visit.
Many digital marketers use HTTP referer as the method of attribution. Unfortunately, the HTTP referer is not always reliable.
For an example of a blank HTTP referer, click on this link.
That was the same website source and the same website destination as the link earlier. But the HTTP referer was no longer passed.
We’ll discuss why in a minute.
If you don’t have an HTTP referer, your analytics tool will show traffic as being “direct.” This means the source of traffic is unknown. It can also mean the visitor typed your domain into their browser URL bar rather than arriving from a link. Obviously, in this example, that would be incorrect.
You want to reduce the number of falsely reported direct traffic entries. While you cannot eliminate them all, you should make it a goal to reduce them as much as possible.
I’ve said this many other times, and it’s worth repeating: Not all traffic is created equal.
The quality of your traffic is always more important than the quantity. Depending on the source and intent, some traffic converts better than others.
Shouldn’t you know that your paid Facebook ad converted better than the organic tweet you just sent out?
UTM parameters are the first part of the marketing attribution equation that will help you figure that out.
When Is the HTTP Referer Empty?
The HTTP referer is not always present. It should not be relied on and should be used only as a backup.
Here’s a list of possible situations in which the referral information would be blank:
- Many smartphone apps (email, social media, messenger, video players, etc.)
- A bookmarked link
- A rel=”noreferrer” HTML tag present in the source <a href> link. For WordPress version 4.7.4 and newer, this is enabled by default
- The visitor is behind a proxy server that removes the referral
- Linked clicked within an email
- Redirection from an https://-based website to a link that’s http://
- Links in documents such as PDF, Microsoft Word, PowerPoint, etc.
- A website visitor has an ad blocker plugin that purposely blocks the referral
- A spider, bot, or tool (i.e., “curl” or “wget”) that clicks on the link
When Should You Use UTM Parameters?
Pretty much every time!
Anytime you link to your website, you should be using UTM parameters. This includes:
- Paid search traffic
- Organic social media
- Paid social media
- Links in your profile for any publicly displayed source (i.e., social media)
- Affiliate links
- Offline (i.e., business cards) via a QR code
UTM parameters are NOT for organic search. The major search engines should correctly pass referral information. As well, you should not use UTM parameters for any links within your own site. Use UTM parameters only on links directed to your website.
What Do the UTM Parameters Mean?
There is a total of five UTM parameters. Three are required, and two of them are optional.
Here are the definitions of the options:
- utm_source — The source from where your traffic came. Examples: Facebook, Google, Twitter, ActiveCampaign, or a domain name (example.com).
- utm_medium — Identifies the type of link. Examples: organic, referral, CPC, etc.
- utm_campaign — The specific webpage, promotion, ad campaign, etc., of your source that the traffic came from. This parameter should be unique per campaign to help differentiate among campaigns.
- utm_content (optional) — Primarily used for A/B testing or sourcing which link was clicked on a web page with multiple links for the same campaign.
- utm_keyword (optional) — Used for paid search to note what keywords were used to land on your website.
Sometimes it’s easier to show than it is to explain. Here are some examples of UTM codes used on my own website.
External Website (Fastlane Forum)
I defined these parameters to track a link I have within my signature on the Fastlane Forum website.
I brand the top of every email I send out with my name logo. That logo is linked to the homepage of my website. I want to know which email the reader clicked on to visit my homepage. In this case, utm_content and utm_campaign change with each email sent out.
An example of a tweet that linked to an article on my website. I wanted to know that the traffic source came from Twitter.
Make sure to pass a UTM parameter for any link you control. That way, you’re sure to know the source of your traffic.
There’s no set standard when it comes to UTM tracking. Technically, you could use UTM parameters any way you please.
But if you aren’t organized, you may not be using the parameters effectively. In fact, it’s not uncommon to see UTM parameters used in the wrong way.
Here are my recommended guidelines for creating UTM parameters.
- Use a consistent naming convention – Use the same naming convention for utm_source, utm_medium, and utm_campaign parameters. This is why I recommend tracking the codes used (see my free tool). Using”facebook” for one utm_source and “facebook.com” for another will show up in your analytics as different sources. If working with a group, agree to the naming convention and — more importantly — stick to it!
- Use lowercase parameters – If you use mixed case, your analytics tool will show different sources. Some tools, including Google Analytics, can clean your UTM data, but they require additional configuration to set this up.
- Don’t use spaces – While any URL builder will correctly convert your options into a neatly formatted URL format, this makes it easier to read. Replace spaces with dashes instead.
- Use dashes not underscore – Underscores are often confused for spaces, so don’t use them.
- Never use UTM parameters on your own site – UTM parameters are for tracking the source of traffic external to your website. Don’t use UTM codes on your site to, say, track a button click, menu link, or between subdomains. UTM codes should be used only when linking from external sources.
- Never use parameters for organic search – Search is the only source in which you should not set up UTM parameters.
Obviously, you should welcome a third party organically linking to your site. In most of these cases, you can’t control the usage of UTM parameters. Just be thankful you have a link that can help with your SEO game.
While not comprehensive, here’s a list of recommended utm_source options.
Basically, these are all lowercase versions of the brands — minus the domain name extension. Note no spaces, dashes, or underscores.
- Bing – bing
- Delicious – delicious
- Digg – digg
- DuckDuckGo – duckduckgo
- Facebook – facebook
- Foursquare – foursquare
- Google – google
- LinkedIn – linkedin
- Pinterest – pinterest
- Quora – quora
- Reddit – reddit
- Tumblr – tumblr
- Twitter – twitter
- YouTube – youtube
As with the utm_source list above, this list isn’t comprehensive. You should stick to using at least these utm_medium options. Tools like Google Analytics expect to see them.
- cpc – A paid ad that was Cost Per Click
- email – Any link clicked from an email
- organic – For anything that’s organic search (meaning not paid for); Google Analytics will add this automatically
- push – A notification via web browser push
- referral – A link from another website or service
- social – For any organic social media traffic (read: not paid for)
How to Create UTM Parameters
Fortunately, you don’t have to know the tech behind creating a correctly formatted URL. There are tools that do this for you. Some of them are free!
Some services such as ActiveCampaign will automatically create the UTM parameters. In these cases, you just enable the option before sending out an email campaign.
Unfortunately, not all services support the use of UTM parameters. You’ll have to create these links manually.
Google has a free tool called Campaign URL Builder.
To use Campaign URL Builder, enter the URL and your desired utm_source, utm_medium, and utm_campaign options. Then you can use the optional utm_term and utm_content if you wish.
The program then spits out your URL, which you can copy and paste wherever it’s needed.
How to Track UTM Codes
If you create all these links but aren’t tracking them, they’re not doing you any good.
In addition, tracking the codes can help you avoid inconsistency and confusion if you have multiple individuals working on your website.
The easiest way to track UTM codes is by creating a Google spreadsheet. With Google Sheets, you can easily input and share UTM codes.
I’ve created a free template that you can use. The spreadsheet also follows my recommended formatting guidelines.
Not only can you manage all your links, but I’ve also included a Campaign URL Builder as well.
Sign up below to get your free copy.
How to Shorten UTM Parameters
A long URL can appear messy and confusing to a reader. Most individuals have no idea what all of this gobbledygook means. So when sharing URLs via email, social media, or other platforms, you should use a link tracker.
Bitly is very popular. It’s usually the first link tracker that comes to mind. However, the problem with Bitly is that the domain isn’t your own. You are required to use the “bit.ly” extension for all links.
In addition, for the free version, Bitly uses the same namespace for all customers. So if the link “http://bit.ly/demolink” is already taken (it is), you can’t use it for your purposes.
Bitly offers commercial packages beyond the free service, but they’re costly and lack many features.
On my previous website, Investor Junkie, I used the domain ij.cm for all shortened links. It looked nicer, was identifiable, and better matched my brand. You want these attributes for any shortened link you use.
Fortunately, there’s a better alternative to Bitly called Rebrandly. Rebrandly has all the features you want in a link shortener service:
- Your own custom domain name
- A built-in UTM builder
- Analytic reports for tracking conversions
- Lower price than Bitly’s paid options
Best of all has a free option which I use myself.
How to Hide UTM Parameters
To the average website visitor, UTM codes can be unsightly. Plus, it’s common for people to share links that already have UTM codes embedded in them from another source.
This means it’s possible to share a link that originated from Twitter on Facebook. Twitter would be wrongly attributed as the source of that click.
One way around this is to remove the UTM parameters once you have gathered their information.
Google Ads With UTM Parameters
If you’re like me and use third-party analytic tools, you also need UTM parameters as well.
Of course, because Google was the creator of UTM parameters, it has incorporated this functionality into Google Ads since the beginning. However, if you stay within Google’s ecosystem, you’ll have much less of a need for UTM parameters.
Google Ads has the ability to auto-tag the ads you create, which is great if you’re using only Google Analytics.
The auto-tagging system automatically appends a parameter called gclid when a user clicks on an ad. This gclid tag is an auto-generated random number to identify a visitor’s session. At a minimum, you should have this option enabled.
You can set this option so every ad you create automatically appends the correct UTM parameters. There’s no chance of mistakes or errors, and I recommend that every Google Ad user do this.
How to make the change is somewhat hidden in your Google Ads account. Perform the following steps to enable this option:
- In the left side menu in Google Ads for All Campaigns, select the Settings menu option.
- Then, at the top, select the Account Settings tab.
- Next, select Tracking – Use URL tracking option.
- Enter your tracking URL in the Tracking Template field. See below what I recommend you enter.
- Once finished, press the SAVE button.
Here’s is the tracking template I recommend using:
Using this template will automatically generate the correct parameters for your ads.
I also recommend you read more about the ValueTrack parameters, because there are many other options you can use that are beyond the scope of this article.
Facebook Ads With UTM Parameters
Like Google, Facebook wants to keep you within its ecosystem. Also like Google, it has its own equivalent of a gclid tag. Oddly enough, it’s named fbclid.
This auto-tags any click to your website. It’s great only if you use Facebook’s analytic tools.
Facebook recently got on the bandwagon of using UTM parameters for your ads. Until only recently, you were stuck using Facebook’s Pixel. While the pixel tracking was great, it kept you trapped in Facebook’s ecosystem. You couldn’t use your own analytics software.
To use this, edit any ad and go to the Tracking section. This is what I use:
Unfortunately, unlike with Google Ads, you’ll need to paste this into each ad you create.
NOTE: At the time of writing, Facebook’s own documentation for site_source_name is incorrect. It lists the variable as site.source.name, which isn’t correct. The correct usage is site_source_name.
You can use this setting for every Facebook ad you create. It will automatically append your Facebook Campaign Name and Ad ID. There’s no need to manually create this information. Cut and paste and go!
For more information, read Facebook’s guide on URL parameters.
Facebook decided to use its own naming convention for the site_source_name variable, so here’s what you’ll see in your analytics as the utm_source:
- fb – Facebook
- ig – Instagram
- msg – Facebook Messenger
- an – Audience Network (ads off Facebook)
It’s possible to rename the sources “fb” and “ig” in Google Analytics to represent the full source name to match your other data, but that’s beyond the scope of this article.
Microsoft Ads with UTM Parameters
Microsoft (Bing) is an often overlooked ad network and search engine. While the traffic can be a small percentage over Google Ads, there’s less competition for ad spend, so your CPC can be significantly lower. I’ve found the older demographics performs really well with Microsoft.
Either way, Microsoft Ads is pretty much an exact duplicate of Google Ads so it’s easy to learn and easy to start with. In fact, Microsoft has an import feature to suck in your ads from Google.
Unsurprisingly, UTM tracking is very similar to Google. Just like Google, there’s no need to insert parameters per ad. Instead, you can set it and forget it by creating a tracking template.
You insert this option below by selecting “All campaigns” in the left menu and then select “Settings”. Once in this section, you click on the “Account settings” tab. Add this option in the Tracking template field.
To turn on automatic tagging for conversion tracking with Microsoft also check off “Auto-tagging of Click ID”. This will automatically add Microsoft’s version of ‘gclid’ which is named ‘msclkid’ to every ad.
Once done, click on “Save”.
For more information for tracking template variables, please visit Microsoft’s documentation.
Using Google Analytics
After doing all of this work, you want a way to track this information. Fortunately, Google Analytics is a free tool that allows you to do just that.
I’m assuming you’re already using Google Analytics, right? If not, then get on that ASAP!
The area in Google Analytics you’re going to care about is under the Acquisition > All Traffic > Source/Medium section.
From this area, you can get the source and medium of all traffic to your website. It’s possible to also glean the campaign information by selecting a secondary dimension in the report. Just type “Campaign” in the drop-down list above the report (see screenshot below).
There are other sections of Google Analytics where you can use this information as well, but I’m not going to cover them in this article. Just be aware this information is now captured by Google Analytics.
Automatically Append UTM Parameters on an Order Form
I created the FREE WordPress plugin UTM Tracker for this exact purpose. The plugin does two things:
- Stores the UTM codes upon website entry. They then follow the user as they surf your website.
- Automatically appends the UTM codes (among other optional items) to any web form on your site. This can be any order form, contact form, mailing list form, etc.
You can then track these conversions in your mailing list, e-commerce system, or contact form. My plugin works with all of the major WordPress web forms.
How do UTM parameters work?
Are UTM codes case sensitive?
Which UTM parameters are required?
How do I remove rel=”noreferrer” in WordPress Links?
The rel=”noreferrer” option makes it harder for digital marketers to know the source of clicks. Affiliate programs like Amazon require it. So you should remove the “noreferrer” in your links. By default, WordPress offers no global option to change this. You can do this by installing this WordPress plugin.
Believe it or not, I’ve only scratched the surface of all of the useful you can do with UTM parameters. If you use them effectively, you can become a marketing ninja. It’s vital that you know the source of your conversions and improves your visitor tracking.