Quick: which social network is bringing in the most traffic to your website right now?

It’s OK if you don’t know off the top of your head. (I don’t memorize that sort of stuff either!) But wouldn’t it be great if you could pull up the answer in just a few seconds whenever your boss asks you this?

What about revenue broken down by social network?

What about the percentage of traffic generated by social versus email?

You can track it all, and you can track it for free: all you need are Google Analytics and a little bit of UTM link codes.

I’d love to share with you how that’s done. =)

Quick note: You can tag your social media links with UTMs automatically in Buffer! Feel free to sign in and follow along as I step through the instructions here. (If you’re trying to tag lots and lots of links at once, you might like to grab our free UTM tagger template!)

UTM guide

A Quick-and-Simple Overview of UTM Codes

What are UTM codes, and why are they so important?

“UTM” stands for “Urchin tracking module.” Urchin Software Corporation was acquired by Google in 2005, and their software laid the groundwork for what we now know as Google Analytics.

UTM codes are bits of text you can add to a link that tell Google Analytics (as well as other analytics tools) a little bit more information about each link. Here’s a sample of what one looks like:

utm example

Why are UTMs important?

If you’re spending a lot of time in social media, you might be publishing hundreds of new links per day.

UTM codes help you track the performance of each of those links so you can see where your traffic is coming from.

You can use the UTM variables within the link to track general information, like how much traffic you’re getting from social media. You can use them to track the fine details also, like how much revenue you get from your Twitter bio.

There are many, many ways to track links with UTM codes.

And the good news: If you settle on a strategic way to tag your links now, you’ll save yourself a lot of time (and headache!) in the future.

I’m about to share an approach to UTM tagging that has been especially helpful for me when it comes to measuring the success of my links, and I hope it will be for you, too. =)

But before we jump into that, let’s quickly set our expectations for what a well-tagged URL can accomplish for you.

The 3 Essential Questions a UTM Link Can Answer

When all UTM’ed up, a link should be able to help you answer some basic questions about your web traffic:

  1. Where is the traffic coming from?
  2. How is it getting to me?
  3. Why is it coming to me?

Essentially, UTM codes tell the story of how your traffic is coming to you.

This works by using three (or four) elements called “UTM parameters,” which we’ll cover in detail below:

  • Source
  • Medium
  • Content (optional)
  • Campaign

That’s why a UTM-tagged URL looks like this:


See all those “utm_” bits? That’s where we’re labeling the traffic that comes from this link.


Of course, typing that long string of characters is pretty scary, so most people use URL generators. These nifty tools let you plug in the values for each of those parameters, and then the tools do the magic of stringing them together into a nice URL. Some popular generators include:

The UTM parameters, in turn, tell Google Analytics how to sort your incoming traffic. If you’re tracking your links across social media (and across the rest of your digital content!), you’ll get a lot more goodness out of Google Analytics’ Acquisitions features—because you’re giving GA more to track.

Here are the different places to find UTM information within your Google Analytics dashboard:

  1. Acquisition > All Traffic > Source/Medium
  2. Acquisition > Campaigns > All Campaigns


Now, let’s look at how to use UTM codes and parameters in your social media links.

How to use UTM codes and parameters in your social media links

With UTM codes, we’re trying to help Google Analytics tell us the story of how our social media traffic is getting to us. We’re trying to answer three questions:

  1. Where’s the traffic coming from?
  2. How is it coming to me?
  3. Why is it coming to me?

The good news is: choosing your UTM parameters is as simple as answering those questions for every link you publish. Let’s look at how that works together.

utm examples for social media links

1. How to use the “Source” UTM parameter in social media

tl;dr — You can use the name of the social platform you’re sharing the link to (e.g., Twitter, Facebook) as the “source” UTM tag.

The “source” parameter is all about answering the question, “Where is my traffic coming from?”

By adding the parameter &utm_source= to your links, you’re tagging every visit that comes from that link in a way that says, “this visit came from such and such.”

