[plus1]Today Google introduced the new +1 button, which I of course immediately implemented (see below and, on this specific post, on the right). It comes with an option for a callback function that you can use to track interaction with that button in Google Analytics. The implementation is pretty easy so let’s go ahead and explain it. First of all, you place the required script tag somewhere, preferably in the footer before the
Then you create your +1 button using Google’s creation tool. On this creation tool you click on “Advanced options” and then add
plusone_vote as callback. You’ll get something like this:
And the code is like this:
<g:plusone size="tall" callback="plusone_vote"></g:plusone>
Last but not least, below the script tag for Google +1 we added above, you add this tiny bit of script. This function records the vote as an event in Google Analytics, and stores the state (“on” for a +1 vote, “off” for the removal off a vote):
Of course I haven’t been able to do anything with the results from this yet, but it would be cool to see which kind of traffic uses +1 buttons, and whether a lot of +1′s correlate with a lot of search traffic afterwards.
Update: might be fun to show you that this post was ranking quite fast with a nice +1 underlining: