Category Archives: Source Tracking

Source Tracking Part II: Using UTM parameters for online source attribution

Google Analytics’ source tracking is primarily URL based, and unfortunately, some of your important traffic sources may not be correctly identifiable based on their default referring and destination URLs. But there is a solution! Read on to learn how you can leverage native Google URL parameters to deliberately label your traffic sources in a way that aligns with your objectives.

Typically, when determining the source of a visit, Analytics looks at the referring URL domain, page and any additional parameters (such as search parameters) that may be included in the URL. Read Source Tracking part I to learn more about how Analytics interprets source information from referring URLs. However, Analytics can also recognize source information contained in the destination URL in the form of UTM parameters. These parameters are native to Google and are already used to communicate campaign attributes from Adwords to Analytics. You can leverage these UTM parameters to communicate custom tracking information for your advertising campaigns to Analytics – read on to see how.

Historical note: UTM stands for Urchin Tracking Module and references a web traffic tracking and logging system developed by Urchin Software Company and eventually acquired by Google to become Google Analytics. Although Google no longer uses the Urchin program, the acronym is still used to refer to URL parameters that are interpreted by Analytics for source information.

When UTM parameters are added to a destination URL, they have the affect of causing Analytics overwrite whatever source information Analytics might otherwise have populated by default. This means that to use UTM parameters to improve ad tracking, you can simply add parameters designating source information about, say, a display ad, to the destination URL (this works for online ads – I’ll explain how it works with offline ads later).

Important: Do NOT use UTM parameters in destination URLs in AdWords or AdSense, as Analytics already receives all of the available source information, so long as the accounts are linked. If you try to manually add UTM parameters, they will most likely not show up in Analytics.

Available parameter slots

There are five UTM parameter slots that you can leverage to label your traffic sources, described in the table below.

Parameter Name UTM Code Description
Medium utm_medium How—via what channel—the visitor found your site. E.g., paid search, online display or email
Source utm_source Who—what domain or publisher brought the visitor to your site. E.g., Google, Amazon or Buzzfeed.
Campaign utm_campaign What campaign brought the visitor to your site. May be a campaign targeted at a specific audience or keyword group or may represent a promotion. For Adwords traffic, this is the name of the Ad Campaign.
Ad Content utm_content What ad content brought the visitor to your site. In Adwords, this is the copy in the displayed search ad, but you can use it to indicate anything you want about the content of an ad.
Term (Keyword) utm_term What search term prompted the ad—most relevant for Adwords.

So what does use of the parameters look like in practice? First, you identify the destination landing page. Then, you follow the landing page URL with a question mark. The question mark indicates that any following characters are parameters, and are not part of the base page URL. After the question mark, add your parameters in the form utm_source=your-source-name. All individual UTM parameter phrases must be separated from one another with an ampersand (&) sign.

Here’s an example:


Important: Not all parameters are created equal. The first two parameters—source and medium—are required parameters and both MUST be used in order for any customized UTM source data to register in Analytics.

Not just for online display!

This method is not limited to online display advertising. It can also be used for Yahoo/Bing Search advertising (since that account won’t natively sync with Google Analytics in the way that Adwords will). It can also be used for any other type of electronic traffic-generation campaign where visitors click on a URL to get to your site, such as email, press releases, guest blog posts and social media.

Devising and organizing your labeling strategy

For your source tracking to be really useful for marketing analytics, it has to be logical and consistent.

Think about what sources of traffic you have and how you would ideally like to organize them for reporting purposes. You may want to be able to identify traffic generated by via the medium of email. You may also want to be able to segment what portion of email traffic came from invites, nurture campaigns or auto-responses—this type of information could be considered the “source” of the traffic. Or, maybe you’re running cross-promotional email campaigns with another vendor. In that case, maybe the “source” shouldn’t be the type of email (you could call that campaign, instead), but rather the vendor or partner that generated the email. There’s no right answer, but maintaining a consistent, labeling scheme that is compatible with your reporting needs will save you a lot of headache.

You’ll also want to make sure that your labeling system not only makes sense, but that it’s applied consistently, down to the exact spelling of the terms used. You’ll end up with sloppy data if you, say, call paid search “cpc” in one place and “sem” in another. In order to keep track of what tracking you’re running and to maintain consistency of terminology, I recommend using a spreadsheet to catalogue all of the destination URLs (complete with tracking URLs) and parameter values you use. This spreadsheet can also build the URLs for you, and can maintain consistent parameter values by getting all parameter values from a look-up table.

Save source info to your CRM or marketing automation platform