So, your “Source” UTM parameter will simply state where the traffic is coming from.

Now, I say, “simply,” but there are a multitude of ways that this could be done. For example, if you were tweeting to your followers about a sweet blog post you just wrote, you could answer the question “Where is the traffic going to come from?” a few ways.

  • It’s coming from you, the sharer.
  • It’s coming from Twitter, the place where it’s being shared.
  • It’s coming from your followers, the ones reading it.

There are all kinds of ways you could think about this.

But Google recommends using the “source” field to describe the “referrer,” or the entity that’s actually sending the traffic your way. In this example, a good source tag would be simply “Twitter.” There are a few good reasons for this:

  • You will eventually want to track ALL of your traffic from Twitter in one place (simplicity FTW!)
  • In the case of social media links, this makes even more sense. If someone shares or Retweets your links, then the traffic isn’t really coming from you anymore­—but it’s still coming from the same social media platform!

In social media, I’ve found the simplest approach is to use the social platform you’re sharing the link to as the “source” UTM tag. When I share a link to Facebook are tagged with “&utm_source=facebook” =)

2. How to use the “Medium” UTM parameter in social media

tl;dr — Consider setting “social” as your medium tag for all links shared on social media.

This parameter is all about answering the question, “How is my traffic coming to me?”

By adding the parameter &utm_medium= to your links, you’re tagging every visit that comes from that link in a way that says, “this visit came via _______.”

This is a little less straightforward than the source tag we looked at, because for every way to describe where the traffic is coming from, there are probably 10 ways to describe how it’s getting to you!

That’s why it can be helpful to establish some UTM conventions up front. If you give yourself a general list of options for the “medium” tag, then this part of the link-tracking process can be a lot easier.

Google suggests using a general name of the marketing medium for this parameter on their URL builder:


That helps keep it simple! For tagging UTM codes on social media, a really simple approach is to always use “social” as your medium. You don’t have to do this, but I’ve found it makes it very easy to sort the traffic in my high-level marketing channels—especially if I’m taking Google’s advice on this when I’m tagging other links.

Just FYI, here are some other “medium” tags you might consider for non-social links:

  • Email
  • Blog
  • Blog-guest (for when you’re guest posting on an influencer’s blog)
  • Blog-syndicated (for when you’re sharing your articles with syndication sites)

3. How to use the “Campaign” UTM parameter in social media

Now for the last of the questions: why is the traffic coming to you?

This is what the “campaign” UTM parameter is all about. By adding the parameter &utm_campaign= to your links, you’re tagging every visit that comes from that link in a way that says, “this traffic is coming from this effort.”

There are SO MANY ways to use this tag! And the beauty of it is that if you’re consistent with your source and medium UTM parameters, you have a lot of flexibility when it comes to tracking campaigns.

Here are a few ways to think of using the campaign parameter:

  • Use it for special promotions. Doing a new product launch? Try “launch-[Product Name]” as your campaign.
  • Use it for personas. If a post is crafted especially for one buyer persona, you may want to consider tagging that link accordingly. For example, you could try “manager-mandy” or “practitioner-pam” as your campaign values.
  • Use it for business objectives. Is that blog post you’re tweeting about going to generate leads, sales, or thought leadership? You might try using campaign values like, “contact,” “complete,” or “lead.”

Note: be empathetic with your tags, as your readers can see them in the URL bar of their browsers. =)

How to track your social media UTMs in Google Analytics

And once you’ve been tagging and tracking your links with UTMs, you can get a really good feel for where your traffic is coming from by hopping into Google Analytics.

Google Analytics makes it really smooth for organizing and analyzing these UTMs. You can see UTM campaign, source, and medium all from the same Google Analytics dashboard.

Here’s where:

  1. Go to Acquisition > Campaigns > All Campaigns
  2. Click to view the Primary Dimension of Campaign, Source, or Medium


