Google plus one-button statistics

I would like to know how to get the value for the +1 value ((if there are 10 clicks of the +1 button, save 10 as a variable). This would be useful for analysis purposes. I know that the count parameter only returns Boolean or plusone.state on / off, but is there something like plusone.value? (I tried, it is undefined)

thanks

+4
source share
3 answers

Download the following URL: https://plusone.google.com/u/0/_/+1/fastbutton?count=true&url=URLENCODED_URI via your favorite automatic method (curl, wget, file_get_contents, etc.)

URLENCODED_URI is a site where you need to know the number +1 for, for example. http://www.google.com

For example, select the URI https://plusone.google.com/u/0/_/%2B1/fastbutton?count=true&url=http://www.google.com/ and find the first detection window.__SSR = {'c': 32414.0 ,'si' . It is preferable to use regexp for this, but I will leave the implementation for you and your chosen programming language.

The floating-point number following "c" is the +1 that the site has. For google.com it is 32.414. Don’t worry that it is a float, it is always an integer in float format, so you can safely convert it to an integer.

+7
source

There is an undocumented API for what is described here - http://www.tomanthony.co.uk/blog/google_plus_one_button_seo_count_api/

+2
source

+1 button tracking directions can be found at http://yoast.com/plus-one-google-analytics/

On the button creation screen, create a js callback, then track clicks using Google analytics with the following code:

 <script type="text/javascript"> function plusone_vote( obj ) { _gaq.push(['_trackEvent','plusone',obj.state]); } </script> 

Alternatively use javascript callback to track it as you like.

+2
source

All Articles