Last Updated: 21 Nov 2020


Author: (external edit)

Using and Standardizing UTM Campaign Variables in GA

The 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:

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 Sourceutm_sourceRequired. Use utm_source to identify the source of your traffic, e.g. a search engine, a newsletter, a banner ad or another website.
Campaign Mediumutm_mediumRequired. Use utm_medium to identify the type of source, such as cost-per-click ad or an email.
Campaign Termutm_termUsed primarily for paid search. Use utm_term to note the keywords for this ad.
Campaign Nameutm_campaignUsed to identify a specific named campaign. utm_campaign allows you to figure out which campaign(s), of many you might be running, are most successful for you.
Campaign Contentutm_contentUsed for to denote which piece of content (of an A/B or multivariate test) was shown to the user. utm_content allows you to figure out which pieces of content are most successful.

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=facebook/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. redirects to 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. utm_campaign=2011-march-my-big-banner-campaign.


Chad Moston, Jan 8, 2012 09:59 PM

Is there a dynamic parameter we can use to differentiate campaign source traffic coming from bing or yahoo? To just use utm_source=bing as the campaign source parm isn't exactly accurate as adcenter campaigns run on both and

Enter your comment. Wiki syntax is allowed: