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. With our JavaScript Library installed, we will automatically scan for and record these UTM parameters for you as visitors land on your site, allowing you to more surgically judge the performance of your campaigns.

How UTM parameters work with Kissmetrics

Here’s how it all works:

  1. When Bob lands on your webpage via a UTM-loaded URL, the Kissmetrics code block automagically detects all available UTM parameters.
  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:

Property

UTM Tag

Campaign Name

utm_campaign

Campaign Medium

utm_medium

Campaign Source

utm_source

Campaign Content

utm_content

Campaign Term

utm_term

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. You will also see a Channel property and an Origin property, which allows you to segment your traffic into broader categories (such as Social and Organic) as needed.

Another example of using UTM parameters to track popular marketing campaigns

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:

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.

FAQ

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. Such ad hits will record a Channel of "Paid" and an Origin of "AdWords."

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 http://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”.

http://www.mysite.com/?utm_source=affiliates

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

http://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>
  1. 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.