Case Study: Using UTM parameters to tell the story of Star Wars

Remember the end of Star Wars, when Luke Skywalker and the Rebel Alliance race to blow up the Death Star before the evil Galactic Empire destroys the rebel base?

What if we told that story . . . with UTM tags?

Luke Skywalker is flying to the Death Star. Let’s assume Luke represents web traffic coming from a tagged link. We’ll make Deathstar.is the target URL the rebels are sending “traffic” to.

The source of that traffic? That would be the Rebel Base. Which means that if we were to express that in UTM terms, we’d have . . .


So we know that the Death Star is where Luke Skywalker (the traffic) is flying to, and we know the source of that traffic (Rebel Base). Now . . . how’s Luke getting there? In his trusty X-wing fighter, that’s how!

Now, what if we added that to our UTM story? It would look a little something like this . . .


So we know that Luke Skywalker (the traffic) is flying to the Death Star (the destination URL). He’s flying from the rebel base (the source) in his trusty X-wing fighter (the medium).

But why? Why is that traffic coming to the Death Star in the first place?

Because the Rebels want to save their base and later save the galaxy from the likes of Darth Vader.

So, if we were to sum up this story in UTM tags, we would need a campaign tag to tie this all together. We’ll choose “stop-darth-vader” for this one. =)


So, here’s the story of Star Wars in UTM-tagged URL form!

  • Destination URL = where the traffic’s going (the Death Star)
  • Source UTM tag = where the traffic’s coming from (the rebel base)
  • Medium UTM tag = how the traffic’s getting there (X-wing fighters)
  • Campaign UTM tag = why the traffic’s going there (to stop Darth Vader)


Quick recap on UTM parameters in social media

We’re about to jump into how to track these in Google Analytics, but first, let’s do a super-quick recap on what we’ve covered:

  • The “source” UTM tag = the referrer (Facebook, Twitter, LinkedIn, YouTube, etc.)
  • The “medium” UTM tag = how the traffic gets to you (for most social media links, this will just be “social”)
  • The “campaign” UTM tag = why the traffic is coming to you (launch, persona, promotion, etc.)

Here’s a quick tip for Buffer for Business users: you can automate your UTM tags in Buffer! Here’s how.

First, go to “Settings” in your Buffer account and select “Link Shortening.”



Then, scroll down toward the bottom. You’ll see the “Google Analytics Campaign Tracking” section. You’re just two steps away from customizing your Buffer links:

  1. Toggle that “Enable Campaign Tracking” switch to “Yep.”
  2. Click the “Customize Campaign Tracking” button.


Behold, your own custom Google Analytics tagging options! =) I’ve got my Twitter account set up so that every link I tweet through buffer is tagged accordingly:

  • Source = twitter
  • Medium = social
  • Campaign = jeffrey-the-red (a form of my Twitter handle)


BOOM! Now all my tweeted links are automatically sorted. (Yours can be, too.)

Summary (and a few goodies)

Now you know how to use UTM tags, and you’re ready to keep track of all your social traffic.

Now, Buffer’s a great tool for automatically tagging links to be used on social . . . but what if you want to tag LOTS of links in social and outside of social? What if you’re running a huge campaign that encompasses blog posts, PPC ads, tweets, and emails?

That’s a lot of links to build one at a time.

So let’s make it easier! We’ve put together a UTM tagger template spreadsheet that helps you generate lots of UTM tagged URLs for any campaign—and it just takes a few seconds to tag ALL your links at once!

Get the free UTM tagging template!

Click here to download the free UTM tagging template to use for your next campaign!

Looking for a better way to share on social media?

Schedule, publish & analyze your posts across the top social networks, all in one place.

Start a 14-Day Free Trial
Written by Jeffrey Kranz

