Easily add a Google +1 with Analytics
Posted on : 07-06-2011 | By : Craig Kelley | In : Tutorials - How To, Getting Started...
Tags: +1, analytic, google, plus one
0
Adding a Google +1 button is easy. Tracking it, not so much.
Use the following code to add a Google Plus One button with Google Analytic tracking to your website or blog post.
<!-- GOOGLE PLUS ONE START -->
<script src="http://apis.google.com/js/plusone.js" type="text/javascript"></script>
<g:plusone callback="GoogleLIKE_Analytics"> </g:plusone>
<script type="text/javascript">// <![CDATA[
function GoogleLIKE_Analytics(obj)
{
_gaq.push(['_trackEvent', 'GooglePlusOne', obj.state, window.location.href]);
}
// ]]></script>
<!-- GOOGLE PLUS ONE END-->
Source: http://goo.gl/zW182
