UTM Tracking in Google Analytics


In this tutorial, we will take a look at how to add campaign tracking code to link and how to measure the effectiveness of those campaigns using Google Analytics.

About UTM parameters #

Most of your marketing, whether it’s an email, an ad, social promotion or any other marketing effort, attracts traffic people come to the website.

… but what about the engagement metrics or did they convert?

You won’t have the answers to these questions unless you include campaign tracking code in those links. This code is called UTM parameters.

Campaign tracking allows to connect the dots between the initial marketing effort and what happened to the visitor after they landed on your website.

  • Email Metrics vs. Website Metrics #

    Your email service provider gives you data such as the delivery rate the open rate and the click through rate but. However, it does not provide details about how many visits you got from those emails, the bounce rate, time on page, pages per visit or the conversion rate.

    If you have a campaign tracking, those metrics are all in your analytics.

    In analytics you can see exactly which campaign drove the most sales, subscribers, and leads.

    utm email metrics vs website metrics
  • Social Metrics vs. Website Metrics #

    Similarly, in social media you get all kinds of metrics like shares, likes, comments, even click-through rate but you do not get the actual recorded traffic from social media or the bounce rate or time on page or the conversion rate.

    Again, if you have a campaign tracking, all that data is in your analytics.

    utm social metrics vs website metrics

If you don’t use campaign tracking code, it becomes a particular issue in email marketing. This is because email is not one of these channels so-called default channel groupings in Google Analytics.

Google Analytics, by default, only displays direct, social, organic, and referral channels.

ga default channel groupings

… where are your email visitors?

The answer is they’re kind of hiding in both the referral and the direct buckets.

But, if you use campaign tracking code they get their own default channel grouping.

ga default channel groupings 2

The bottom line is, without campaign tracking code, you will never truly understand the influence and results of your efforts in email marketing on your actual website traffic.

How does it work? #

There is no set-up required in Google Analytics to use campaign tags, you simply need to append specific UTM parameters at the end of the URL that you are directing users to with your campaign.

The table below shows the components of campaign tracking.

UTM Tag Recommended Use Example Tracking Variable
URL The destination the page www.example.com/landing_page/
? The question mark indicates that this is the beginning of a string of parameters
utm_source The referrer. This parameter answer the question: Where is the traffic coming from? utm_source=facebook
& separating each parameter with the ‘&’ sign
utm_medium The channel. This parameter answer the question: How is it getting to me? utm_medium=social
& separating each parameter with the ‘&’ sign
utm_campaign The purpuse. This parameter answer the question: Why is it coming to me? utm_campaign=spring-sale2018
& separating each parameter with the ‘&’ sign
utm_content Used for A/B testing, for example, in case you have multiple links pointing to the same URL (such as an email with two CTA buttons), this code will help you track which link was clicked. It’s also used for content-targeted ads. utm_content=navlink
& separating each parameter with the ‘&’ sign
utm_term= The keyword parameter allows you to track which keyword term a website visitor came from. This parameter is specifically used for paid search ads. utm_term=growth+hacking+tactics

Not all are the parameters are required:

utm campaign tags optional and mandatory

So, a naked, UTM-free URL might look something like this:

www.example.com/landing_page/

But the whole URL including the UTM code looks like this:

utm-example

Basically, at the end of the destination page URL you have a whole bunch of extra stuff, called UTM parameters.

Those UTM parameters don’t impact the actual page, you can delete the UTM code from the URL and the page would continue to load normally, but having those three different little chunks of information at the end of your URL allows to tell Analytics that this visitor came from that click and that campaign drove this specific visit.

UTM generator #

How did you get all this extra code at the end of that link?

Of course, typing that long string of characters is pretty scary, so most people use URL generators.

There’s a bunch of these out there, they’re all free and all basically do the same thing.

The most popular generator is the Google’s own URL builder.

This nifty tool lets you plug in the values for each of those parameters, and then the tools do the magic of stringing them together into a nice URL.

As you type, you will see that the new URL is being auto-generated and you can get it as short link too.

Google-URL-builder

⚠️ As a bit of background: Google used to have their own link shortener (goo.gl) but no longer supports it. They’ve added a feature to shorten links through Bitly to make it convenient for everyone.

