How to Add Google Analytics Social Tracking to Your Website

Thesis themes

Since June 2011, Google has launched a new Social Analytics feature that can help you to analyse how users engage with any social plugin such as Google’s +1, Twitter’s Tweet and Facebook Likes right in your Google Analytics account. This tutorial will show you how to implement this into your website.

Google +1 Button Tracking

According to Google blog, if you’ve added +1 buttons and the latest version of Google Analytics to your site, all +1 social interactions will be automatically reported in the Analyics account and Google Webmaster area, so, you don’t need to do anything else:
social tracking How to Add Google Analytics Social Tracking to Your Website
google plus2 How to Add Google Analytics Social Tracking to Your Website

By somehow, if it doesn’t work, you need to modify the Google +1 button from:

<g:plusone size="tall"></g:plusone>

to:

<g:plusone size="tall" callback="plusone_vote"></g:plusone>

and then add the following code after:

<script type="text/javascript">
  function plusone_vote( obj ) {
    _gaq.push(['_trackEvent','plusone',obj.state]);
  }
</script>

(Thank to Yoast for this useful tip)

Facebook and Twitter Tracking

In this case you need to integrate Google Analytics with each network by following this tutorial: Social Interaction Analytics. This way, you can track not only the interactions of Facebook Likes and Twitter Tweet, but also, the content interactions as well. However, it’s complicated to implement, that’s why there’s another simple way to archive them: adding the following code to the end of your site:

  <script src="http://analytics-api-samples.googlecode.com/svn/trunk/src/tracking/javascript/v5/social/ga_social_tracking.js"></script>
  <script>
    _ga.trackSocial();
  </script>

(You should save the javascript file above to your localhost for further using)

Ok, now you’ve added the new social media tracking report to your Analytics account, maybe it will help you find-out what is the most interesting content on your site, I’m not sure :) and if there’s any problem here, please lets me know by leaving your comment below.

About Jenni R

I'm a Chief Branding Officer of IntenseBlog Website, a knowledge-hub to help you build a profitable blog. For the last 3 years I have dedicated myself to blogging and online marketing solutions.

Connect with me on: Google+, Facebook and Twitter.

Comments

  1. Hi, I have some questions? It will be very much helpful, if you can explain.
    1) How can I track my facebook fan page “wall” activity with google analytics? Is it possible?
    2) How can I create new tabs on fan page like contact, service….? And How can I apply FBML on them (contact, service) for analysis?

    That’s it. Hope you will explain. Thanks :)

  2. Hello Jenni, I am not really into programming and I am not quite sure how to do the things you stated above. Do you have some detailed post so that I can better understand the procedure? I really find these feature very useful and I am planning to implement it on my site. Thanks.

  3. I really really thank you, I have tried several method to implement this, but always fails, but I forget _ga.trackSocial, so its work now.

Speak Your Mind

*