Custom Campaigns

Get more data about where users are coming from.

Custom Campaigns can help you find out how referral traffic arrives at your content, so you can identify the most effective ways to attract more users.

To use Custom Campaigns, add parameters to your URLs that can identify where those links are placed within a specific campaign that you're running. When a user clicks a link, these parameters are sent to your Analytics reports, so you can then analyze which URLs users click to get to your content.

For example, you could use Custom Campaigns to find out if more users arrive at your download page in an app marketplace from an in-app ad or a search ad. You could also use Custom Campaigns to find out how many users come to your web site from a link that was included in a monthly email newsletter.

How to set up Custom Campaigns

To set up custom campaigns, you need to add parameters to the end of your URLs. You can do this manually, or use one of our platform specific URL builder tools to help create and append the parameters and their values. Click to see the specifics on how to set up Custom Campaigns for each platform:

For websites

Use the URL builder tool to define and append URL parameters.

For Android

Use the Google Play URL builder tool to help define and append URL parameters. You must also have Google Play Campaign Attribution set up in your SDK. If you didn’t complete this during your initial set up, use our Developer Guide to learn how to implement Google Play Attribution in your Android SDK.

For iOS

Use the iOS Campaign Tracking URL Builder to help define and append URL parameters. You must be using Google Analytics iOS SDK v3 or higher, but you don’t have to make any changes in the SDK for this feature to work.

For manual set up

If you want to set up your Custom Campaigns manually, make sure you separate the parameters from a URL with a question mark. List the parameter and values as pairs separated by an equal sign. Separate each parameter-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 value you define.

Refer to the Campaign & Traffic Sources Feature Reference on our Developer site for a more technical overview on how this works in Google Analytics. You can also refer to our Developer Guides for Android and iOS for more detailed information on Custom Campaigns for Mobile App Analytics.

How Custom Campaigns work

There are a total of five parameters you can add to your URLs. Each parameter must be paired with a value that you assign. Each parameter-value pair then contains campaign-identifying information.

For example, you could set the parameter utm_source as newsletter to identify traffic that come from a newsletter. You could then combine it with the parameter utm_campaign set to june to identify 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 which campaign each value relates to.

Example URLs for Custom Campaigns

Our URL builder tools will create these for you, but if you create your URLs manually, make sure they look like these 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

You should always use utm_source, utm_medium, and utm_campaign parameters to help keep track of different campaigns. 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, for example: google, citysearch, newsletter4, billboard.
  • utm_medium: The advertising or marketing medium, for example: cpc, banner, email newsletter.
  • 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.