Measurement & Tracking Codes
Famous consultant and author Peter Drucker once said "If you can't measure it, you can't improve it." The great thing about digital marketing is that most activities are measurable, and thus can be optimized and improved in near real-time. How we go about measurement is through the wonder of tracking codes. The most common variation of the tracking code is the UTM parameter.
What are UTM parameters
Have you ever looked in Google Analytics, only to see that a large portion of your traffic comes from the "Other" channel, or that your best-performing paid social campaign is "(not set)?" If so, then you need to start using UTM parameters like yesterday! UTM parameters, or UTM codes, are snippets of text appended to a URL that allow you attribute performance to specific segments of traffic. A segment of traffic can be as broad as an entire search engine (i.e. Google) or as narrow as a single keyword (i.e. baby shoes). These UTM parameters get added to the end of the URL and are ultimately read by Google Analytics and a number of other analytics systems and CRMs.
How do UTM parameters work?
When appended to the end of a URL, the values in each UTM parameter are written to fields in Google Analytics that answer the question "where did this traffic come from?" Each UTM parameter (as does any URL parameter) follows the basic syntax parameter_name=value. The five UTM parameters are as follows:
Source (utm_source)
The originating source of the traffic. This is most commonly used to describe the website or channel that sent traffic to the URL that you are tracking. Some common examples of source values are google, facebook, bing, and cnn.com. At the end of the URL, the source will be sent in a parameter called utm_source.
Examples:
utm_source=facebook
utm_source=twitter
utm_source=google
utm_source=mailchimp
Medium (utm_medium)
The medium used to deliver the traffic. This is most commonly used to describe the grouping of websites that sent traffic to the URL that you are tracking. Some common examples of medium values are cpc, cpm, paid_social, referral, email. At the end of the URL, the medium will be sent in a parameter called utm_medium.
Examples:
utm_medium=cpc
utm_medium=paid_social
utm_medium=referral
Campaign (utm_campaign)
The name of the campaign or current initiative that this traffic is part of. This can be used either to describe a literal campaign in your paid search, paid social, or programmatic display account, or it can be used to describe a larger company initiative. How it is used should depend on the preference of whomever is the primary user of Google Analytics. If a paid search manager is the primary user of Google Analytics for his e-commerce account, then it's best for him to populate the campaign parameter with each paid search campaign name (i.e. Non-Brand_Shoes_Baby_Exact). If a marketing director is the primary user of Google Analytics, and she wants to get a high-level look at performance without getting too granular, then she may choose to populate the name of a current company initiative (i.e. Promo_Spring2021) in the campaign parameter. At the end of the URL, the campaign will be sent in a parameter called utm_campaign.
Examples:
utm_campaign=Non-Brand_Shoes_Baby_Exact
utm_campaign=Promo_Spring2021
utm_campaign=IG_SiteRetargeting
Content (utm_content)
A description of or identifier associated with an ad, email, newsletter link, video, or any content that may send traffic to the URL that you are tracking. This is a good place to put your email subject line or a specific button click within an email. When using Google Ads auto-tagging, Google automatically sends Headline 1 as the content value. If you're not using auto-tagging, you could have Google (or Bing) send the ad's ID to Google Analytics, and you can look up headlines and descriptions for each ad ID in a database or spreadsheet. There are many uses for the content parameter, so you'll have to determine what is best for you. At the end of the URL, the content will be sent in a parameter called utm_content.
Examples:
utm_content=March2021_50offSale
utm_content=tweet_how-to-fix-anything-with-duct-tape
utm_content=ad23438485871
Keyword (utm_term)
This parameter is used in paid search to show which keyword triggered the ad that was clicked on that brought the user to the URL that you're tracking.
Examples:
utm_term=lake%20house%20rental
utm_term=hockey%20mask
utm_term=chainsaw%20rental
Putting it all together
Each URL must follow the above syntax in order to function properly. Here is couple scenario that will help illustrate how to properly create a URL that attributes traffic to the UTM parameters that you set.
Scenario
You have a week-long 25% off seasonal promotion where you're driving traffic to a special promo page on mytotallyawesomesite.com primarily through email sent via Active Campaign and social media. You send two versions an email in order to A/B test subject lines, post once to Twitter, and post once to Facebook to support the promotion. In order to track how each of these activities performed, we would implement the following tracking URLs:
Email 1: https://www.mytotallyawesomesite.com/25offpromo?utm_source=activecampaign&utm_medium=email&utm_campaign=Feb2021_25Off&utm_content=25Off_SaveBig
Email 2: https://www.mytotallyawesomesite.com/25offpromo?utm_source=activecampaign&utm_medium=email&utm_campaign=Feb2021_25Off&utm_content=25Off_FOMO
Social
Twitter: https://www.mytotallyawesomesite.com/25offpromo?utm_source=twitter&utm_medium=social&utm_campaign=Feb2021_25Off&utm_content=25Off
Facebook: https://www.mytotallyawesomesite.com/25offpromo?utm_source=facebook&utm_medium=social&utm_campaign=Feb2021_25Off&utm_content=25Off
Auto-tagging & dynamic UTM parameters are like bread & meat
If you are managing large, complex paid search or paid social campaigns, it is quite impractical to manage UTM parameters for tens of thousands of keywords and ads. Thankfully Google, Bing, and Facebook have solutions for this.
Google has multiple ways to handle this.
The gclid (Google click ID) is a unique identifier that stores information relative to the five UTM parameters and a lot more information. When enabled in your Google Ads account, it is automatically appended to the URL and read by Google Analytics without the use of UTM parameters. However, if you are using another tracking system that reads UTM parameters, it will not read the gclid. Sometimes if you're using a third-party management tool that uses redirect URLs, auto-tagging may not work. Check with your tool's own documentation on Google Ads auto-tagging to ensure compatibility.
Tracking templates, + custom parameters + and Valuetrack dynamic parameters is a solution that allows you to put placeholders in URLs that get populated when a user clicks on your ad. For example, if I had utm_term={keyword} in my URL, and the keyword "dog sweaters" triggered my ad to show, whenever someone clicked on this ad they would see utm_term=dog%20sweaters show up in the URL. You can create what's known as a tracking template that dynamically fills in information for every single campaign, keyword in your account. If a particular parameter is missing from the list of available valuetrack items, you can assign a custom parameter to any campaign, ad group, ad, ad extension, or keyword in your account.
Bing
Bing uses tracking templates, custom parameters, and valuetrack parameters as well. Enabling auto-tagging automatically appends the below string to your URL:
utm_source=bing&utm_medium=cpc&utm_campaign={campaign}&utm_content={adgroup}&utm_term={keyword}
Facebook has its own version of valuetrack which allows you to dynamically insert any of the following into your URL:
Source: {{site_source_name}}
This will be populated as fb for traffic delivered on Facebook, ig for traffic delivered on Instagram, and an for traffic delivered through the Audience Network.
Campaign: {{campaign.name}} OR {{campaign.id}}
Ad Set: {{adset.name}} OR {{adset.id}}
Ad: {{ad.name}} OR {{ad.id}}
When creating an ad, you can click "Build a URL parameter" and then enter any of these applicable values in the campaign source, campaign medium, campaign, and content fields in order to dynamically track your ads. Whatever you put here will be automatically replaced by Facebook when someone clicks on your ad.
Caveats/words to the wise
Avoid the double question mark (?...?)
When building your tracking URLs with UTM parameters, always be aware if there is already a query string in the URL denoted by a question mark. If there is already a question mark, then begin adding your UTM parameters with an ampersand (&). For example:
Base URL: https://www.mytotallyawesomesite.com?id=2458
Wrong: https://www.mytotallyawesomesite.com?id=2458?utm_source=facebook&utm_medium=social&utm_campaign=spring2021
Correct: https://www.mytotallyawesomesite.com?id=2458&utm_source=facebook&utm_medium=social&utm_campaign=spring2021
Replace and encode characters ([space],|,&,/)
If you have an article named "Top 5 Interview tips for Google/Amazon/Facebook," and you'd like to pass this title in the utm_content parameter, you would need to encode the string to replace spaces and the forward slashes. If you don't a number of undesirable things may take place:
The page may not load.
The page may load, but tracking parameters get cut off and fail to show up as desired in Google Analytics and other platforms.
A simple, yet awesome, free tool will do the encoding for you, so you don't need to memorize that %20 = space, etc. In order to encode your UTM value, input your string, and click encode. Next insert the encoded string in the utm_content parameter of your URL.
You can also use the ENCODEURL() function in Excel and Google Sheets to accomplish the same thing.
Case matters
The values that appear in UTM parameters are case-sensitive. For example, utm_source=linkedin, utm_source=LinkedIn, and utm_source=linkedIn are read by Google Analytics as three different sources. Keep this in mind as you are creating your strategy for how you plan to track all of your campaigns and content.
Best practices when using UTM parameters
Before launching campaigns, determine your UTM naming convention, and stick to it. Make sure that anyone who creates a link also sticks to this naming convention.
Think about who needs to see these codes and how campaigns, mediums, and sources roll up into channels. Use this logic to make any necessary edits to your channel grouping rules in Google Analytics.
Use dynamic parameters and auto-tagging whenever possible.
For content and channels that do not allow you to use some form of auto-tagging or dynamic UTM parameter population, make sure that you lay out each URL along with its set of UTMs in a spreadsheet like this free tool we created for you to download. For any values that have spaces or any non alphanumeric characters (i.e. $,%,&,/), be sure to encode the string (our tool does this for you).
When sharing links on social media (especially Twitter), it's best to use a link shortener such as bit.ly. Some of the UTM creation tools such as Google's own tool actually have a link shortener built in or an integration with another tool that allows you to take your full URL with all UTMs intact and create a much shorter URL that redirects users to the your full URL.
Periodically review your traffic sources in Google Analytics, and make sure that any new sources and mediums are correctly mapped within your channel grouping rules.
Closing
In short, you absolutely should be using UTM parameters if you use Google Analytics and/or any other system that reads these codes. Without them, you run the risk of flying blind and not knowing which traffic is responsible for good and bad performance. If you need help creating and managing tracking URLs, download our free tool, and if you need help with your tracking and analytics strategy as a whole, don’t hesitate to contact us via the chat or the form down below.