My friend Adam called me this evening to ask how I’ve used the Google Analytics tracking codes utm_source, utm_medium, and utm_campaign. He’s working on an app to help marketers generate HTML e-mails, and is thinking about automating the inclusion of these tracking codes.
The utm_medium is pretty straightforward in that the medium would be values like email, web, twitter, rss, and so on.
But, what’s the difference between utm_source and utm_campaign?
Google’s documentation on these variables is helpful in general, but is not all that clear on the difference between these two variables.
So, here’s how I think of those variables. The utm_source is like a noun, and utm_campaign is like an adjective. The utm_source will be more consistent from one edition to another, while the utm_campaign will change.
Let’s look at an example. Let’s say I send an e-mail newsletter called Brilliant Widgets every season (Spring, Summer, Fall, and Winter), and I want to track how many links back to my website each edition generates. Here are the utm_* values I would use.
utm_* values for the Winter edition of Brilliant Widgets
So, the href value of the link back to my website would look like this:
Now, assuming I use those parameters on the links back to my website and that my website activity is being tracked with Google Analytics, I’ll be able use Google Analytics to identify website visits that came from that e-mail newsletter. Then for the next edition, I would keep utm_source and utm_medium the same, but update to
With this thinking, you could define a set of values for all the e-mails you send out, and create a system that would help you know what those values should be when you introduce new online publications.
I’m sure that other people and companies have come up with their own approaches to using these utm_* values.
I’m curious, does anyone else have different ideas or examples to share?