How to Track Social Media Traffic With Google Analytics

social media how toYou have a website and you are building traffic to it, but what do you know about your visitors?

Do you know where they come from, how engaged they are with your website or if they have converted as a reader, subscriber or customer?

You can see all of these insights for free using Google Analytics.

Why Google Analytics?

Google Analytics allows you to see where your visitors come from and if they engage with your content or leave immediately. Additionally, you can set up goals that match your business goals and measure if visitors are meeting those goals.

With Google Analytics, you can get valuable insights about your visitors and in this article I am going to show you how to track social media traffic.

This will help you identify the social media sites that send the most visitors back to your website to see which one needs more attention.

You will also discover how you can learn more about the visitors who come to your site from Twitter, Facebook, Google+ or other social media sites.

Additionally, you will learn how to use a feature called Advanced Segments to segment your social media traffic and see how those visitors behave on your site.

Getting Started With Google Analytics

Before we dive into this, I want to make sure that you use the latest version of Google Analytics.

To do this, just login into your Google Analytics  account and click the New Version link from the top left section of your screen.

new version google analytics

Click the New Version link to switch to the latest version of Google Analytics.

Once you do that, you are all set up and ready to follow the rest of this article.

Identify Your Main Traffic Sources

First you will need to discover what social media sites send the most traffic to your website.

To do that, go to the Traffic Sources section, select Sources and All Traffic.

Here you will be able to see a list with all of the websites that send traffic back to your site. Right now, you will need to identify which are social media websites and keep the first three in mind.

google analytics traffic

Identify the main 3 social media sites that send you traffic.

From this example you can see that Twitter (t.co is Twitter’s shortened URL), Hacker News and Facebook are the main social media sites that drive traffic.

For you, the most important may be Google+ or StumbleUpon or any other site where you have an active profile.

Create Advanced Segments

Once you have identified your main social media traffic sources, you can create Advanced Segments for those websites and segment the traffic to individually analyze your visitors.

You can also set up multiple Advanced Segments and compare them to see the difference among them.

To make this easier to understand, I will show you how you can set up Advanced Segments for Twitter, Facebook and Google+ to compare their traffic and for multiple other social media sites to better analyze traffic.

Twitter Traffic Segment

You can create an Advanced Segment for Twitter to see how it compares with Facebook and Google+.

To do this, simply click on Advanced Segments from any Google Analytics report and click + New Custom Segment.

create advanced segments

Create Advanced Segments to individually analyze your visitors by traffic source.

Then add a name for your segment and start to include as sources the following containing terms that might send traffic to your website:

  • twitter.com
  • t.co
  • hootsuite
  • tweetdeck
  • bit.ly

As you can see, there are multiple filters that should be added using an OR statement because different Twitter clients might send traffic that will not get tagged as being from twitter.com or t.co.

While adding these filters, you will see that if you have traffic that matches, Google Analytics will insert the filters using an autocomplete function.

This way you can be sure that all the filters you apply actually match visits.

twitter segment

Create a Twitter traffic segment to see how the inbound traffic from Twitter compares with other social media sites.

Once you add all your filters, press the Test Segment button to see if everything is set up correctly. If so, save your segment.

Facebook Traffic Segment

Next on the list is the Facebook segment, which can be created exactly as you did for Twitter—just change the filters to:

  • facebook.com
  • m.facebook.com
facebook segment

Create a Facebook traffic segment and include as a source both facebook.com and the mobile version m.facebook.com.

From my analysis, Facebook sends traffic as facebook.com and m.facebook.com if the traffic comes from mobile devices. To make sure that your filter will match, you can simply use “facebook.”

Google+ Traffic

The Google+ segment is similar to Twitter and Facebook, but simpler. All you have to do is just filter:

  • plus.url.google.com
google plus segment

Create a Google+ traffic segment to analyze only the traffic that comes from Google+.

Google+ sends all traffic from plus.url.google.com. You may also see traffic from google.com, but do not include it, because that is something different.

Social Media Traffic

Now that you know how to create individual segments, you can create a more comprehensive segment that analyzes traffic from more than one social media outlet.

You can use this type of segment to include the traffic from StumbleUpon, Digg, Delicious, LinkedIn and any other social media site.

As an example, below are some of the sites you can include in this segment using the OR statement:

  • twitter.com
  • t.co
  • hootsuite
  • tweetdeck
  • bit.ly
  • facebook.com
  • m.facebook.com
  • plus.url.google.com
  • linkedin
  • youtube
  • reddit
  • digg
  • delicious
  • stumbleupon
  • ycombinator
  • flickr
  • myspace
  • popurls

A simpler version of this segment would be to select as a condition Matching RegExp, which will use a regular expression to detect the traffic that matches your condition.

The advantage of this will be the fact that you will not need to type in 10-20 conditions for this segment, but just one.

To create this segment, select Matching RegExp as condition and then type in brackets “()” the social media sites that send traffic to you, separated by a vertical bar “|”, just like the code below:

(twitter|t.co|hootsuite|tweetdeck|bit.ly|facebook|plus.url.google|linkedin|youtube| reddit|digg|delicious|stumbleupon|ycombinator|flickr|myspace|popurls)

You will need to make sure that there are no spaces in this code.

social media segment

Use a Regular Expression to create only one condition which includes all the social media sites from where you might get traffic.

You can also include other sites that send traffic to you.

Understanding Social Media Traffic

Now you have four powerful segments that will help you get more insights about your visitors.

You can use the first three to see how they compare to each other and if there are any big differences among them.

You can use the fourth to see how visitors who come from social media sites behave on your own site and how they convert.

We will cover more about this in future articles, but to start you should have a look at the Audience reports to determine their behavior, how engaged they are with your site (how much time they spend reading your content), how frequently they come to your site or the ratio of new visitors to returning visitors.

The Content section is the one that you should check next to see the pages your social media peers visit on your site, your site speed for their connection or what they search for on your website.

For example, you can see from the screenshot below that the visitors coming from Twitter (even if they have a higher number of visits) are less engaged with the content of the website, because the majority spend less than 10 seconds on the website.

social engagement

Use Advanced Segments to identify which social media sites send you valuable visitors.

You can use the above segment to compare the traffic from multiple social media outlets and see where you should invest more time, which one sends you more engaged visitors, visitors that convert and much more.

With the more comprehensive segment or if you apply only one segment, you can actually filter the traffic and see all of the Google Analytics reports for that specific segment.

This helps you identify visitors’ behavior and engagement for that specific segment of traffic.

Over to You

These are just a couple of examples, but I would love to see what other experiments you’ve done.

What do you think? Which of these examples have you successfully implemented? Plus, what other tutorials about Google Analytics would you like to see on Social Media Examiner? Leave your questions and comments in the box below.

Tags: , , , , , , , , , , ,

About the Author, Eugen Oprea

Eugen Oprea helps you convert more traffic into loyal customers using proven techniques that grow your business. Get his free Google Analytics course and check his new WordPress plugin Elevatr. Other posts by »




More Info







Check out the Social Media Marketing Podcast!
Check out our Blogging workshop!
Join our Social Media Marketing Networking Club
Download the free Social Media Marketing Industry Report