Tracking UTM Parameters


It’s a top-five question for every marketer: “How’d that customer find us?” Here’s how UTM parameters come into play. Smart marketers often use UTM parameters to track customers. They’re often used for paid ads, but many marketers are also using them for social media marketing, content marketing, email marketing, and much more.

Here’s a snapshot of some popular campaigns that can be tracked with UTM parameters:

  • Joint webinars
  • App stores
  • Partner websites
  • Review sites
  • Integrations
  • Embedded widgets
  • Viral loops
  • Banner ads to your product from your own blog
  • Links to your product from your own blog posts

So many possibilities! Read on to see how marketers use UTM parameters to track more than just paid ads. And don’t forget to read the FAQs down below.

How UTM parameters work with Kissmetrics

This will probably look familiar. Ever see a URL like this one appear in your browser when you’re clicking through an ad?

http://www.example.com/landing-page?utm_source=google&  utm_medium=email&utm_campaign=march2012

See those UTM parameters? Such URLs are loaded with them to help the marketer know who came from what ad. These URLs are often hand-made using tools like Google’s free URL Builder.

Here’s how it all works:

  1. When Bob lands on your webpage via a UTM-loaded URL, the Kissmetrics code block in the webpage’s <head> section automagically detects all available UTM parameter.
  2. Kissmetrics fires the event ‘Ad Campaign Hit’ for Bob.
  3. Kissmetrics sets the values of each available UTM parameter as values for these five possible corresponding properties:
  • Campaign Source
  • Campaign Medium
  • Campaign Term
  • Campaign Content
  • Campaign Name

If you look up Bob using the People tab and see that Bob has triggered the event ‘Ad Campaign Hit’ and has one or more of these five properties, you’ll know that Bob touched one of your UTM-loaded URLs at some point.

A step-by-step example of using UTM parameters to track paid ads with Kissmetrics

This infographic is worth your five minutes, even if you’re not running ads. It is everything you need to know about setting up UTM parameters and using related properties in your Kissmetrics reports.

Tracking Paid Ads

Download PDF: Step-by-Step Guide to Tracking Paid Ads

Let’s say you’re marketing accounting software and you’re testing two versions of the same offer on Twitter:

Tweet A: Free buyer’s guide for accounting software. Check it out: http://bit.ly/13nnYIs
Tweet B: Don’t buy accounting software before checking out this free guide: http://bit.ly/167xgHc

Behind each shortened bit.ly link is this long URL generated by the Google URL Builder:

Tweet A: http://www.acme.com/landingpage?utm_source=twitter&utm_medium=tweet&utm_term=accounting+software&utm_content=buyer-guide+A&utm_campaign=q4+leadgen
Tweet B: http://www.acme.com/landingpage?utm_source=twitter&utm_medium=tweet&utm_term=accounting+software&utm_content=buyer-guide+B&utm_campaign=q4+leadgen

To generate the long URL for Tweet A, this was typed into the URL Builder:

Google URL Builder

The long URL for Tweet B was generated after changing Campaign Content to ‘buyer-guide B’.

Here’s why you’d want to take advantage of Campaign Content: you can use it to track those who see Tweet A separately from those who see Tweet B. Then you can study each group and see how well they travel through your signup or purchase funnel by selecting the property ‘Campaign Content’ in your funnel report.

FAQs

How do I enable this feature for tracking UTM parameters?

Double-check that Tagged URLs is ON in Javascript Settings. By default, this is turned on.

Why is Google Analytics showing more than Kissmetrics?

Because Google Analytics doesn’t track people and Kissmetrics does, GA cannot combine one person’s visits from multiple computers/browsers/mobile devices into one “unique visit.” As a result, you may see 2-5x more views in Google Analytics than in Kissmetrics because Google Analytics is double/triple/quadruple/quintuple-counting.

What if I’m using auto-tagging for Google AdWords/Analytics?

Google Analytics has a method of tagging your URLs called “Destination URL Auto-tagging”. If your links have ?gclid= at the end of your URL (ie. www.mysite.com/?gclid=123xyz), your ads are auto-tagged. When visitors click on this link, we’ll log the event Ad Campaign Hit, but we cannot log any additional information about the campaign source, medium, terms, etc.

However, if your URLs include UTM variables like utm_source=, we’ll log the event Ad Campaign Hit and also store as Properties the campaign information embedded in the URL.

For example, if someone clicks on the link www.mysite.com/?utm_source=google&utm_medium=email&utm_campaign=20off, this information is passed to Kissmetrics:

Event triggered: Ad Campaign Hit
URL: www.mysite.com/?utm_source=google&utm_medium=email&utm_campaign=20off
Campaign Source: google
Campaign Medium: email
Campaign Name: 20off

What if UTM parameters aren’t appearing in Kissmetrics?

Suppose you notice that your links are properly tagged with UTM variables, but they are still not being recorded in Kissmetrics. Here’s what may be happening: (1) Are visitors being redirected to a different page on your site or (2) is the Kissmetrics code block on the landing page?

Scenario 1: Redirects stop Kissmetrics from seeing UTM parameters

Let’s say your links are set up to track one thing: that the Campaign Source is “affiliates”.

www.mysite.com/?utm_source=affiliates

But when they follow that link, they actually wind up on a different URL - your landing page.

www.mysite.com/landingpage

You notice that the Ad Campaign Hit did not register, though it should have.

What happened?

Your site redirected from the tagged URL to another page before the Kissmetrics script could even load and detect that a Campaign Hit event occurred. The redirect stripped away the UTM variables that brought the visitor here. By the time the KM script loads on /landingpage, the UTM variables have been dropped.

There are a few solutions:

1) Delay the redirect action until the KM script has loaded.

<script type="text/javascript">
// This script would go on www.mysite.com
_kmq.push(function(){

// The logic to redirect to /landingpage goes here

});
</script>

2) Capture the UTM variables attached to www.mysite.com, then append them to www.mysite.com/landingpage where the KM script can detect them.

Scenario 2: The Kissmetrics code block isn’t on the landing page

Think of the Kissmetrics code block as Kissmetrics’ eyes. If the code block isn’t on a webpage, then Kissmetrics can’t see or track people on that page. That’s why we always recommend installing the code block on every webpage of your site. Without the code block, Kissmetrics won’t see that people are arriving on that page via a UTM-loaded URL, which means Kissmetrics will never pick up UTM-related events & properties.

Is anything on this page unclear? Suggest edits on Github!