Analytics: Using Campaign Tracking with Google Analytics

GA Campaign Tracking is code that can be added to the end of promotional links to your site. These special links send data to your Google Analytics account to help you identify which of your web traffic came to your site as a result of those promotions.

Consistently using GA Campaign tracking can help you answer questions such as:
  • Which emails drive traffic to your site?
  • Is you social media traffic returning to the site or it just a flyby?
  • Does that link on NPR.org actually drive pledges?
  • Do I drive traffic to my local partner?

Ingredients for Google Analytics Campaign Tracking Code

Campaign Tracking code consists of 3 required parameters that need to be added to the end of your URLs:
  1. Medium (utm_medium):  Highest level - Used for the marketing channel (email, social, paid advertisement, etc) the link is promoted on.
    Default values are: Direct, Paid/Organic Search, Referral
    Good additions: Social, Email, CPC, Display.
     
  2. Source (utm_source): Used for the specific site or type of email the link is promoted on.
    Default values are domains: facebook.com, npr.org, t.co
    Good additions: Newsletter, Pledge_Campaign, Facebook
     
  3. Campaign (utm_campaign): Most specific level - Which specific email/ad/message was this link a part of?
    No defaults
    Lowest required level should be a unique identifier
    Use a shorthand EM#### for emails, FBL#### for facebook local

Building Your Campaign Links

Build your Campaign Tracking code by first identifying what values make sense for each of the three required parameters.  For example, if I was adding tracking to a link in my Spring Membership Renewal Email, I might define my parameters as follows:

Medium = Email
Source = Pledge_Campaign
Campaign = April2016Renewal

Google Anlaytics has a handy URL builder that makes it easier to build your campaign tracking links. Simply enter in the URL you want to link to and the terms you want to use for each parameter, and Google will create the full link for you.

For the parameters selected above, the tracking code added to the end of the URL should look like this:

?utm_medium=Email&utm_source=Pledge_Campaign&utm_campaign=April2016Renewal

If my donation form URL is https://donate.nprstations.org/npr-demo, the full URL, with tracking code would look like this:

https://donate.nprstations.org/npr-demo?utm_medium=Email&utm_source=Pledge_Campaign&utm_campaign=April2016Renewal

Optional Parameters
In addition to the two required parameters, Google Analytics has two additional optional parameters that can help add nuance to your tracking:
  1. Term (utm_term): Most frequently used in paid search campaigns to track which search keywords drove the traffic.   Multiple terms can be joined by a plus sign. Example: news+music
  2. Content (utm_content): Drills down to the specific piece of content the link is on. Examples: logo_link, text_link

Where the Data Shows Up in Google Analytics

The parameters you add in your links will appear within the referrer information in the Acquisition Reports in your Google Analytics account.

Hints & Best Practices for Managing Your Campaigns

  • Use a spreadsheet to keep track of these the parameters and the intended landing page.
  • Remember that the parameters you choose are visible to users – keep them short, sweet, and not creepy.
  • Campaign tracking overwrites other referral data
    • ex. You tweet the link to a great story: ds.npr.org/metricsareawesome?utm_medium=social&utm_source=twitter&utm_campaign=twtmb2000
    • Someone loves it and posts the link from your tweet to Reddit
    • Reddit.com will not be the referrer in your reports, your tweet will be the referrer
  • Google Analytics places a cookie on each user’s computer when they follow a tracked link. This cookie will stay with the visitor across visits to your site, which will allow you to track repeat visitors to your site who were initially referred by a specific Campaign.
  • Campaign Tracking cookies overwrite each other. This means that if a visitor who first came to your site through one campaign later clicks through a link on a second campaign, any subsequent visits will be attributed to the second campaign.


Common Pitfalls:

GA Campaign tracking is designed to help you tell what source your web traffic is coming from. Do not use GA campaigns to track links between pages on your own site(s).

GA campaign tracking uses cookies and overwrites existing source data so using it on your site can lead to misleading, incorrect and confusing data about where your traffic is coming from.

If you want to track which buttons and links users are clicking on within your own site, the better option: Event tracking (available in SAS tags).

Questions? Having Trouble? Contact Station Relations

Did you find this article helpful?