Campaigns

Custom Campaigns

Get more data about where visitors are coming from.

By capturing the Source and Medium for your referral traffic, Google Analytics can help you identify the most effective ways to drive more visitors to your website or app. The Source is the place last visited before reaching your property (e.g., a search engine or your own website) while the Medium is the method a visitor used to arrive at that source (e.g, by clicking a search result, a link on your homepage, or an ad). Any traffic that isn’t coming directly to your site is known as referral traffic.

With custom campaigns, you can add parameters to any URL you own that links to your site or app and collect more information about your referral traffic. For example, you might want to know how many users click a Download this app link from your website or how many visitors come to your site from a link within a monthly email newsletter.

Custom campaign parameters display in your Analytics reports, so you can see which URLs visitors click to arrive at your property.

Set up Custom Campaigns

To set up custom campaigns, add parameters to the end of a URL. The parameters are variable-value pairs that contain the campaign identifying information and values for each that you define. For example, the tag utm_source=newsletter identifies that the traffic came from a newsletter and the tag utm_campaign=june identifies that this was the campaign in the month of June. There is no limit to the number of values you can have, but we recommend you use transparent names and keep track of what campaigns each value relates to.

Separate the parameters from a URL with a question mark. List the variables and values as pairs separated by an equals sign. Separate each variable-value pair with an ampersand. Parameters can be added to a URL in any order, but must use the proper syntax. Note that Analytics is case sensitive, so utm_source=google is different from utm_source=Google. Case sensitivity applies for each variable you define.

Setting up custom campaigns doesn’t require any changes to the tracking code. You can set them up manually or use a tool to help create and append URL variables. Use the URL builder tool for website tracking and the Google Play URL builder tool for mobile app tracking.

The Google Analytics terms of service prohibit sending any personally identifiable information (PII) to Google; don't include any PII in your Custom Campaigns. Review best practices for creating Custom Campaigns and the Google Analytics privacy principles for more information.

Examples

http://www.example.com/?utm_campaign=spring&utm_medium=referral&utm_source=exampleblog

http://www.example.com/?utm_campaign=spring&utm_medium=email&utm_source=newsletter1

http://www.example.com/?utm_campaign=spring&utm_medium=email&utm_source=newsletter1&utm_content=toplink

The custom campaign parameters

There are a total of five parameters. We recommend you always use utm_source, utm_medium, and utm_campaign for every link you own to keep track of your referral traffic. utm_term and utm_content can be used for tracking additional information:

  • utm_source: Identify the advertiser, site, publication, etc. that is sending traffic to your property, e.g. google, citysearch, newsletter4, billboard.
  • utm_medium: The advertising or marketing medium, e.g.: cpc, referral, email.
  • utm_campaign: The individual campaign name, slogan, promo code, etc. for a product.
  • utm_term: Identify paid search keywords. If you're manually tagging paid keyword campaigns, you should also use utm_term to specify the keyword.
  • utm_content: Used to differentiate similar content, or links within the same ad. For example, if you have two call-to-action links within the same email message, you can use utm_content and set different values for each so you can tell which version is more effective.