Jeffrey Kranz is CEO and co-founder of Overthink Group, a content marketing and strategy agency. He gets a kick out of making things “learnable.”

  • Ok, I hesitated, cause I don’t want to look stupid. But I want to learn! I know what social platform is bringing me the most visitors, cause GA is already telling me that. I just go to Aquisition – Social – Overview and all the info is there. Why would I want to add utm-tags to my links? I don’t see the benefit?
    Now, other question, I would love to be able to check where people are clicking TO away from my site. I cannot get the options I find on the internet to work for me…

    • Hi, Bianca! What a great question—IMHO, it makes you look quite clever. 😉

      It’s true! Google Analytics is remarkably helpful when it comes to batching traffic by channel. If all you needed to find was the answer to this question, yours is the streamlined approach.

      However, one of the tricky things for me in letting GA auto-track social sources has been tying sources to those other tags. For example, I’ve noticed GA attribute some inbound traffic to the source “facebook.com” and some to the source “m.facebook.com” (the mobile site). This is no problemo when it comes to looking at social networks as sources, because Google lumps them together as “Facebook” in the Social section of Acquisition.

      But suppose I were launching a new product and wanted to see which social networks are driving the most traffic for this campaign in particular. In this case, UTM codes would give me a more consistent “source” parameter to sort that incoming social traffic by. =)

      Does this help explain why I like tagging those social links, even though Google does a good job of batching them most of the time? I’m very happy to chat on this more (or perhaps write up a follow-up post)!

      Now, as to that second question . . . the short answer is “yes, but I don’t know exactly how.” =) You would need to set up event tracking JavaScript, and sort all events associated with clicking a link to an external domain. Then you’d be able to view all outbound clicks and URLs in Behavior > Events. Is this helpful, Bianca? =)

      • Dennis T.

        Google Tag Manager.

  • Goncalo Ponte Silva

    I think the whole post was quite clear but the Star Wars example really nailed it! 😉
    Excellent job!

    • Thanks so much, Goncalo! I’m really glad you enjoyed it. =)

  • Great guide. Thanks Jeffery.

    Defining your UTM strategy is certainly one of the biggest challenges. It needs to work now but also be open setup in a way that doesn’t require an entire overhaul in the future when you choose to add additional tracking or integrate other tools.

    • Thank you for the kind words, Ben! As to UTM code strategy, I think you’re spot on. The biggest challenge is settling on something that will work long-term, but isn’t too unwieldy in the short term.

  • Thanks for the template, but you should rework it to include the star wars example too!

    • You’re most welcome, Brent!

      You’re right, the Star Wars link would be pretty fun—I was this close to including it! Only reason I didn’t was that Deathstar.is is (as of now) an available domain, and I have NO IDEA what might end up living there in the future. 😉

  • chsweb

    The section about Google Analytics Campaign Tacking should be more clear. It is not obvious that you need to go into Link Shortening, within Buffer, to set up the auto UTM tracking that is mentioned above.

    This Buffer blog post explains it for anyone else who got lost there:

    Great post otherwise. The template/tool is great too.

    For any TextExpander users out there, you can also build expander templates that will make creating UTM tracking links really easy anywhere, not just Buffer.

    • Thanks so much for the advice, Jono. You’re right: a “complete guide” could do with some more clarity. 😉 I’ve added some more screenshots to show how to get to the custom tracking section within Buffer.

      As to your question, the custom tracking is indeed a Buffer for Business feature. Thanks for catching this! I’ve specified it in the article as well.

      Thanks so much for sharing your UX eye with us!

      • chsweb

        Beautiful, thanks.

    • Brenda Reed

      I cant believe I just bought a year 2012 Mercedes GL-Class Diesel by working part-time off of a macbook……After earning an average of 19952 Dollars monthly,I’m finally getting 97 Dollars an hour,just working 4-5 hours daily online.….. Weekly paycheck… Bonus opportunities…earn upto $16k to $19k /a month……….Only a few hour required to understand and start working…….look over here
      ➤➤➤ http://GoogleTopCareersGetNewestFinancialJobs/get/morethan$97/h…

  • Hi Jeffrey, thanks so much for this guide! I built my own URL builder with Google Spreadsheet. I included a validation for each parameter so I won’t mistype a parameter. I also added an optional column “utm_content”. The column “utm_content” is only parsed when the parameter has a value and isn’t blank/empty. For the Star Wars example I added “bomb” as utm_content 🙂

    I made a copy of the spreadsheet and enabled sharing to the public: https://drive.google.com/open?id=1QwSEFahzwsdS5G-XKwOdtUcK-dDGO8zMz1NcEaFPpw4

    • Wow, thank you so much for making this, Frank! What a clever way to pull in the content tag (or not, if there is none). Love the “bomb” addition, too!

      I’ve Buffered your spreadsheet as a Monday morning gift to our Twitter pals. =D

      Again, many thanks!

  • Okay, it’s new knowledge for me. Is the campaign UTM very important for personal blog like me? Thanks for this graceful article 😀

  • Natchi Lazarus

    Thanks Jeffery!

  • Hi Jeffrey, thanks for your guide, it was very helpful.

    One question, do you know if I can acess to the list of UTM’s that were created to add/delete of modify them?

    Thanks in advance.

    • Bryce York

      the tools listed above don’t actually keep track of the links you’ve created in the past. i’m working on a tool that will though, let me know if you’re interested in testing it out.

  • Great read, thanks for this Jeff – Was just what I was looking for. Our analytics have been an absolute mess simply because UTM’s have been created with no process or plan!

    Will give this a bash and implement a far more structure approach.

    Thanks again

    • Bryce York

      Hey Daniel,

      I’m actually working on a tool to help solve exactly the problem you’re having with sticking to a unified structure.

      Let me know if you’d be interested in the free private beta i’ll be opening up soon. via @meetbryce on twitter is probably easiest.

  • jamiecaroccio

    Thanks for the guide, just what I was looking for!

  • Hok Shun Poon

    Fantastic exemplar blog post for UTMers everywhere. When I first saw the terms source, campaign and medium I had no idea how normal people use them or how they’re supposed to be used. Now I know!

  • Peter1411

    Thank you for the very informative post.

    My question is, should I track “every” link I post on social media with a unique UTM code or should I only do this with important campaigns? I am starting out with my site and planning 5-10 posts on Facebook with links to my site each month.

    If I give every link a unique UTM code, eventually it will be a lot of links and may be a headache to manage. On the other hand, I will be able to track traffic for each and every post on Facebook to see which drive most traffic.

    Is it best practice to track every single post linking back to my site? Any insights or experiences would be helpful.


  • databackup

    Have to agree the url shortening confused me also. I have been using a 3rd party for my url building from a crowd called http://www.whysr.com/ it has helped me in regards to the omni channel.

  • Bill Brandin

    Is there a way for me to make multiple campaign links and save them for later? I don’t want all my links tracking data to the same campaign in Google Analytics.

    • Bill Brandin

      Am I able to use a google UTM link and paste it, have it shortened, and still track the link with the parameters I already set up?

  • Such an incredibly useful guide. Thanks for sharing, @jeffreykranz:disqus!

    It looks like the link to “Google’s URL Builder” has moved to https://ga-dev-tools.appspot.com/campaign-url-builder/.

    Perhaps it’s worth updating the link on this post.

  • Umar Ghouse

    Thanks so much for the very detailed guide!

    Just one question, do I have to use something like the Google URL Builder? Would it still work if I just typed them in? Or is there some other wizardry going on in the background when using a URL Builder?

    Thanks again!

  • What’s your stance on using UTMs within the website? How will this affect session reporting when used on internal links?

  • Great read this! The most important issue I see often with most marketers is the lack of consistency in naming the UTM parameters. Inconsistent naming makes it very difficult to get meaningful data within Google Analytics. I have created a free app to solve exactly this and a lot more. Check it out here. http://lme.io/p43zA