An additional benefit of using URL parameters to improve your source tracking is that it may make it easier to save that source information to your CRM or marketing automation platform. Your marketing automation platform may save a visitor’s landing page URL by default, and that landing page URL now contains useful traffic source information. You can simply parse out the parameter values from those landing page URLs to gain insights into unknown traffic. If some of your common landing pages also include forms that submit to your CRM, you can edit your form to save the page URL as well. You can then write workflows to parse out the source and medium of a converting visit for a known individual in your database.

Source Tracking Part I: Default labeling and account linkages

Out of the box, Google Analytics source tracking is incomplete. Some sources – such as visitors that come to your site from offline sources – aren’t attributed meaningfully at all. Some other traffic sources, such as traffic from paid Yahoo/Bing search or non-Google online display ads come in with sloppy labeling.

First, I’ll go over some of the common sources of imperfection in Google’s source tracking, and then I’ll show you a few tricks you can use to make your tracking a lot cleaner.

Where (and why) Google Analytics default source tracking gets it wrong

Google’s source tracking is primarily URL based. When a visitor comes to your site, Google will look at the URL of the site they came from, and label the source of that visitor based on the referring URL. If the visitor came from a Google or Bing search listing, Google will see a URL that looks something like this:

Google Analytics parses the URL to identify the following characteristics:

1. Source. The source is the domain name or publisher that brought the visitor to your site. This is equivalent to “WHO” led the visitor to your site. By default, Analytics records the domain name of the referring page as the “source”.

2. Medium. You can think of the medium as “HOW” the visitor found your site. Google looks for clues in the referring URL to identify whether the visitor came as a result of natural search, paid search, referral. If there’s no referring URL, the visit is labeled as a “direct” visit with a source of “none”. In the URL above, “search?” indicates that prior to visiting your site, the visitor made a search query. By default, Google labels this traffic as “organic search”. If Google recognizes the domain name of the referring site as a social network site, it will label the medium as “Social Media”. For all other referring URLs, Google records the medium as “Referral”.

3. Keyword. In addition to source and medium, which label the “who” and the “how” of a visitor’s source, Analytics can also parse the search term out of the referring URL to determine WHAT generated a visit. Someone who clicks on a search will provide a keyword (in above URL see the text after “q=”). This attribute is only relevant for visits generated by searches, and is applicable whether or not the visitor clicked on a paid search ad or organic search result.

You might have noticed by now that there are some major traffic sources missing in the descriptions above – namely any sort of online or offline advertising. This is because in GA’s model, these types of traffic look like other types of traffic. Someone that hears a radio ad might go directly to your site (direct traffic) or might search for your brand (paid or organic search, depending on what result is clicked). Someone that clicks on a display ad to get to your site might be labeled in one of a number of different ways, depending upon whether that display ad was served on a search listing page, social network or referring site. Even a click on a search ad, will not–by default–be distinguishable from a click on an organic search result because the referring URL takes the same form.

Needless to say, not being able to track advertising sources is a HUGE problem. Tracking advertising sources is critical to being able to identify how many visits and conversions particular ad buys are generating. Fortunately, there are a number of different solutions for setting up tracking for different types of advertising properties.

How to add tracking for Google Adwords

By default, your Google Analytics account will not recognize traffic generated by your Adwords account as paid advertising, and will instead identify it as organic search traffic. However, it’s really easy to link your Adwords and Analytics accounts. After linking your accounts, Analytics will properly label traffic with source=Google and medium=ppc and will also communicate a couple of additional attributes, specifically:

Campaign – the name of the Adwords campaign that generated the ad
Ad Content – the copy that the search ad displayed

Sounds useful, right? Here’s how you set up the link.

Click on the “Admin” tab in the top right of your Google Analytics screen.

Then, in the far left column under “Account Management”, click “Adwords Linking”.


On the following screen, click “New link”.


Then, select the Adwords account you want to link. Analytics should already recognize those Adwords properties for which you have Admin access. If you see a message that says that you do not have the permissions needed to link the desired Adwords account, you will need to either request Adwords Admin access, or else ask someone with Admin access to link the account for you.


Once you have selected which Adwords account to link, then select which Analytics view to link to it to. Check the “Data Sharing” checkbox, if you would like to be able to view Analytics data from Adwords.


Do not be alarmed if you do not immediately see evidence of proper account linking. It may take up to 24 hours for the accounts to be properly synced and for you to begin seeing proper Adwords source tracking in Analytics.

So once you’ve linked your Adwords account, you will have proper source tracking for that advertising medium. You can also follow the same steps to link a Google AdSense account, if you have one. But what about other online display ads or offline advertising? Read more to learn how to use UTM parameters to fix advertising source tracking.