Introduction to Google Analytics UTM tagging
Nina Holtz avatar
Written by Nina Holtz
Updated over a week ago

BuiltWith estimates that more than 80% of all websites worldwide use Google Analytics for keeping tabs on their website usage. Regardless of the exact figure it’s safe to say that Google Analytics is by far the most used analytics tool out there. Unfortunately, quite a few of all the people relying on it for gauging the effectiveness of their website and incoming traffic lack a good understanding of how it works.

If you don't want to read the whole article you can scroll down to the cheat sheet at the end

This article won’t go through all the ins and outs of Google Analytics (for that we recommend the official Google Analytics Help Center), but will provide a good understanding of how to ensure the traffic you acquire to your site shows up correctly in Google Analytics.

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 interpret how the visitor ended up on the website. This is done by checking the URL that led him or her there.

For example, on website A there is a link to website B, like so: Provided that website B has Google Analytics installed, visits from website A will show up in Google Analytics as

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 categorising visitors in different buckets so you can make sense of 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:


The referrer of the visits, e.g., google, facebook, bing, nytimes.


The marketing medium, e.g., cpc, organic, email.


The name of the campaign, if applicable.


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 (e.g., ad set in Facebook).


Typically used for paid traffic only and represents the ad’s content. Typically used for identifying individual ads, e.g., blue-image or the name of the headline.

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:


The default Medium if nothing else is set.


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 search traffic, thus not including sponsored search results. For traffic from major search engines (e.g., Google, Bing) Google Analytics automatically identifies it as organic.


Short for cost per click and the typical categorisation of paid traffic.


Traffic via links in emails.


Links from posts on social media websites.


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 very hard to effectively categorise incoming traffic, and therefore get a good idea of which marketing efforts are working.

So, how to ensure all visits to your website are categorised in a way that allows for comparing apples with apples?

Tagging incoming traffic

The trick is to ensure Google Analytics understands when the visitor ended up on the website via a regular link, an ad, a link in an email, etc. This is achieved by explicitly stating this in the link URL itself, which is done via what is called UTM parameters. You’ve 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 ?-sign in the URL above is information for Google Analytics to correctly categorise 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 it automatically done via Google AdWords, which is also the case for Bing. But, these two are exceptions, so in most cases you’ll have to make sure your destination URLs are tagged correctly manually.

Luckily it’s not particularly hard from a technical point of view, the hard part is being consistent. To help getting 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 UTM tags are correctly formatted.

And that’s an important point, it only ensures the formatting is correct, not that the tags chosen actually make sense. That’s still up to you.


The single most important thing to have in mind when setting your UTM tags is to be consistent. If you want to use “cpc”, “paid”, “promoted” or some other tag to signify paid traffic from a given ad platform is not all that important. What is important is that you always use the same tag. If you don’t you’ll have a hard time getting a good overview of how your paid traffic is performing. The same of course goes for the other tags.

However, if you’re currently not tagging at all it might be hard to set up a good framework. Included in this cheat sheet are recommendations for how to use the different dimensions.

Did this answer your question?