Facebook, Twitter and Google Analytics – Tracking Social Networks in Google Analytics, Part 2

(for Part 1, see our previous blog Track Facebook, Twitter & Social Networks in Google Analytics Pt. 1)

Previously, we discussed accurately categorizing your social network traffic within Google Analytics. Instead of seeing your Twitter, Facebook, or YouTube traffic scattered amongst all other referring sites, we used a filter to group social media sites under one medium.

But what about tracking visitors down to a more granular level? For example, you know that 100 visitors came to your site from Twitter – but which tweet drove the most traffic? Do your Twitter followers click when you talk about one product vs. other? We can collect this information using two very simple tools.

Tagging Links in Google Analytics

I discussed this awhile ago (Top 3 Google Analytics Tracking Tips), but for this, let’s focus on tracking specific social marketing efforts. We want to know which specific link brought traffic, and be able to analyze that information. This is fairly easy and only takes about a minute to incorporate.

With a text limit of 140 characters, microblogs like Twitter or Facebook force users to keep it short and simple. Usually, there’s no room for long, drawn out URLs like www.example.com/products/XYZproduct.html. So, websites like TinyURL.com and bit.ly take web addresses, shorten them, and provide that hyperlink, which users then use to direct visitors – thereby giving them more room to include actual text. The great thing about these URL shortening services is that you can tag the original link with Google Analytics’ tracking variables and correctly identify the source of visitors. Here’s one in action:

Let’s walk through an example. JimBob P. Yokel owns an online malt liquor supply store (“You ain’t never gon’ find no better booze, no how,” JimBob swears). He uses Twitter regularly to inform his customers of sales and specials, and like many other Twitter users, incorporates shortened URLs into his posts.

But before he shortens these URLs, he uses BEM Interactive’s Google Analytics URL Tagging Tool. This enables him to identify, down to the individual Tweet, how visitors found his site. So for a Twitter post promoting Colt .45 (“It’s the maltiest!” says JimBob), he might tag the link like so:

  • Source: twitter (the site he’s posting on)

  • Medium: social network (if you’ve created the filter described in Part 1 of this blog, this will correctly identify the traffic as belonging to that category. If not, this can be “tweet” or something similar)

  • Campaign Name: colt45 (if JimBob is grouping his marketing efforts by product type, and Colt 45 is a type of malt liquor that he’s promoting in the tweet)

  • Term: 7_15_11AM (identifies which specific tweet or post drew the visit. Here, JimBob has identified a post by time – July 15th at 11AM. This can be classified according to whatever works best for you – as long as it’s consistant)

So, if JimBob’s destination URL is http://www.JimBobsHouseOfMalt.com/colt_45.html, then the entire link, with tags, is:

http://www.JimBobsHouseOfMalt.com/colt_45.html?utm_source=twitter&utm_medium=social network&utm_term=7_15_11AM&utm_campaign=colt45


Pretty nasty looking, eh? A visitor arriving after clicking that link would be correctly identified and tracked – but a URL like that won’t even fit in a Twitter post! What’s to be done?

Here’s where the TinyURLs of the world come in! JimBob copies his resulting URL, complete with Google Analytics tags, out of the builder tool. Then he heads to TinyURL.com (or bit.ly, or any other URL shortening service), plugs in his nasty-looking tagged URL and hits submit, getting a cute little link in return! It looks better, gives JimBob more space to pitch the product (“Only the maltiest make the cut,” he vows), and perhaps most importantly, retains all the visitor tracking tags and information.

Maintaining the correct variables & formats of those variables, you can track all your website traffic from links in Twitter tweets, Facebook status updates, or any other links. This control and flexibility really comes in handy when analyzing the numbers and impact of social network marketing.

Facebooktwittergoogle_plusredditpinterestlinkedinmailFacebooktwittergoogle_plusredditpinterestlinkedinmailby feather

3 thoughts on “Facebook, Twitter and Google Analytics – Tracking Social Networks in Google Analytics, Part 2

  1. Ravi

    Thanks for the post. question is. Right now with Bit.ly I post a link. Bit.ly reports 10clicks say. If I look on my Google Analytics it says site had 5visits. Somethings amiss. Thoughts?

  2. Jeremy

    Anon – thanks for the tip! I’ll check it out.

    Hi Ravi – you’re absolutely right. There’s a fair bit of discrepancy between visit numbers reported by Google Analytics, link trackers like Bit.ly, and visits recorded in raw server logs. The numbers are complicated by visits from mobile Twitter users that may not have a JavaScript-enabled browser, search engine spiders & other bots, etc etc.

    There’s a great article on the subject here, but essentially, most analytics packages (including Google) will under-report visits from Twitter, while Bit.ly seems to overstate the numbers. Until a solid conclusion is reached, it seems like the true number lies somewhere in the middle.

Leave a Reply

Don't see what you're looking for?
Give us a call at .