Presenting, by Popular Demand, the Tracking Parameter

We often get questions about tracking parameters. Specifically, people wonder about what tracking parameters are, how to add them to urls and how to use the parameters provided by Google Analytics.

First, just a quick overview on why you should care about tracking parameters.   The bottom line is that without tracking parameters, many campaigns are very difficult to track.   Tracking parameters allow you to tell your reporting engine how to show tracking data in reports.  They allow you to give the data in your reports the names that make sense to you, and to group the data in your reports into units that make sense and are actionable.

Like many things in the internet space, understanding tracking parameters is simple once you know it, but sometimes you need someon to give you a foundation of understanding before you can internalize the
knowledge.   That’s what I’ll try to do here.

To start, you’ll want some vocabulary.   Tracking parameters are a specific kind of query string parameter.   A query string is a part of a url. A url is the tech term for a web address.

Now, let’s dive in…

These are all urls:

http://www.commerceV3.com/
http://www.commerceV3.com/index.php
http://www.commerceV3.com/index.php?q=dayparting
http://www.commerceV3.com/index.php?q=dayparting&sort=asc
http://www.commerceV3.com/index.php?utm_campaign=email&utm_source=NovemberRemail&utm_content=full

Of these 5 urls the last three have query strings.   A query string starts with a question mark and contains one or more name-value pairs.   The name
value pairs have a parameter and a value.    Let’s look at these in more depth.

http://www.commerceV3.com/index.php?q=dayparting
http://www.commerceV3.com/index.php?q=dayparting&sort=asc

The first url above has one parameter, “q”, whose value is “dayparting”.   The second url has two
parameters, “q” and “sort” with values “dayparting” and “asc” respectively.   You will notice that the name value pairs are separated by ampersands.

Generally speaking, query strings pass specific information to the hosting server (the server that has the file that you are requesting with your web browser) so that the hosting server can deliver specific
information back to you .

In the case of Google Analytics, tracking parameters are added to the url to talk to javascript on your webpages that in turn talk to Google so that your Google Analytics can understand the visit better and report on it in a useful way.

There are 5 parameters used in Google Analytics.

Utm_medium
Utm_campaign
Utm_source
Utm_term
Utm_content

I won’t go into what these parameters correspond to in GA reporting (let me know if you want that and I’ll do it in another post.)

How to add Google tracking parameters to your urls.

The key is that each url should have only one question mark.   The question mark says to the server “ my query string parameters start here”.  Having more than one question mark can cause errors.

If your url does not have a query string parameter you need to add one at the end of the url and then put your name value pairs.

http://www.commercev3.com/

could become

http://www.commercev3.com/?utm_campaign=email&utm_content=banner

http://www.commercev3.com/blog/eric/

could become

http://www.commercev3.com/ blog/eric/?utm_campaign=email&utm_content=banner

If your url already has a question mark, you need only to add your tracking parameters as name value pairs.
You start with an ampersand (to say, “here is another parameter”) and keep going.

http://www.commercev3.com/?q=workshops

could become

http://www.commercev3.com/?q=workshops&utm_campaign=email&utm_content=banner

http://www.commercev3.com/blog/eric/?sortorder=asc

could become

http://www.commercev3.com/ blog/eric/? sortorder=asc
&utm_campaign=email&utm_content=banner

Did you see how the two examples I gave end in a slash, “/”?   Adding the query string is easy in
these cases, you can just add it at the end.

However, not all urls do.   What do you do if yours doesn’t? Unfortunately it depends on the case and I’ll need to explain why.

To understand the slashes in urls,  it’s helpful to remember that urls are requests to a webserver for a file.   The slashes give a path to the information you are requesting.  They indicate which folder (aka directory) the file lives in.   There is a master folder called the root for your domain name that holds all the other folders.   It can be found either by typing in the domain name

http://www.commercev3.com

or by typing the domain name with a trailing slash

http://www.commercev3.com/

Beyond that, all the other folders are specified using slashes for each level you go in.

http://www.commercev3.com/blog/eric/

specifies that I am looking for a file called within a folder called “eric” within a folder called “blog” which is found at the root.

No file is specified in that request.   That’s OK. Most servers have a default file they will serve if no file is specified.  However, sometimes there is a file request.  This is the last thing you need to know (I think).

File names end with a suffix.   A file suffix starts with a period.  Common file suffixes for web files are

.htm
.html
.php
.asp
.aspx

If your url ends with a file name, you can simply add the question mark and your tracking parameters.

http://www.commercev3.com/index.html

could become

http://www.commercev3.com/index.html?utm_campaign=email&utm_content=banner

Generally speaking the order of your parameters does not matter as long as you are following the proper syntax of starting your query string with a question mark and separating your name value pairs with
ampersands.

Here are a couple of common examples of using Google Analytics tracking parameters to get reports on common campaigns:

Ad Center CPC Destination URLS:

http://www.yourdomain.com/?utm_source=msn&utm_medium=cpc&utm_term=[the keyword for this link if you are using keyword level destination urls or
‘default’ if not]&utm_campaign=[your campaign name]

Email:

http://www.yourdomain.com/?utm_source=[mailing name]&utm_medium=email&utm_content=[the specific link if you’re interested in reporting on that]

Eric Winter is VP of Internet Strategy at Timberline Interactive. Eric is a 15 year Internet Marketing veteran with deep experience in SEO, Paid Search, Affiliate Programs, Email Marketing, Website Testing and Analytics.

Got something to say? Go for it!