A comprehensive guide on how to do segmentation and tracking for all types of social media traffic with Google Analytics – while this guide include Google+, Pinterest, Twitter and Facebook only, the method to measure the number of visitors from each source is the same.

Google Analytics (GA) is a free and powerful online tool that you can use to obtain meaningful information about your website’s visitors. With GA we can gain valuable insight on how visitors come and behavior on our website. You will learn how to use the function “Advanced Segments” to

  1. investigate traffic from social media platforms,
  2. see how those visitors behave on your site,
  3. find out about the quality of visitors,
  4. and discover which platform is bringing you the best or/and most visitors.

Identifying your Major Traffic Sources

In order to see what are the top referrals from social media sites, click on Traffic Sources on the left-side bar of GA, then Sources -> All Traffic. For Primary Dimension, choose “Source/Medium”. Once the data is loaded, you will see the top 10 traffic drivers to your site. To see more, you can setup and show up to 500 rows per page. From the list shown, look for social media URLs and terms, such as:

t.co / referral
facebook.com / referral
plus.url.google.com / referral

For the convenience of everyone and to save your time, I’ll list the URLs for each social media site. If you have any URLs that you will like to share, please post them under comments, thanks in advance. :)

How to Create Traffic Segment for each Social Media

You can create as many segments as you want, depending on how many social media you want to analyze.

Follow the 8 steps below:

  1. After you have login GA, ensure that you have selected &  loaded the correct account/profile/website.
  2. Click on “Standard Reporting”
  3. Click on Advanced Segments
  4. Click on “New Custom Segment” button, located on the right hand-side. (see pic below)
  5. Enter the URLs and keyword terms (see next pic in Twitter section)
  6. Click on “Add OR Statement”
  7. Repeat Steps 5 and 6 until you finished adding all
  8. Give the “New Segment” a name and save it
Creating New Custom Segment in Google Analytics

Twitter

hootsuite.com / referral
twitter.com / referral
t.co / referral
tweetdeck / referral
[include any 3rd party clients]

For those who are not familiar, t.co is the shorten URL used by Twitter. I do not recommend adding bit.ly unless you are using it exclusively on Twitter. Also, you can add other URL shortening services (e.g goo.gl, ow.ly) that you use.

If you are using Twitterfeed to send tweets regularly, you can set the UTM Tags to reflect traffic from there. You can do the same for Facebook segment. I have also been using Twitterfeed secretly for a some time to update my Google+ updates to other social networks.

UTM Tags options for Twitterfeed

UTM Tags options for Twitterfeed

OK, back to the topic on creating a new segment for tracking Twitter traffic. As an example, using the 8 steps mentioned above, I have created a “New Segment” to track Twitter traffic with it’s URLs and keywords. After you are done with adding, click on “Test Segment” to make sure that Google Analytics is tracking it properly. When done right, you will see: “This condition matches xyz visits”

Create New Segment to Track Twitter Traffic

Facebook

For Facebook, you can use the following URLs and terms to track traffic in GA.

m.facebook.com / referral – traffic from mobile devices
facebook.com / referral

Google+

Recently I blogged on Google+ vs Facebook, and touched briefly on how Google Ripples can bring you a huge amount of traffic depending on who circled you. Traffic directly from your G+ update, and/or from reshared G+ updates will still be shown as the URL below.

plus.url.google.com / referral

Pinterest

pinterest.com / referral
m.pinterest.com / referral

To track your Pinterest campaigns, and how you are faring on the new social photo pinboard, e.g. number of likes or re-pins,  take a look at Pinerly instead.

Comparing which Social Media gives you the most Traffic

After you have created all the segments, you are ready to compare which social media platform is giving you the most traffic, the duration of stay, and more information. Similarly, you can compare social media traffic vs organic traffic. At the moment, Google Analytics provides comparisons up to a maximum of 4 segments.

To compare social media traffic:

  1. under Standard Reporting (All Traffic),
  2. click Advanced Segments
  3. select up to 4 Custom Segments, then click “Apply”
Google Analytics will then give you details on Visits, Pages/Visit, Average Visit Duration, % New Visits and Bounce Rate of each social media site.

track social media traffic Google Analytics

Comparing Social Media Traffic in Google Analytics

Comparison of Social Media Traffic – shown on daily, weekly, monthly, or as defined by you.

Total up all the Traffic from Social Media

What if you are only concerned about the total traffic from social media? Or there are too many social media sites referring traffic to you, and 4 segments is not sufficient to do a meaningful comparison? This method provides a way to track traffic from ALL social media (or whatever sources) that you want. You can also check total traffic vs total social media traffic.

Note that you can lump certain sites together in ONE Segment depending on your objectives:

  1. photo sharing sites
  2. bookmarking sites
  3. video sites
  4. micro blogging
  5. blogging

To do that, go to Advanced Segments, choose Include: Source, and for Condition – choose Matching RegExp. RegExp is short for Regular Expressions.

For example, you have the following as your traffic referrals:

  • youtube
  • t.co
  • facebook.com
  • plus.url.google.com
  • stumbleupon
  • digg
  • facebook
  • m.digg.com
  • pinterest.com
  • m.facebook.com
  • m.pinterest.com
  • hootsuite
  • twitter.com
  • tumblr
  • t.co
  • tweetdeck
  • linkedin
To include them into Google Analytics, you simply place a vertical bar “|” between each term, and surround all the terms with brackets “()”. No spaces in between the terms/URLs. The | symbol means “or”. Test the Segment and save if it is working.
(youtube|t.co|facebook.com|plus.url.google.com|stumbleupon|digg|facebook|m.digg.com|pinterest.com|
m.facebook.com|m.pinterest.com|hootsuite|twitter.com|tumblr|t.co|tweetdeck|linkedin)

Using Matching RegExp to track all social media traffic

What can the Numbers tell you?

Once this segment is created, you can compare the total social media traffic vs total visitors, and

  1. Identify your strength and weakness on each
  2. Analyze the quality of traffic between normal visitors (via organic searches) vs social media

Has this guide helped you in anyway? If yes, please tweet, +1, like, or tell me what you feel about it :)

TGIF!

FOLLOW

lincoln

Lincoln is a fan of Apple products, loves red wine and traveling. He blogs on internet marketing, social media, wordpress tips & guides, and using technology to maximize efficiency. Follow him on Twitter or Facebook for regular updates.
FOLLOW

One Response to How to Track Social Media Traffic with Google Analytics

  1. Mike P. says:

    Can’t seem to get Hootsuite referrals into GA correctly and followed your steps through advanced segmentation, Source, “hootsuite” (OR) “ow.ly”

    Has anything changed since this post?

Leave a Reply

Your email address will not be published. Required fields are marked *