Social Plugin Tracking "Google's +1 Button, Twitter's Tweet Button" Enabled In Google Analytics

On June 29th, Google introduced Social Plugin Tracking in Google Analytics, today the search company has added the ability to "track how users engage with any social plugin such as Google's +1 button and Twitter's Tweet button," announced John Jersin, Google Analytics Team.If you've added +1 buttons to your site and your Analytics implementation is […]

On June 29th, Google introduced Social Plugin Tracking in Google Analytics, today the search company has added the ability to "track how users engage with any social plugin such as Google's +1 button and Twitter's Tweet button," announced John Jersin, Google Analytics Team.

If you've added +1 buttons to your site and your Analytics implementation is up to date, tracking is automatic and you should already see data in your account. Please see this post for more information about the +1 button tracking. You can also ensure the +1 integration is working by taking some simple steps.

And, to track other social plugins, like Twitter, the latest version of the tracking code has a new _trackSocial method to track various aspects of a social plugin interaction. Using the async tracking snippet, the easiest way to call this method is to use:

_gaq.push(['_trackSocial', socialNetwork, socialAction]);

And if you're using the traditional snippet you'll need to use this syntax:

var pageTracker = _gat._createTracker('UA-xxxxx-y');
pageTracker._trackSocial(socialNetwork, socialAction);

You then want to call this method somewhere where you know the social plugin has been clicked on. Google included some example on how this work with Twitter's plugin API as well as Facebook's plugin API and you can see a working demo here.

"If you're building an integration for use by several Analytics users we encourage you to use the code for the async snippet for now. Also, to enable the development of integrations such as these we're working toward better compatibility between the sync and async tags with the goal of enabling calls such as _trackSocial to work for both version with the same syntax," added Jersin.

[Source:Google Analytics blog]