How to Use UTM Codes in Social Media: A Guide For Brands

Businesses know they should be involved in social media, but many find it hard to quantify the impact it has. In Social Media Examiner’s 2014 report, 88% of marketers want to know how to measure the ROI from social media.

track-social-media-fitted-300x241One way to start quantifying the impact is by tracking the number of people that visit your website from specific social media posts and content. Even though Google Analytics tracks visits from social media by default, understanding exactly what content drove the most traffic can be a valuable tool. This can be achieved through the use of UTM codes.

What are UTM Codes?

A UTM code is a simple piece of code that’s added to the end of a URL. UTM is an abbreviation for Urchin Tracking Module, and is recognized by Google Analytics to provide accurate measurements of unique website visitors. Anyone can create a UTM code, and this snippet allows you to track the source, medium and name of a campaign automatically in Google Analytics when someone clicks on that link.

Depending on your setup in Google Analytics, a click from the new URL can also allow you to track a visit all the way through to an event such as a form submission, coupon print, or other actions.

Creating a UTM Code

It’s easy to create a code – just use the step-by-step process in the Google URL Builder. The Builder allows you to track up to 5 different attributes but most campaigns will only need the 3 that Google requires:

URL Builder

Once on the Builder:

  1. Enter the Website URL that you’d like your post to link to
  2. Designate the Source of the visitor (ex: “Facebook” or “Twitter”)
  3. Enter a Medium to better specify the placement (ex: “Post” or “Sponsored”)
  4. Enter a Campaign Name to tie the visit to a promotion or seasonal focus (ex: “halfoffsale”)

Campaign Term and Campaign Content are also available, and could be used to further specify the visitor’s origin.

A UTM code for a post on Nike’s Facebook page might look like:


There’s no way I’m posting that entire thing!

Real estate is limited on social media and long URLs are ugly, so using a free URL shortener like, Hootsuite’s, or TinyURL will shrink your new tracking links. They’ll be smaller, look nicer, and allow you to track visits just as well as if you’d pasted the entire thing.


Tracking in Google Analytics

Now that you’ve tagged URLs, shortened them, and placed them in the wild, you’ll want to start interpreting the results. To do this, simply find the Campaigns section in Google Analytics.

If you’re using Universal Analytics, you’ll find this in the Reporting section under:

Acquisition > Campaigns > All Campaigns

Within this view, you’ll be presented with the Campaigns you’ve tagged. You can also change the data view to focus on the Source, Medium, or other attributes instead.

Applying a Secondary Dimension, such as Source or Medium, will also allow you to layer data into the report to better compare your tags in relation to one another.

Campaigns Diagram (arrows v2)

How Brands Should Set up Campaigns

If you’re planning a series of posts, manage a vendor, or work with a social media team, you’ll want to organize your tracking using two steps.

1. Define the UTM parameters

Taking the time to clearly lay out what tags a vendor should use will help ensure you stay organized. I organize tags like this:

Campaign Source *: [AgencyName]
Campaign Medium *: [Socialwebsite]
Campaign Content: “Post” OR “Sponsored” OR (Other)…
Campaign Name *: [Post Date in YYYYMMDD] – PromoSlug

All elements in BLUE would remain consistent. All capitalization would remain consistent, as well, as “ABCAgency” and “abcagency” will create separate tracking. If it’s easier, just use lower case for everything.

Using this structure, a Facebook post for Red Robin might have the following inputs:

Website URL:

Campaign Source *: AbcAgency
Campaign Medium *: Facebook
Campaign Content: Post
Campaign Name *: 20150315 – SpringPromo

This naming convention will allow all posts to be aggregated by a single Source (agency name), a limited number of Mediums (social sites), and Campaigns will be organized chronologically with identifying information about the promo.

2. Set up a custom report

If you want to easily look at how your campaigns are doing in Google Analytics, a custom report will be worth the 15 minutes to set up.

Simply access All Campaigns described above and click “Customize.”


In the Custom Report interface, you can name the report, select the Metrics you’d like to display, choose your Dimension Drilldowns, and add necessary filters to build your report.

For Metrics, start with Sessions, Users, and any Goals you have specified.

For Dimension Drilldowns, I’d recommend using: Source/Medium, Campaign, and Ad Content.


Then, add a Filter to make sure you’re pulling in data only for the info you want. I’ve added a filter for Source to aggregate all social media links being posted by the agency.



Save it, then sit back and relax! You now have an automated assessment of performance from your social media campaigns.


Quantifying the impact of social media is a challenge for marketers, but UTM codes can help shed light on direct actions from campaigns. With some simple setup, your Google Analytics account can help you justify investment in this important channel.

2 thoughts on “How to Use UTM Codes in Social Media: A Guide For Brands

  1. Look who’s learning his stuff :). Nice work guy!


  2. Excellent website. Remember, there’s always 1/3 staying, 1/3 going & 1/3 who don’t care.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close