Beginners Guide to Campaign Tagging

 

What is campaign tagging?

Campaign tagging is a way of customising the data collected by Google Analytics in order to track the response to marketing activities, online and off-line.

When a visitor goes to a website Google Analytics collects information about where they came from: whether they followed a link, used a search engine or typed in the URL etc.

However, there are a number of situations where Google Analytics will fail to collect accurate or sufficient information about where the visitor has really come from. In these situations campaign tagging provides a means to replace the data that would normally be collected with more detailed information that you can define in terms of your own marketing.

What does a campaign tag look like?

Below is an example of a typical campaign tag that might be found in an email newsletter.

?utm_campaign=spring+sale&utm_medium=email&utm_source=newsletter+april14

The above code would be appended to a URL and form part of a hyperlink that points to a website, like this:

www.mywebsite.co.uk/?utm_campaign=spring+sale&utm_medium=email&utm_source=newsletter+april14

The values that start “utm_” are codes that are recognised by Google Analytics and the other values “spring sale”, “email” and “newsletter” are values that you define that will appear in the Google Analytics reports when a visitor clicks on the link.

What campaign tags are there?

There are 5 campaign tags that can be used. 2 of which, utm_medium and utm_source, are mandatory. If they are not both present no campaign tag data from a link will be upload.

The table below explains the recommended use that each campaign tag is put to

Campaign Tag

Recommended Use

utm_campaignA name to identify the marketing campaign
utm_mediumDescribe the general nature of where the traffic came from e.g. email or social
utm_source
Be specific about the source of the traffic e.g. newsletter or Facebook
utm_contentIdentify exactly what the content that was clicked on was e.g. logo image, promotional cat videp
utm_termCaptures the keyword from pay per clcik advertising and the search term from the remaining search engines that pass them on.

Where to find campaign tag data in Google Analytics

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

Campaign Tag

Label Used in Google Analytics

Reports to look at

utm_campaignCampaignAcquisition -> Campaigns -> All Campaigns
utm_source and utm_mediumSource and MediumThese can be found merged together in the Acquisition -> All Traffic -> Source / Medium Report
utm_contentAd ContentDoes not appear in any of the standard reports and needs to be added in as a secondary diemnsion.
utm_termKeywordAcquisition ->Campaigns->Paid Keywords
Acquisition ->Campaigns->Organic Keywords

What set-up do I need in Google Analytics to use campaign tags?

There is no set-up required in Google Analytics to use campaign tags, you simply need to create the tagged URL and publish it.

How to create a campaign tagged URL

To create a hyperlink with a campaign tag all you need to do is type it out. There is no other set-up required.

Below is an example of a campaign tagged hyperlink using the recommended campaign tags. I’ve used colours to highlight each individual tag.

www.website.com/landing_page/?utm_campaign=campaign+name&utm_medium=social&utm_source=facebook

If you also wanted to use utm_content then you would simply add it onto the end.

www.website.com/landing_page/?utm_campaign=campaign+name&utm_medium=social&utm_source=facebook&utm_content=content+description

Points to note:

  • The first campaign tag must be preceded by a “?”
  • All the tags are separated by an “&”
  • The “+” is used to separate words, once uploaded to Google Analytics the “+” sign is replaced with a space.
  • All the letters are lower case. Technically it doesn’t matter if you use upper case, lowers or a mixture of the two. But if you used utm_campaign=august in one tag
  • and utm_campaign=August in another one Google Analytics would treat them as separate campaigns.
  • It doesn’t matter what order you arrange the tags.

Where are campaign tags used?

Use campaign tags in situations where Google Analytics would not otherwise collect sufficient or accurate information for your reporting and analysis purposes.

Without a campaign tag visitors following a link in most of the scenarios below would show as direct visitors to your website. So you would have no idea where they really came from.
Emails
If you send out regular newsletters or marketing e-mails you will want to know how people are responding to these. Tags can be used to identify which email that the visitor followed the link from, and also which link within the email.

They are particularly helpful when different versions of the email are being sent out. Since the campaign tags can be used to show which version of the email the visitor is responding to.

Vanity URLs
These are web addresses that are different from your website address but are set to redirect to either your home page or some other page on your website.

They are often used for offline campaigns, since they can be made shorter, more memorable or more relevant to the campaign than your normal web address.

Campaign tags can be added to the vanity URL’s redirection and this will enable you to separate out visitors who used the vanity URL from those who come direct to the website.

An example would be the vanity URL www.myproduct.com redirecting to www.mywebsite.com/?utm_campaign=spring+sale&utm_medium=redirection&utm_source=myproduct.com

This technique can also be used with non-existent pages on your website.

For example the www.mywebsite.com/my-campaign/ could be set up so that visitors who type the address into their browser are redirected to: www.mywebsite/product_page/?utm_campaign=spring+sale&utm_medium=redirection&utm_source=my-campaign-page

