Google Analytics Campaign Tracking Guide

Here’s your 5 minute guide to correctly tagging (and tracking) your marketing campaigns into Google Analytics. Let’s go!

To track your custom marketing campaigns into Google Analytics, you need to use campaign tags (which are also called UTM tags), these tags allow you to see your marketing reported separately in Google Analytics. And when you combine campaign tracking with conversion metrics, including goal completions and transactions, you can pinpoint what’s working (and not working). This means you can adjust your future marketing campaigns, inform your strategy and even reallocate your budget to campaigns that are delivering the best results.

Google Analytics Campaign Tracking

The more inbound marketing campaigns you track into Google Analytics, the better. This is because you will have more accurate data and a clearer picture of the sessions associated with your marketing activities. When someone comes to your website from one of your campaigns and they aren’t tagged correctly, you lose the ability to clearly see how your campaigns are performing.

It’s critical to only track your inbound marketing using campaign tags. Now you might be wondering – ‘Why just inbound marketing?’ This is because campaign tags work in a very particular way. If we were to use them within our website to track promotions, we would be impacting our data (and not in a good way). So if you want to measure promotions within your website, then you should read my post on tracking internal campaigns.

Campaign tracking can be confusing if it’s the first time you’re using campaign tags and that’s really because they’re specific to your organization. You can name your campaign tags anything you like. We’ll look at some recommended naming conventions for your tags, but it’s also important to understand if someone else has already been using campaign tags, you might see some unexpected names showing up in your reports.

What are campaign tags?

Campaign tags are extra parameters that you can add to the end of URLs used for inbound campaigns. They allow you to capture details about where the link was seen and how it was shared. This allows you to understand and compare the performance of different marketing campaigns.

Here is an example of a campaign tagged URL:

https://www.lovesdata.com/courses?utm_source=twitter.com
&utm_medium=social&utm_campaign=twitter%20ads

And here is the same link without the campaigns tags:

https://www.lovesdata.com/courses

You will notice that there are extra parameters at the end of the tagged URL. The Google Analytics tracking code automatically captures the value of each of these parameters and presents them in your reports. The parameters are:

  • utm_source which is used to define the source of the campaign. The best way to think of source is to ask – ‘Where is the message seen?’ For the example above, the link was posted on Twitter, so the source becomes twitter.com.

  • utm_medium allows you to define ‘how the message was communicated’ (in our example this was set to social). I will talk about why I have used ‘social’ in a moment, but for now, this allows me to understand that the link was shared on a social network.

  • utm_campaign is used to define the overarching marketing campaign. In our example, this is twitter ads which quickly allows me to see that this was a paid marketing campaign.

  • utm_term and utm_content are two optional campaign tags. They are designed for tracking keywords and headlines of non-Google Ads CPC (Cost Per Click) campaigns. For example, if you’re running ads on Bing. Although you can make use of these for other types of campaigns, I would recommend avoiding them unless you know what you’re doing as they can have unintended effects.

Google Analytics Campaign Tracking

These all map to dimensions available within your Google Analytics reports. For example, you will find the values you set for utm_campaign in the Campaigns report and utm_source and utm_medium in the Source/Medium report. They will also be mapped to default and custom Channel Groupings within the Acquisition report.

How do I add campaign tags to URLs?

There are a few different ways to add campaign tags to your links. The most common method is to use the Google Analytics Campaign URL Builder. This tool allows you to quickly see the different tags that can be used and you can create a tagged URL which you can then copy and paste into your campaign.

Google Analytics Campaign Tracking

Once you’re comfortable with the different campaign tags available, you can add them direclty to the end of the URLs within your campaigns. Or you might decide to use another tool, for example, a spreadsheet to add campaign tags and keep a record of all the tags you’ve previously used. There’s no right or wrong way to add tags, so go with whatever works for you.

How should I name my campaign tags?

This is a great question! There is no one way to name your campaigns, I’ve seen very custom campaign tags right through to simple tags. I would always recommend going with something simple and readable over something like an internal code – it makes it easier for people to understand the campaigns within your reports. Now let’s look at my best practice recommendations for the most common campaigns you are going to tag.


Email Campaigns

When you begin to track email campaigns, there are three options. You can track editions, email segments or a combination. Here’s an example of using the ‘Source’ to track the edition:

SourceMediumCampaignTermContent
march 2019emailemail news article link
march 2019emailemail news button
march 2019emailemail news image

Here’s an example of using the ‘Source’ to track the email segment or list:

SourceMediumCampaignTermContent
membersemailemail news article link
previous buyeremailemail news button
generalemailemail news image

And here is an example where we use the ‘Source’ to track the edition and the ‘Campaign’ to track the email segment:

SourceMediumCampaignTermContent
march 2019emailemail members article link
march 2019emailemail previous buyer button
march 2019emailemail general image

Many email systems, like MailChimp and Campaign Monitor, allow you to add campaign tags to your links automatically. This is a great option to speed up campaign tagging, but in some cases, you might choose to manually tag your links to have more control over what appears in your reports.


Non-Google Ads CPC Campaigns

Here is an example of how we might tag a non-Google Ads CPC campaign:

SourceMediumCampaignTermContent
bingcpc{Campaign}{keyword:default}{AdId}

You will notice the use of ‘Term’ and ‘Content’ for this tagging convention. In this example, the campaign name, keyword and ad ID will be automatically placed into the tag.


Social Media Campaigns

Examples of tagging paid traffic on social media:

SourceMediumCampaignTermContent
linkedin.comsociallinkedin ads ad version one
facebook.comsocialfacebook ads ad version five

Setting the ‘Medium’ to social for an inbound campaign will show up within the campaigns report and the social reports. It will also mean you can compare the performance of your organic (free) and paid social initiatives because your organic social posts that link to your website will appear as referral traffic. For example, linkedin.com would be the source and referral would be the medium for an untagged link.


Offline Campaigns

An example of tagging an offline campaign that sends traffic to your website:

SourceMediumCampaignTermContent
newspaperofflineprint ad

Once you’ve created your campaign tagged link for your offline campaign, you will need to create a redirect that is then used in the print ad. Continuing our example, you might set up the following URL:

www.example.com/print

This would be included in your print ad, but it redirects to the campaign tagged URL:

http://www.example.com/content/promotion?utm_source=newspaper
&utm_medium=offline&utm_campaign=print%20ad

This allows you to track people who enter the URL from your printed ad to visit your website.


Is there anything I shouldn’t tag?

I don’t recommend tagging Google Ads campaigns. Instead, you should use Google’s integration. This provides you with better (and more accurate) data within your reports. To link Google Ads and Google Analytics, head to ‘Admin’ and you can then link the products. I cover the exact steps you need to take in my post on linking Google Ads to Google Analytics.

Oh, and don’t forget, as I mentioned at the start of this post, campaign tags should only be used for inbound links to your website. Make sure you don’t apply them to links within your website or you will see incorrect session numbers and attribution for your marketing campaigns.