How to: track Google +1 votes in Google Analytics

How to: track Google +1 votes in Google Analytics

In my previous note, I explained how to add Google’s +1 (plus one) button to your websites or blogs. But how can we track Google +1 votes? Don’t worry. You can track +1 votes with the help of Google Analytics. With these simple steps, you can track your Google +1 (plus one) votes easily.

Step 1: Create your +1 button

Firstly you have to create Google’s +1 button. If you don’t know how to create a +1 button, please read my previous note, how to: add google's +1 button to your sites.

Step 2: Add Google +1 button’s tracking code

Now you have to add this JavaScript code block, to track your votes in Google Analytics. This function records the vote as an event in Google Analytics, and stores the state (“on” for a +1 vote, “off” for the removal of a vote):

Google Analytics code

<script type="text/javascript">
 function track_plusone(gpovote) { _gaq.push(['_trackEvent', 'Social Shares', 'Google +1 Vote', gpovote.href]); }

In Google Analytics, where I can find the votes?

The function sets the category of that event to "Social Shares", the action to "Google +1 Vote" and the label to the URL of the page the button was clicked on. You can change the category and action to suit your own conventions, of course. The page is technically available in the new GA interface, where you can view events by page as well. A result is an event that shows up in Google Analytics whenever an item is voted for. Events take anywhere from one to 24 hours to show up and appear within the Content > Events area of the Google Analytics user interface.

Good luck and Happy Blogging 🙂