PDF’s and other electronic documents
It is very common to find links back to websites built into PDF brochures and other electronic documents. Unless campaign tags are built into these hyperlinks visitors that follow them will appear as coming direct to the site and you will not know that they had followed the link from the document.

QR  Codes
QR codes are an increasingly common way of bringing offline visitors online. Visitors that come to a website by following a QR code will be shown as a direct visitor unless the URL it was created from contains campaign tags.

Some QR code generators will append their own campaign tags automatically, which may not be what you want. So always test first to see if they work as expected.

The QR codes above were generated using www.the-qrcode-generator.com/


Social Media Posts
In the normal course of events any visit from a social media site will update Medium with the text “referral” and Source with the domain name of the referring website.  If more detailed information such as which post the visitor came from or who authored it is required you need to use campaign tags.

The capturing of visits from social media sites is a highly configured area of Google Analytics, with Google matching up the visit information to its list of recognised Social Media websites and populating data based on this.

By using campaign tagging you are likely to disrupt this process. But this mainly concerns the reports found in the Acquisition -> Social section of Google Analytics. If you don’t use these, then there is little to be concerned about. If you do, it is best to seek out someone who really understands the in’s and out’s of these reports or carry out tests to see what works and what doesn’t.

The Social sections of the Acquisition->Channels and the Acquisition Treemaps reports also rely on Google’s background data configuration to work properly, but you can avoid the worst problems by using utm_medium=social to ensure that visits from social media sites are correctly categorised as Social in these reports.

It is always worth experimenting to see what works best for you, but the following often proves sufficient:

utm_medium  –  Use utm_medium=social  this ensures the Acquisition Channel and Treemap reports will categorise the visits with all the other Social visits.
utm_source   –  Use the social network name. The best thing to do is copy the value used by GA from an untagged post. There might be several variants, choose any.
utm_content  – Details about the post / author
utm_campaign – Your campaign name

Display ads and referral links from other websites
If any visitor arrives on a website by following a link from another website Google Analytics will normally update Medium with the text “referral” and Source with the domain of the referring website.

The exceptions to this are when campaign tags are used, since it will use these values instead and when the website the referral has come from uses https and the website receiving the referral uses http (although there are exceptions to this exception!).

Using campaign tags can overcome the https problem and also provides a way to capture additional information if required.

The following is a suggestion for a display advert:

utm_medium – Use the text “display”
utm_source – Use the website name
utm_content – Details to identify which advert was used
utm_campaign – Your campaign name

Where not to use campaign tags

Never use campaign tags for internal links.

If you did, once a visitor clicked on them, GA would start a new session with the campaign tag values of the internal link incorrectly increasing the number of sessions recorded.  End-to-end visibility of the visitors journey to and through the website would also be lost. If you need to track internal links over and above the standard use event tracking.

Using a URL Shortener

Campaign tags are fully compatible with URL shorteners such as bitly.com and goo.gl GA records the full URL and not the shortened version.

Always test the URL shortener since some of them will append their own campaign tags overriding yours.

Fixing mistakes in campaign tag data

Unfortunately once data has been uploaded to Google Analytics it cannot be changed. However, it is possible to set up filters to amend data as it is collected, and URL tags that are published with a mistake can often be fixed using these.

Tips on successful campaign tagging

The key to creating useful reports is to be consistent with structure, terminology, format and spelling, and to use meaningful terms across all campaigns.

Without some form of central control over the creation of the tags, it is very common to end up with an unstructured meaningless mess that is difficult to make sense of.

Remember that Google Analytics is case sensitive. That means that utm_source=Newsletter and utm_source=newsletter will be recorded separately as two different values, lack of consistency with case makes reporting and analysis harder.

A tag can be used to store more than one piece of information, but to do this successfully it is best to first think about how the data will appear in reports.

For example with emails, you might want to use source to store details about the nature of the email and the date sent. How you structure the code will determine how visits from the link are displayed in the reports:

dd-mm-yy typetype yy-mm-ddyy-mm-dd type
01-02-14 newsletternewsletter 14-02-2814-02-01 newsletter
07-03-14 newsletternewsletter 14-03-0714-02-14 marketing
14-03-14 marketingnewsletter 14-02-0114-02-28 newsletter
14-02-14 marketingmarketing 14-02-1414-03-14 marketing
28-02-14 marketingmarketing 14-03-1414-03-07 newsletter

If date order is important to you then the format starting yy-mm-dd will be best.

Do not include information that you do not want public: campaign tags are displayed in the browser’s navigation bar, along with the full URL, and so are fully visible to the visitor.

DO’s & DON’TS

DO…

Use a minimum of campaign, source and medium
Use meaningful terms and consistent formatting across all campaigns
Take any existing campaign tags into account
Only use lower case
Put spaces between words using the + sign
Test your campaign tags to see how they will appear in reports

DON’T…

Use campaign tags for internal links on your own website.
Use utm_term for anything other than capturing the keyword in AdWords and from search engines that don’t hide them.