How to Create UTM Tracking URLs on Google Analytics
Critical aspects of being a great marketer are being able to measure your success and measure your impact. Whatever metrics you use, you want to prove to your boss (and the company) that you’re worth it.
You deserve your budget – and you may need more of it – and you deserve to spend time on the marketing activities that work. Creating UTM codes that track the success of your campaigns is the best way to prove it.
This blog post will tell you what UTM codes are, how to use them, and how to build them in both Google Analytics and HubSpot.
UTM codes
UTM (Urchin Tracking Module) codes are fragments of text that are added to the end of a URL so that you can understand where website traffic is coming from when users click a link to that URL. Marketers adapt this text to the website to which this URL is linked in order to attribute the success of this campaign to specific content.
UTM codes are also known as UTM parameters – or tracking tags – as they help you “track” website traffic from where it originated.
Now you might be thinking, “Ginny, I have HubSpot, so I already know if my website traffic is coming from Google, email, social media, and similar marketing channels. What does a UTM code tell me that I don’t know yet? knows?”
HubSpot Marketing Hub gives you these high-ranking sources of traffic, but UTM also helps you break down specific pages and posts within these traffic sources.
UTM code example
For example, if you’re promoting a campaign on social media, you’ll know how much traffic is coming from social media.
However, creating a UTM code can tell you how much of that traffic is from Facebook or even a specific one post on Facebook.
Here is an example of a URL with its own UTM code highlighted in orange at the end of the following URL:
http://blog.hubspot.com/9-reasons-you-cant-resist-list? utm_campaign = blog post & utm_medium = social & utm_source = facebook
In the example above, you say that as soon as traffic comes from people who click this link, that traffic should be attributed to Facebook. The “medium” is social media while the “source” is Facebook.
Adding these snippets of code after the question mark above doesn’t affect the page – it just tells your analytics program that someone arrived on a specific campaign via a specific source within an entire marketing channel.
UTM tracking
UTM tracking adds UTM code, a code snippet, to the end of a URL in order to track the performance of your marketing campaigns and content, as well as the traffic sources of your website.
Best practices for UTM tracking
Here are some best practices to keep in mind when creating and using UTM tracking URLs:
- Make sure your URLs and links are consistent, clean, and easy to read (you can create a standard link tagging / UTM parameter guide to ensure consistency here).
- Keep a list of your UTM links so everyone on your team knows what starred links currently exist.
- Connect UTM tracking to your CRM (like HubSpot) to get an insight into your bottom line.
- Be careful with your URL UTM parameters so that your tags clearly indicate what you are tracking where.
- Stay in upper and lower case – UTM codes differentiate between upper and lower case.
- Keep the names short but meaningful (e.g. “US” versus “United-States”).
UTM parameter examples and use cases
UTM codes can track a medium and a source within this medium. It becomes more flexible in the language you use to describe this source. You might want to attribute website traffic to a social network, type of content, or even the exact name of an ad on the web.
Here are the five things you can track with UTM codes and why you can track them:
1st campaign
Campaign-based tracking tags group the entire content of a campaign in your analyzes. The following UTM sample code can be used to associate the website traffic with links that were placed as part of a 20% discount campaign that you hosted.
Example: utm_campaign = 20 percent promo code
2nd source
A source-based URL parameter can tell you which website is sending you traffic. You can add the following sample code to any link you post on your Facebook page to keep track of all traffic from Facebook.
Example: utm_source = Facebook
3. Medium
This type of tracking tag informs you of the medium in which your tracked link is contained. You can use the following sample UTM code to track all traffic coming from social media (as opposed to other media like email).
Example: utm_medium = social media
4. Table of Contents
This type of UTM code is used to keep track of the specific types of content referencing the same destination from a common source and medium.
It is often used in pay per click (PPC) campaigns or with two identical links on the same page as shown in the following UTM sample code.
Example: utm_content = sidebarlink or utm_content = headerlink
5. Term
A term or keyword based tracking code identifies the keywords you paid for in a PPC ad. If you’re paying to have a Google Ads campaign placed under the keyword “Marketing Software”, you can add the following UTM code to the end of the link you submit to Google to serve this ad.
Example: utm_term = Marketing + Software
The best thing about UTM parameters is that you can mix and match these codes in any way you want – use the basics (campaign, source, and medium) to keep track of all of your links, or use all of them to pinpoint your tracking.
It is clear that you can use a combination of UTM parameters in many ways:
- Track the success of specific marketing initiatives.
- See how well your social channels are promoting your content compared to what your followers are promoting your content.
- Measure the effectiveness of guest post referral traffic.
- Track the same content across multiple marketing channels.
- See where most people click your internal links in a blog post.
Okay, you’re on board with UTM codes … but how the heck do you set them up? It’s easy.
Below are instructions on how to set up and measure UTM parameters in Google Analytics and HubSpot.
How to create UTM codes in Google Analytics
Here are the steps to create UTM codes in Google Analytics.
1. Open the Google Campaign URL Builder.
There are three different types of tracking tags you can create in Google, two of which will help you track traffic to new apps on app marketplaces. You’re using the Google Analytics Campaign URL Builder – the third option on this list.
2. Complete each link attribute in the form below.
Visit the page linked above and click the link to view this URL builder. Then you will see the UTM builder shown below. Add the URL, Campaign, Source, and Medium information in the appropriate fields.
3. Use the link in your marketing campaign.
If you want to shorten it you’ll need a tool like bit.ly … or just use HubSpot’s URL Builder if you’re a HubSpot customer.
4. Measure your success.
If you’ve already set up Google Analytics for your website, Google will automatically track incoming campaigns. As in HubSpot, you can access it under “Audience”, then “Sources” and then “Campaigns”. Click on each campaign to view the source and medium.
And that’s it – you’ll have custom tracking codes set up and running in no time! In a few weeks you can justify your requirements, because you have the correct measured values available.
How to create UTM codes in HubSpot
How to create UTM codes in HubSpot.
1. Navigate to your analytics tools.
From your Marketing Hub dashboard, select Reports from the top navigation bar. Then select “Analysis Tools” from the drop-down menu as shown below.
2. Open the Tracking URL Generator.
In the analysis tools menu that appears, look at the bottom right corner. You will see the “Tracking URL Builder” option. Click this option at the bottom of the page as shown in the red box below.
3. Open the Tracking URL form to create a new UTM code.
If you create a web campaign that contains at least one UTM code, that campaign will be listed on the page shown below.
This page describes the source, medium, term, content and creation date of a tracking tag, which you can see in the screenshot below. At the top right, click Create Tracking URL.
4. Enter each attribute of your UTM code and click “Create”.
In the form that appears, fill in the URL, Campaign, Source and Medium fields. If you want to add content and term, you can do so in the lower two fields of this form. When you’re done, you’ll see an orange “Create” button below.
Click that and HubSpot will log your UTM code as a new campaign, and this link can be pasted on any webpage you want to track traffic from.
5. Use the shortened link in your marketing campaign.
6. Measure your success.
You can track your UTM parameters in your Traffic Analytics dashboard under “Other Campaigns” as shown below. Click on the individual campaigns to break down the source and medium.
As you can see in the second image below, the name of the campaign appears on the left – based on the text in the UTM code you created – with the traffic from people who used each URL to get to the main page of your campaign.
Start by creating UTM tracking URLs
Use the steps, best practices, and tools above to get started creating and using UTM tracking URLs so you can track the performance of your marketing campaigns and content.
Editor’s note: This post was originally published in September 2013 and has been updated for completeness.