Campaign tagging best practice #

Word spaces #

Spaces in a URL aren’t allowed. When there are spaces between words in parameters, they become percentage signs in the URL by default. So, it’s messing up your parameter format and making it harder to track links in your campaign.

However, you can force your Google Analytics reports to display spaces between words by representing spaces in your URLs with percent signs (i.e. %) or plus signs (i.e. +).

Google URL Builder use the % symbol to generate spaces between the words. It would look like this:

URL/?utm_source=campaign%monitor&utm_medium=post&utm_source=email%integrations%april%2014

Alternatively, you can use + signs to represent spaces; it would look like this:

URL/?utm_source=campaign+monitor&utm_medium=post&utm_source=email+integrations+april+2014

⚠️ Note: The plus sign (+) has to be added manually. If you enter a plus sign (+) into the official URL builder, it will get encoded as ”%2B” and you won’t see the space character in Google Analytics.

I recommend using dashes (-) instead of spaces because I think it results in a cleaner looking URL:

URL/?utm_source=campaign-monitor&utm_medium=post&utm_source=email-integrations-april-2014

⚠️ Pro Tip: Matt Cutts wrote a great post explaining why you should use dashes instead of underscores.

Lowercase #

Parameters are case-sensitive. If you use both capitalised and lowercase versions of the same parameter (e.g. ‘Google’ and ‘google’), GA will create a separate entry for both variations. This makes it difficult to analyse the performance of your campaigns effectively.

If you use the Google URL builder that’s going to force lower case throughout.

⚠️ Pro Tip: To be safe, a lowercase filter can be applied across the GA account to force all values into lowercase and therefore maintain reports with accurate data

Never use campaign tracking to track calls to action (CTAs) or promotions that are on your site, as this will override the original traffic source and inflate sessions.

For example, if someone comes through as a referral from a forum and they click on a promotion (e.g. a banner or button) on your site that’s been tagged, this will overwrite the referral with the campaign that you’ve assigned to the promotion. The original source and medium are abandoned and you lose where the user really came from.

Instead, onsite promotions should be tagged as events within GA, which can be done through Google Tag Manager (GTM).

UTM naming conventions #

You can naming the UTM parameters anything you want but remember that whatever you put in there is going to appear in your analytics, so it’s important to be organized when you do these things and establish some UTM naming conventions up front.

Remenber, you’re not going to be the only person who ever uses this analytics account. Hopefully, you’re going to collaborate with other people so here are some standards for campaign tracking codes:

For a Email campaign:

– medium is “email”

– the source might be “mailchimp”

– and then the campaign name the specific newsletter such as “april-newsletter”

For a social campaign:

utm examples for social media links

For Influencer Marketing

– Medium: This should simply be “influencer.”

– Source: This is the social media platform used by the influencer. Based on where they will post the link, this parameter should be: “instagram,” “tiktok,” or “facebook.”

– Campaign Name: This is the name of the campaign (e.g., “april-promotion”).

GA campaigns reports #

Below are some of the main Google Analytics reports that are based on campaign tags.

Campaign Tag Label Used in Google Analytics Reports to look at
utm_campaign Campaign Acquisition -> Campaigns -> All Campaigns
utm_source and utm_medium Source and Medium Acquisition -> All Traffic -> Source / Medium Report
utm_content Ad Content Does not appear in any of the standard reports and needs to be added in as a secondary diemnsion.
utm_term Keyword Acquisition ->Campaigns->Paid Keywords
Acquisition ->Campaigns->Organic Keywords

Let’s take a close look at the campaign report in Google Analytics

utm campaigns in google analytics

The first column is the list of all the campaign names that have ever sent traffic to this website during the date range selected. In our case, these are all email campaigns.

Look at the trend line at the top of the table, this is what email traffic looks like, basically, we get a spike in traffic every time we send a newsletter.

But some email campaigns performed more than others … looking at the table below the line graph, you can see which of these campaigns led to the greatest number of visitors, lowest bounce rate, highest pages procession, highest average session duration, and the highest conversion rate.

Leave a Reply

Your email address will not be published.

Thanks for commenting