Google Analytics is by far the most used analytics tool. BuiltWith estimates that more than 80% of all websites worldwide use Google Analytics for measuring their website usage. Unfortunately, many of the people relying on Google Analytics for measuring their website traffic lack a good understanding of how it works and have not set up their UTMs correctly. Having a good Google Analytics setup (with proper UTM parameters) is the cornerstone of a successful marketing program.
This article focuses on how to use UTMs to ensure the traffic you acquire to your site shows up correctly in Google Analytics. For more details on the ins and outs of Google Analytics we recommend the official Google Analytics Help Center.
How Google Analytics knows where your visitors come from
When a person visits your website their browser reads the underlying HTML and CSS code in order to know what to show in the browser. Provided you have Google Analytics installed, part of this code is the Google Analytics script which executes when the browser loads the website. This code does a lot of things, and one of them is to interpret how the visitor ended up on the website. This is done by checking the URL that led him or her there. This is called the referrer URL.
For example, on website A there is a link to website B: http://www.websiteb.com/. Provided that website B has Google Analytics installed, visits from website A will show up in Google Analytics as
Source = http://www.websitea.com
Medium = referral
This is probably something you’ve seen in the Google Analytics interface before. But what does it mean?
Google Analytics dimensions
Google Analytics thinks of incoming visits in terms of a few dimensions. These dimensions are used for categorizing visitors into different buckets so you can understand where the website traffic is coming from. This helps you determine which marketing efforts are working well and which need adjustments.
There are five primary dimensions under your control that can be used for slicing up the traffic data:
Source: The referrer of the visits, e.g., google, facebook, bing, nytimes.
Medium: The marketing medium, e.g., cpc, organic, email.
Campaign: The name of the campaign, if applicable.
Term: Typically used for paid traffic only. Keyword when used for search ads. For other ad platforms, it is typically used for identifying the audience or the level below the campaign. For example, the ad set in Facebook.
Content: Typically used for paid traffic only and represents the ad’s content, which allows for identifying individual ads. E.g., blue-image or the name of the headline.
If you want to be able to track the performance of your marketing efforts on the campaign level, then you need to use the source, medium and campaign tags. If you want to be able to track performance to the ads level, then you need to use all five dimensions.
The two most important dimensions out of the five are source and medium. In fact, they are so important that they deserve a section of their own.
The Source and Medium dimensions
You can think of Source as who sent the visitor to the site, and of Medium as how. In our example above website A was the source of the traffic (the who) and it sent the visitor to website B by referring to it via a link (the how).
But don’t you always end up on a website by clicking a link? Well yes, except for when typing in the URL directly into the browser’s URL field (in that case source is “direct” and medium is “(none)”). However, although you typically end up on a given website by clicking a link, that doesn’t mean all links are equal. Medium = referral can be interpreted as the link recommends this other site with no other purpose than to recommend it, i.e., it refers to it.
Say you’re clicking a sponsored link instead. In that case, the “how” isn’t a simple referral, but rather a purposefully placed link that is paid for. The Medium should then be something along the lines of “cpc” (for cost per click), “paid”, or “ad”.
In order to get a better idea of what Medium is, here are a few common examples of how to use it:
referral: The default Medium if nothing else is set.
(none): Traffic with no referring Medium, i.e., direct traffic.
(not set): Traffic where Google Analytics is unable to figure out anything about the origin of the traffic.
organic: Organic search traffic. This does not include sponsored search results. Google Analytics automatically identifies non-paid traffic from major search engines (e.g., Google, Bing) as organic.
cpc: Short for cost per click and the typical categorization of paid traffic.
email: Traffic via links in emails.
social: Links from posts on social media websites.
video: Links in videos.
Medium can thus be quite a few different things, and in the end, it’s up to you how you want to use it. The important thing to remember is that it is rarely automatically set, which leads to all traffic showing as referrals in Google Analytics. This makes it hard to effectively categorize incoming traffic to get a good idea of which marketing efforts are working.
So, how do you ensure all visits to your website are categorized in a way that allows for comparing apples to apples?
Tagging incoming traffic
This is one of the most important tasks in online marketing and one that many advertisers don’t do well. The trick is to ensure that Google Analytics gets as much relevant information as possible about how a visitor ended up on the website. For example, a visitor may come in through a regular link on a website, an ad, a link in an email, etc. If you don’t tag your URLs Google Analytics will only extract limited information from the visitor. This means the source of the traffic and a guess of what the medium should be, which is typically, “referral”.
If you have created the link that leads to the visit of the site because you created an ad, put a link in an email you sent out, or published a post on a social network, then you typically have a lot more information about the visit that you want to pass on to Google Analytics. The mechanism that is used to tell Google Analytics where the visit is coming from is to add tracking parameters to the URL in the link. This overrides Google Analytics’ own efforts to infer the information. Tracking parameters are added at the end of the URL and start with a “?”. This means the browser ignores them and the address the URL is pointing to does not change. The tracking parameters are only used to transmit information to the site receiving the visit from the link.
The tracking standard used by Google Analytics is called UTM parameters. Because Google Analytics is the de facto standard for website analytics, the same applies to UTM parameters. You have probably noticed these at some point in the browser URL field after clicking a link. A typical URL in an ad could look something like this:
Everything after the “?” in the URL above is information for Google Analytics to correctly categorize visits from this link to the website.
If you’re lucky the publisher you’re buying ads from (e.g., Google) tags your ads’ destination URLs automatically. You can have Google AdWords and Bing automatically do this. But, these two are exceptions. In most cases, you either manually have to make sure your destination URLs are tagged correctly or use a third-party ads tool to automate it for a specific channel.
Luckily it is not particularly hard to add UTM parameters from a technical point of view. The hard part is being consistent. To help get the technical bits right, Google has created a URL builder that lets you generate URLs that Google Analytics can make sense of. It’s not very fancy, but an easy way of making sure the UTMs are correctly formatted. It’s then up to you to make sure the UTM tags make sense and are consistent. We’ve also built our own campaign name and URL builder tool that allows you to create nice structured advertising campaign names and automatically include these in your UTM tagged URLs.
Guidelines for tagging URLs
Below are the most important guidelines to follow when using UTMs in URLs. Use them to create a framework that fits you. Make sure to write down the rules and conventions in a document so it is available to everyone in your organization.
Tag all traffic that you have control over
Even unpaid traffic and links in emails that you send out should be tagged. If a third-party tool is used it usually has an option to tag URLs. Look for it and use it! Look through all your traffic in Google Analytics and identify the traffic that is not tagged and try to figure out a way to tag it. There will be traffic that you cannot tag, such as true referral URLs and traffic that really is direct traffic, and that’s fine.
Be consistent when setting UTM tags
It does not really matter if you use “cpc”, “paid”, “promoted” or some other tag to signify paid traffic from a given ad platform. What is important is that you always use the same tag to mean the same thing. If different people in different parts of your organization interchangeably use “cpc”, “paid” and “promoted” for the same type of traffic you will have a hard time getting a good overview and properly aggregating your data.
Use a consistent case
UTM tags are case sensitive, so use a clear rule for how to capitalize and follow it religiously.
Create a naming convention for campaigns
The exact naming convention depends on the setup for your business. Here are some guidelines:
Keep the names as short as possible while still unique and descriptive of the nature of the campaign. Abbreviations are good if they are easy to understand. Also, avoid identical long phrases in many campaign names. A lot of that can usually be cut out.
Start the name with the things that are unique to the campaign as the name will often be truncated when looking at it in Google Analytics. If you advertise in different countries, use an abbreviation for the country in the campaign name. For example, US, DE, SE.
Consider whether you want to add an identifier for the type of ad in the campaign name. For example, if it is a Google AdWords display campaign you may want to start it with the abbreviation GDN for Google Display Network so you can distinguish it from AdWords search campaigns. AdWords’s auto-tagging sets the medium to cpc for all search and display traffic so it is helpful to find another way to distinguish between search and display traffic than the medium.
Be consistent in how you use case in campaigns. UTM tags are case-sensitive, so you need to make sure you always get this right.
Set the source tag to the name of the channel you are using
Always use the name of the ad platform, affiliate, email service or publisher for the source tag. For example facebook for Facebook, hasoffers for the HasOffers affiliate network and mailchimp for emails sent using Mailchimp.
Consider always setting the medium tag for paid traffic to cpc
This is what Google’s auto-tagging does, so all paid traffic from AdWords will appear this way in Google Analytics unless you add your own tags. This way it is easy to filter out paid traffic. Alternatively, you can use the medium tag to signify the exact bid type for the ad such as cpc, cpm, etc. But first, consider whether you really need that. It may be better to just keep it simple.
Set the campaign parameter to the campaign name
The campaign parameter should be identical to the campaign name in the ads platform. Including capitalizations if applicable. Spaces are not allowed in URLs and thus not in UTM parameters. If you use spaces in your campaign names you need to replace each space by %20. Then Google Analytics will read it as a space.
Set the term parameter to something that signifies the targeting of the ad
Google AdWords automatically sets this to the keyword (for paid search), provided that you have auto-tagging enabled. Term is thus used to signify how the ad is targeted. We recommend using it in the same way for all other traffic sources where you have targeting information. For Facebook, for instance, this corresponds to the ad set name as targeting is set at the ad set level in Facebook. For Twitter and LinkedIn ads, create a string based on Twitter or LinkedIn targeting parameters used for ad. For emails, use a term that describes the email list used. For example, “incomplete signups”.
Set the content parameter to something that allows you to identify the individual ad
This is usually something that is tied to the creative of the ad. Don’t worry if you use the same creative for two ads with different targeting. Then the content parameter can be the same for the two ads as the term parameter can be used to distinguish the traffic from the two different ads. Examples of the content parameter include “blue banner” or “all jeans 50%”.
Decide on a consistent way to handle the situation where you make changes to campaigns in the ads platform that impact the UTM tags
The campaign, term and content tags depend on the campaign name, keyword or targeting, and ad creative in the advertising platform. If you make changes to any of these after you have launched the ad you have two choices. Either you leave the UTM parameters as they are or you change them to reflect the new values. Our recommendation is that you change the UTM tags to reflect the modifications you have made in the ads platform. This way you know there is always a consistency between the two.
The table below summarizes the five different UTM parameters with suggestions for how to use them. It should be relatively easy to decide on a convention that suits your business. Again, the most important thing is to tag all URLs and to be consistent. If in doubt, keep it simple. Also, make sure that Google AdWords and Bing auto-tagging is enabled. This will save a lot of manual work.
The seven most common mistakes that we see with UTM tagging are the following:
1. Not tagging at all
We are surprised how often we see this, even with larger advertisers.
2. Not being consistent in the tagging
For example, if the medium for paid traffic is sometimes tagged as “paid” or “cpc” or “cpm” or “ad” or not at all for the same ad channel, then it is really hard to see the effect of your advertising as the data is not aggregated correctly.
3. Using different cases for the same tag
URL tags are case sensitive, so “cpc” and “CPC” are treated as different. Make sure you have a convention for how to use cases. A recommendation is to use lower case for source and medium tags as that’s how most auto-tagging tools do it. Both AdWords’s and Bing’s auto-tagging use lower case for source and medium.
4. Using the UTM parameters for things they are not meant to be used for
For example, to distinguish between different types of Facebook traffic you could set the source to “facebook-post” for page posts you create, “facebook-ads” for Facebook ads. But that is not how they are meant to be used and thus you will not see information in the right way in Google Analytics. The source should simply be facebook (or facebook.com if you want to use that as your convention) and the post and paid identifier should be put in the medium tag where it belongs. This way you can see information correctly in Google Analytics.
5. Using campaign names that are too long and don’t follow a convention
With long campaign names, many campaigns that start with the same phrase, and campaigns that don’t follow a naming convention, it is really hard to see in Google Analytics what the actual campaign is.
6. Tagging internal links
You should not put UTMs on links from your own website that lead to other pages on your website. First, it is not necessary. Google Analytics can track traffic on your site without any URL tagging. Second, if you add UTM tracking parameters on internal links you will lose information on where the traffic originally came from.
7. Not accounting for sub-domains
It is quite common for websites to have sub-domains such as blog.website.com or app.website.com. If you don’t explicitly tell Google Analytics they are all the same website it will interpret them as separate properties. This means you will see traffic from your own domains in your Google Analytics account. A typical example is when visitors click a link on Facebook to your blog and after reading the blog post click on to your main site. Without the proper setup, Google Analytics will interpret the source of the traffic as blog.website.com when it, in fact, was Facebook. You can learn how to avoid this scenario at the Google Developer site.
The value of UTM tagging
If you use a consistent framework for tagging all your web traffic Google Analytics will be able to provide a lot more insight for you. You will be able to see the effect of individual marketing campaigns and even specific ads. This way you can evaluate which ads and campaigns lead to sales and which ones have little effect.
Furthermore, tagging up your web traffic from your paid advertising allows you to match your Google Analytics data with your spend and advertising data from your ads channels. You can either do this manually or by using an automated tool like Funnel.io. The table below shows you what this data can look like.
|Ads channel||Ad spend||Sessions||Transactions||Assists||Revenue||CAC||ROAS|
|AdWords Search||$45 489||36 012||1 801||3 601||$194 465||$25||428%|
|AdWords Display||$9 765||28 319||283||850||$28 035||$34||287%|
|Bing||$8 345||6 828||273||546||$28 130||$31||337%|
|$37 654||115 472||2 309||8 083||$228 635||$16||607%|
|$4 921||5 249||142||638||$14 172||$35||288%|
|$3 548||1 833||55||220||$7 149||$65||202%|
|YouTube||$12 493||7 853||275||825||$26 660||$45||213%|
|Total||$122 215||201 566||5 138||14 762||$527 248||$24||431%|
On the left-hand side are the different ads channels. Then comes the data from the ads channels (ad spend), then the data from Google Analytics (sessions, transactions, assists, revenue) and finally the metrics that are calculated from the ads channel and Google Analytics data (customer acquisition cost (CAC), return on advertising spend (ROAS)). This is the information you need in order to decide which ads channels work best for you and which do not perform well. This is very powerful information.
The next step is to do this analysis for all campaigns for all ads channels to see which campaigns work best cross channel. You can even drill down to the ads level and see which ads work the best and what the customer acquisition cost and return on advertising spend is for these ads.