How to Add Google Analytics Social Tracking to Your Website

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:

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

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


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

and then add the following code after:

<script type="text/javascript">
  function plusone_vote( obj ) {

(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=""></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.

6 thoughts on “How to Add Google Analytics Social Tracking to Your Website”

  1. Perevozki Gruzov v Latvii

    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 :)

    1. Hi Perevozki, actually I don’t know so much about these Facebook feature, so I can’t help you to solve this problem :(

  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.

    1. Hi Gray, you just need to copy and paste the code above into your website, usually add them into your footer.php file of your WP theme.

  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.

Leave a Comment

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

Scroll to Top