Last Updated: 21 Nov 2020
Using and Standardizing UTM Campaign Variables in GA
utm_ variables are one of the most powerful features of Google Analytics. UTM variables allow you to insert your own user-defined campaign source data into Google Analytics reports. For example, if you have an email campaign, you could tag the links in the message so that any website traffic it generates is attributed to the campaign. Same with a banner ad campaign, or even paid links from other sites.
To use the
utm_ variables, you just append them to the query string of your URL:
http://www.startupcto.com/?utm_source=newsletter&utm_medium=email&utm_campaign=july_2011_newsletter http://www.startupcto.com/index.php?utm_source=newsletter&utm_medium=email&utm_campaign=july_2011_newsletter http://www.startupcto.com/index.php?action=loadpage&utm_source=newsletter&utm_medium=email&utm_campaign=july_2011_newsletter
Note in the last example, I already had a query string (
?action=loadpage ), so I appended the
utm_ variables with an
& rather than a
The Five UTM Campaign Tracking / Tagging Variables
There are five UTM campaign variables; two required and three optional. Detailed examples are below.
|Campaign Source||Required. Use
|Campaign Medium||Required. Use
|Campaign Term||Used primarily for paid search. Use
|Campaign Name||Used to identify a specific named campaign.
|Campaign Content||Used for to denote which piece of content (of an A/B or multivariate test) was shown to the user.
Standardizing the Variables
In order to make your reporting easier, you'll want to be sure to standardize all uses of the
utm_ variables. For example, you wouldn't want
utm_medium=paid-ads for one campaign, and
utm_medium=paid-media for another campaign. In GA's medium report, those would be reported as separate line items, which would force you to manually add the numbers every time you wanted to use them.
There's no official standard, but after years of doing this for companies from startups to Fortune 500, here's what I'd recommend that you consider. A few key points to keep in mind:
- Make everything lowercase. Easier to specify that as a universal standard that try to specify what should be uppercase and what should be lowercase.
- Use short, but descriptive names.
- No spaces are allowed. Use dashes (-) or if you must, a plus (+) in place of a space.
The source (e.g. website, search engine, etc. your traffic came from).
utm_source=google: for Google Adwords
utm_source=bing: for Bing/Yahoo Ads
utm_source=AGENCY-SITENAME: for paid display ads trafficked by an ad agency. For example, if your agency was OMD and they were advertising on CNN, you'd have
utm_source=misc-SITENAME: for paid ads or promotions NOT trafficked by an agency. For example,
utm_source=product: for offline product inserts (e.g. Brita filter reminder inserts)
utm_source=email: for any email campaigns
utm_source=twitter: for facebook/twitter/etc. Recommend you use this ONLY for unpaid links.
The 'medium' for a campaign. As of Nov 2012, Google has (sort of) published a list of mediums that they recommend you use, in their channel grouping guide. According to the MM2Analytics blog, the only values that appear in the paid report are cpc, ppc, cpa, cpv, cpp, cpm
utm_medium=email: for all email campaigns
utm_medium=cpc: for any cost per click search campaign
utm_medium=cpm: for any cost per thousand impressions campaign
utm_medium=paid-media: for all other advertising; this includes both CPM based advertising and other forms of paid media, but does NOT include the items listed above (e.g. search, social media, etc.)
utm_medium=social: for any social media page links, e.g. pages on Twitter, Facebook, YouTube, etc. Note PAID ads should be tracked via paid-media, cpc or cpm, respectively.
utm_medium=mobile: for mobile advertising; e.g. a text msg which directs users to the website
utm_medium=link: for unpaid links from other sites; paid links should be done via 'paid-media'
utm_medium=offline: offline ads, eg. a product insert. Note: highly recommend you do these with a redirect; e.g. http://www.brita.com/reminders redirects to http://www.brita.com/products/filter-change-reminders/?utm_source=offline. That keeps the print URLs short
utm_term should always be filled with the search term that the user used to find an ad. Note that this generally isn't used, unless you're clicking on search ads.
utm_content is used for A/B testing. The exact value of this variable will depend on what types of tests you're running, but be sure to come up with a standard format for your organization.
utm_campaign should be the name of the campaign that brought the traffic to your site. I like to use human-readable names with dates prefixed, e.g.