Digging Into Social Analytics with Google Analytics

4 minute read
Bob Clary avatar

With the growing popularity of social media marketing, many companies have a desire to learn more about what social media properties are performing the best, and which social media interactions are getting the most results for the company.

In general, the new social media reports alone are a very powerful tool in helping determine some of the answers to the above questions. By default, Google Analytics will automatically pull in social media traffic details from the biggest social media sources out there.

Social Content

For example, you can determine how many people clicked on one of your Facebook wall posts, how many Twitter users clicked on a company tweet and then made a purchase, and so on. These reports can all be found under Traffic Sources, then Social and then you'll be able to choose your desired sub-report to dig into!

Now, many companies are using social media tools as a key marketing tool in content dissemination. So, they've embedded social media interaction tools right on their websites, including, but not limited to: Facebook like buttons, Twitter share buttons and Pinterest pin buttons.

Take a look at the screenshot below from the popular social media news site, Mashable.com.


Each of those social media interactive buttons have a code behind them to connect the action to the desired result of someone sharing that specific article on the user's social media page, or feed. By default, Google Analytics will not track these interactions. But, the good news is, with a little coding work, all of this data can flow seamlessly into your Google Analytics reporting structure.

Setting up Social Interactions

Google has developed a very comprehensive guide to setting up interactions. The information in this mini-lesson will be a highlight of the steps needed to complete on your site.

One last item to cover before we begin. First, all of your Google+ interactions are automatically built into the Google Analytics reports. No need to do anything beyond having Google Analytics installed and a Google+ button on your website pages.

Beyond Google+, Google Analytics currently offers tracking support for Facebook and Twitter. And here are the specific actions:

Learning Opportunities

  • Facebook like
  • Facebook unlike
  • Facebook share
  • Twitter tweet

The general idea is that you need to add in _trackSocial code within each of the Facebook and Twitter actions. Below is an example of the full code needed:

_gaq.push(['_trackSocial', network, socialAction,
opt_target, opt_pagePath]);

The first two parameters, network and socialAction are required fields, while opt_target and opt_pagePath are optional. So, we need to add these parameters right within our social interaction code on our site. And each action, such as a Facebook like button, or a Twitter tweet button, needs to have this customized code built in.

Let's take a look at a Facebook like button example from Google's tutorial (link above):

FB.Event.subscribe('edge.create', function(targetUrl) {
_gaq.push(['_trackSocial', 'facebook', 'like',
targetUrl]); });

You can see that it is customized to the Facebook requirements. In the second line, you'll notice they have included the parameters of facebook and like, so Google Analytics knows where to place this action in your reports.

Overall, this process is fairly tedious, but the end result of having these actions listed within the Google Analytics reports can be very helpful. What ways might you use these tools on our own site to help your marketing efforts?

And that's a wrap for this article!In the next article, I’ll focus on how to read some of these social interaction reports from Google Analytics. If you have any questions, let me know in the comments below. Happy Analytics!

Editor's Note: Interested in more of Bob's tips on making Google Analytics work for you? Read Four Actionable Steps for Google Analytics Users

About the author

Bob Clary

Bob Clary has over 13 years of marketing, public relations, and communucations experience. He is currently the Marketing Manager at Anelli Xavier, a criminal defense law firm based in New York.