Tracking Google +1 button Interaction in Google Analytics
1 June, 2011 - 112 Comments
[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
: <script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script> |
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> |
1 | <script type="text/javascript"> |
2 | function plusone_vote( obj ) { |
3 | _gaq.push(['_trackEvent','plusone',obj.state]); |
4 | } |
5 | </script> |
Update: might be fun to show you that this post was ranking quite fast with a nice +1 underlining:

No comments
Post a Comment