Tracking Google +1 button Interaction in Google Analytics

[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 </body>:

<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>

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:

Google +1 button code

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):

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

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:
google plus one google analytics

Yoast.com runs on the Genesis Framework

Genesis theme frameworkThe Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides you with the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Read our Genesis review or get Genesis now!

111 Responses

  1. PeterBy Peter on 1 June, 2011

    Where does the clicks go ?

    Twitter clicks to my account.
    Facebook to my account.
    +1 where ? who can see that ? my google buzz followers ?

  2. AndersBy Anders on 1 June, 2011

    Thanks,

    wondered how i’d be able to track this.

  3. AlexBy Alex on 1 June, 2011

    Are you able to see in Analytics any new data which is useful that you were not able to see before? I think people are hitting button-overload.

    • Joost de ValkBy Joost de Valk on 1 June, 2011

      It’ll be curious to see how many people will actually use it, of course, but I have to think that it’s relevant especially for my readership.

      • RickyBy Ricky on 2 June, 2011

        I just implemented it in the sidebar with a text widget, to see what happens. Still waiting to see if i want to include it inside every single post, since it has to be done manually.

      • Robert WentBy Robert Went on 4 June, 2011

        Oh Yeah!
        You are the first site to publish this and everyone is creaming over it. Twitter trend of the month so far!
        Love your wordpress tips (I’m a joomla man) and you also helped me out alot with a massive magento project.
        Keep up the good work. You are not unknown in many comunities!
        Rob

      • MartinBy Martin on 20 June, 2011

        Good reading, though i agree that its relevant to the readers at this site, i cant help wondering how many of the ordinary google users that will use it, i think one should be very passionated about the site if they are going to give +1′s.

  4. Ivan Brezak BrkanBy Ivan Brezak Brkan on 1 June, 2011

    Could you be any faster? :)) Great and useful reaction to the +1 release…

  5. Mike SmithBy Mike Smith on 1 June, 2011

    I just added the +1 button to my blog and am happy to know we’re able to track a bit of it’s use like this. My thought is that the +1 use might help dictate search rankings a bit more than Google is letting on, seeing as how they’re pushing for “quality content” results now, this should give them an inside view as to what people find valuable.

    • KritiBy Kriti on 2 June, 2011

      A bit unlikely as if it can affect the search results of the blog, then what about those blogs which havnt installed the feature yet?? but if you are talking about the +1 feature in the search results itself, it could be possible.

  6. André ScholtenBy André Scholten on 1 June, 2011

    Nice, implemented it right away.

    • André ScholtenBy André Scholten on 1 June, 2011

      Added some tweaks though: change the URL of the plusone.js to https because the http version redirects to it. And I loaded it asynchronous at the end of the body.

  7. IpstenuBy Ipstenu on 1 June, 2011

    I’m finding it’s pretty hit or miss if it works. It worked for me here, but on other sites, I get a nice red ! to tell me it failed. No explanations, and a java void(0) error. Still, it should be interesting to see how this pans out.

    • TaekeBy Taeke on 2 June, 2011

      Same here, just added it to some sites and when testing I get a red icon with warning sign. Just +1 this site and all works well, any clue Joost?

  8. Martijn van VreedenBy Martijn van Vreeden on 1 June, 2011

    Thanks for sharing! This must be a new speed record :) I implemented it immediately. I’m curious to see how many people will use the new button. We’re all so used to tweets and likes…

  9. BradBy Brad on 1 June, 2011

    Will this be added to your WordPress SEO plugin soon? =)

    • BradBy Brad on 1 June, 2011

      I dont know why I said your SEO plugin. A better place for it would be in the settings for your GA plugin. Or maybe a new plugin.

  10. EthanBy Ethan on 1 June, 2011

    Great post! I just added the +1 button and then realized I’d love to track it w/ Analytics. Did the search you mentioned above and got it added. Thanks.

    I’m curious to see how SERPs are affected. The FAQ states increased crawling and “a useful signal to Google when determining the relevance of your page to a user’s query”. One can hope :)

  11. ErwinBy Erwin on 1 June, 2011

    We also added the new vote button of google. Let’s see what kind of results this in give in the SERPs. Btw i don’t see the results like your screenshot in google. Used the google.com search.

  12. Michael Aulia @CravingTech.comBy Michael Aulia @CravingTech.com on 2 June, 2011

    Just added it too but mine is still too tiny. Might have to tweak around to make it bigger and more noticeable. I still like the Facebook Like on my posts. Still skeptical how long will this +1 last

  13. Joe from MWDBy Joe from MWD on 2 June, 2011

    How or what plugin are you using to add your share links ?Or you just added it to the theme it self

  14. nokzBy nokz on 2 June, 2011

    i added mine too in my blog. :)

  15. MicheleBy Michele on 2 June, 2011

    Great post!! Thank you so much :)

  16. NIkhil KulshresthaBy NIkhil Kulshrestha on 2 June, 2011

    I also added it today and waiting for the response it going to send. But where these responses could be seen, any idea? want to track visitors on my bog as GA. Is it have any such option. Regarding the size and place yes Google need to think again about it. It could miss by most of the visitor. Best place could be “top right of the heading” and just end of the post.

  17. PietBy Piet on 2 June, 2011

    Do I mis somethink? I don’t see the +1 button on this page. On Google I read hoe have to be logged in on a Google account. So I am logged in but stil no button. May be because I workshop on the iPad. So how Does the button works?

  18. NIkhil KulshresthaBy NIkhil Kulshrestha on 2 June, 2011

    Hey just notice end of the posts of your blogs. It will present with all social bookmarking sites(twitter, facebook,+1) symbol.

  19. Jim MaidisBy Jim Maidis on 2 June, 2011

    Thanks for your information about the code for analytics Joost, really curious to see if people use it in the future.

    I think it’a nice move for google to reach the interactivity of facebook like buttons.

  20. Petter El FakiriBy Petter El Fakiri on 2 June, 2011

    Could this simple script be used on other buttons aswell then? as for fb, linkedin and other share-buttons

  21. Markus JalmerotBy Markus Jalmerot on 2 June, 2011

    Thanks for some good advise as always ;)

  22. RickBy Rick on 2 June, 2011

    I’m about to added this to my blog as well.

  23. Glen CraigBy Glen Craig on 2 June, 2011

    Where in Analytics do you see the +1 stats? Thanks!

    • Jordan LouisBy Jordan Louis on 2 June, 2011

      You’ll see the +1 stats collect under Content -> Event Tracking in the Google Analytics interface.

  24. William RockBy William Rock on 2 June, 2011

    Thx, I cannot wait to see how this takes effect. As Marketers we have known about this update coming from way back but most of the world has no clue on what this is and what to do with it.. So I am interested in how Google will get people to use this addition.

  25. Warren BowmanBy Warren Bowman on 2 June, 2011

    Hello

    Am I the only one when I click to create the button I get a redirect loop and can’t access the page. I’ve been having this problem since yesterday and tried in 3 different browsers.

  26. MarkBy Mark on 2 June, 2011

    Hi,

    It’s going nicely as far as I can see. Button seems to be clicked on a lot.

    I’m hoping you get some useful information on GA from this. Thanks for testing this for us. And of course, would love to see this implemented in the GA plugin, lol. By the way, isn’t that integrated right into your WordPress SEO plugin?

    Anyway, thanks again and will be looking for more info here…

  27. Les FaberBy Les Faber on 2 June, 2011

    Interesting that one needs to have a Google Profile to use the button. And even more interesting is that we use Google Apps (free) and one cannot create a Google Profile with it. So that means I have to log out of my business G-mail and log into my personal G-Mail account (where I do have a Google Profile) to “Plus 1″ you Yoast. You’re a good guy…. and I love your Plugins & Blog posts…. but….

    Seems like Google didn’t think this one through completely….

    So the +1 feature is really about telling Bloggers etc about how many people who use a certain subset of Google products like what has been published. And to heck with anyone else?

    Or maybe I am thinking too much?

    Sidenote: The +1 feature does not seem to be “live” on Google.ca

    As usual, you do a thorough job Yoast – great post as usual (despite my negative comments towards Google.

  28. Dev BasuBy Dev Basu on 2 June, 2011

    Thanks for the tutorial Joost. We’re going to implement this on a couple of client sites in a non-competitive vertical where we’re pretty sure no one else is using +1 and run some tests to see its effect on the SERPs.

  29. ChrisBy Chris on 2 June, 2011

    Thanks to you helpful tips I have added +1 with no problem! Will it be showing up under events in Google Analytics?

  30. ErikBy Erik on 2 June, 2011

    Great Post! Tx – Any input as to when other language versions might be available (I am looking for Dutch) – Thanks – Erik

  31. Pierre DeBoisBy Pierre DeBois on 2 June, 2011

    Nice explanation. I think between the +1 / analytics link and tracking with URL for QR codes/within URL shorteners, GA users will be better able to see how far their online exposure goes. If anything it will put pressure on SEO and social media managers to track more thoroughly. Thanks for sharing this.

  32. ElioBy Elio on 2 June, 2011

    Hi Joost, I’ve implemented your code in the +1 plugin for WordPress released yesterday, with all due credits of course :)
    http://ilovecolors.com.ar/wordpress-plugin-add-google-1/

  33. JonathanBy Jonathan on 2 June, 2011

    Thanks for this update, Joost. May I ask how you create the social media buttons bar at the end of your posts?

  34. Keesjan DeelstraBy Keesjan Deelstra on 3 June, 2011

    @Joost great script hack. I think Google analytics and webmastertools will at this tracker soon by default?

    Anyway maybe also interesting for your readers: http://www.seoeffect.com/blog/Effects-of-the-Google-%2B1-button-researched-download-the-whitepaper/ A free research paper about the +1 button and its effect on visbility and CTR.

  35. JamesBy James on 3 June, 2011

    @Joost. Can the same thing be done for the Facebook like button, by adding callback=”like_vote” etc to the fb:like code?

  36. @Mario_LuanBy @Mario_Luan on 3 June, 2011

    Oh! That’s pretty nice. Thanks!

  37. Sreejesh @techgyoBy Sreejesh @techgyo on 3 June, 2011

    Cool! I just added it in my blog, they’ve made it look simple. It already started bringing traffic to this this page, making it to 1st in SERP. Is that cos of the number of +1s this page have received?

  38. Google +1 WordPresBy Google +1 WordPres on 3 June, 2011

    Here is a WP plugin to ad the +1 button: add +1 to wordpress

    • Fr4nkBy Fr4nk on 3 June, 2011

      Thank you for the plugin.
      Must say soon we’ll have full pages of like,+1,retweet etc. buttons… :)

  39. maxmasBy maxmas on 3 June, 2011

    Nice button.. I’ll try on my blog.

  40. Dave DurbinBy Dave Durbin on 3 June, 2011

    Always timely. We’ve seen dramatic SERP visibility increase but only for those Google deems in our “Social Circle” and only when the searcher is signed in. This Is Google’s play to make everyone log in to gather demographic info and search behavior I’m sure.

  41. E-SiberBy E-Siber on 3 June, 2011

    Hello from Turkey,

    This is awesome. And i have mentioned about your post in my website: http://www.e-siber.com/google/google-1-butonu-tiklamalarini-google-analytics-ile-takip-edin/ with your refer url.

    Thanks

  42. SimonBy Simon on 3 June, 2011

    Did implement the plugin, but does anyone know how much relevance it has to the serps?

  43. Paul OlyslagerBy Paul Olyslager on 3 June, 2011

    It seems that the +1 button is not visible in IE7.

  44. ChrisBy Chris on 3 June, 2011

    Is it possible to use jQuery or just plain ol javascript to append the callback=”function” into the gplusone html?

  45. Joe from MWDBy Joe from MWD on 3 June, 2011

    Thanks to yoast I added the button but also added some additional info as to where to place it in wordpress and blogger, thought you might be interested:
    http://www.mwd.com/2011/06/google-1-button-wordpress-blogger-embed/

  46. AllisonBy Allison on 3 June, 2011

    I had been using your Analytics plugin for a while, but about three weeks ago my URLs began showing up as doubled in Analytics [http://allisondduncan.com/http://allisondduncan.com OR http://whatever/http://allisondduncan.com.

    I just recently installed the +1 button so am excited about using your plugin to track this, but with my URLs getting all screwed up I’ve been disabling all plugins to try and find out what’s going on.

    Any chance you’ve encountered this before and can make a suggestion? So far the WP.org site hasn’t responded.

    Thanks,

    Allison
    The Nerd Connection

  47. BrandonBy Brandon on 3 June, 2011

    Doesn’t Google say we can’t do this?

    http://www.google.com/webmasters/+1/button/policy.html

    • JamesBy James on 4 June, 2011

      Not that I can see. Which line are you referring to?

  48. glenisBy glenis on 4 June, 2011

    Needless to say someone will be out with a plugin that will add the plusone to your site and ensure it gets clicked from 15,000 randomly distributed ips. In the end it will be the ‘real’ people who loose.

    I won’t bother I’m not fond of Google tracking what I do, …. or my government, tax department, credit card company, bank, …. I’m paranoid !! :)

  49. enursaBy enursa on 4 June, 2011

    Great. I have installed Google +1, but not for the analytic. I think i must add it now.

  50. SteveBy Steve on 5 June, 2011

    I have followed the instructions but cannot see the button on my site. Does this work in the UK ? I cant understand why I can’t see the button.

  51. Ed HarrisBy Ed Harris on 5 June, 2011

    Wow Joost, this is incredible, I know I am late but you released this only few hours after official Google post.

    I’ll implement this on my blog asap and will see results soon.

  52. brijBy brij on 8 June, 2011

    Hi, Thanks for this information.
    I think this +1 mark will help the users of google search engine to now get the right content they are looking for. Otherwise it is very difficult to find the right content on google.
    Regards

  53. hammockBy hammock on 8 June, 2011

    Google turns into a social network ((

  54. JoshBy Josh on 9 June, 2011

    IMHO, the +1 button will fade into obscurity long before it ever gets a chance to be useful. I would like to think otherwise but Google’s trying to hard to elbow into Facebook territory and it’s just not the same.

  55. Top 10 English songsBy Top 10 English songs on 10 June, 2011

    Really Informative, Thumbs Up!!

  56. nokzBy nokz on 22 June, 2011

    im starting a new blog. is it ok if i added +1 in my new blog? thank you
    http://blogs-life.blogspot.com

Trackbacks

  1. [...] you’re waiting, you may want to check out Joost de Valk’s post that shows how to get +1 clicks recognized as “events” in Google [...]

  2. [...] som är känd bland WordPress folk och även andra har skrivit ett bra inlägg om hur du integrerar Analytics tillsammans med Google +1 knapp. Det här inlägget postades i Google. Bokmärk permalänken. ← Skapa gratis satellit [...]

  3. [...] there are methods of tracking +1s to your pages. By writing your own Javascript function, you can track +1 clicks as a Google Analytics event using _gaq.push() and use GA’s standard reporting functionality.  All-in-all, the +1 button [...]

  4. [...] har själv inte gjort det; men det går även att integrera knappen med Analytics så att du kan se vilka och hur många som har rekommenderat din site. Jag [...]

  5. [...]   } </script>(Analytics code written by Yoast).4. Next step, pick your +1 button sizeSmall (15px) – <g:plusone [...]

  6. [...] Google's API documentation describes all the geeky options that you can supply. One of them, JavaScript callbacks, lets you use Google Analytics to track +1 button interactions. [...]

  7. [...] WP Plugin — Otto put together a simple plugin that adds the +1 button to the end of your posts.Tracking Google +1 Button Interaction in Google Analytics — Joost de Valk has put together a great short tutorial for tracking +1′s in Google [...]

  8. [...] not date yet for when the analytics will be available. Luckily we have Joost de Valk who has made a post to show how you can recognize the +1 clicks in your [...]

  9. [...] more information read Tracking Google +1 button Interaction in Google Analytics by Yoast. Did you enjoy this post? This entry was posted in Uncategorized. Bookmark the [...]

  10. [...] décrit dans son article : Tracking Google +1 button une solution pour suivre le nombre de votes enregistrés via les événements de Google Analytics. [...]

  11. [...] Tracking search impact will likely be the most important factor to Webmasters and it will be interesting to be able to track the correlation between user interaction and search traffic. For Webmasters who are keen to see which types of users click the +1 button, Yoast have provided a handy how-to guide on setting up Event tracking for your +1 button. [...]

  12. [...] Veja este site caso queira integrar o +1 com o Google Analytics. [...]

  13. [...] Tracking Google +1 button Interaction in Google Analytics Tags: google [...]

  14. [...] (eg: +1 / Follow / Tweet) and what the action was (eg: +1′ed, un-+1′ed, tweeted, etc.)Yoast beat me to sharing the code for tracking a +1 click. Via his implementation, recording this in [...]

  15. [...] see a little preview on the right. You can dive into the Advanced Options if you wish as Yoast does when creating vote tracking for Google Analytics. Google's custom button creation [...]

  16. [...] Joost De Valk ha la risposta, che non era troppo difficile, e siccome l’ha data per prima ve la riporto qui dandone il giusto credito (al contrario di alcuni articoli che mi sono capitati sott’occhio: dannata tendenza italiana a “dimenticare” di attribuire i crediti…): il pulsante è ingegnerizzato bene e consente di specificare una funzione custom da associare al click; nel nostro caso ovviamente si tratterà di una chiamata a _trackEvent. Nel dettaglio: [...]

  17. [...] Yoast beat me to sharing the code for tracking a +1 click. Via his implementation, recording this in Google Analytics is as simple as adding this button code: [...]

  18. [...] http://yoast.com/plus-one-google-analytics/ In category: SEO jeb meklētājprogrammu optimizācija, Statistika un tās analīzeTags:Google Analytics , SEO [...]

  19. [...] site, I also wanted to embed the LinkedIn Share button. And while I was at it, I discovered from Yoast the Google +1 button had launched recently, which makes a neat social share family of four. Enough – there are only so many times anyone [...]

  20. [...] +1 Tracking in Zukunft bieten dürfte, findet ihr im Blogpost von Search Engine Land. Yoast hat hier einen Beitrag zum Thema Tracking mit Google Event Tracking geschrieben, danke für die Hinweise [...]

  21. [...] Now that you have +1 button, you would like to track your +1s in Google Analytics, right? Luckily for you, this is actually already possible and Joost de Valk explains how to set up tracking of +1 in Google Analytics. [...]

  22. [...] your own website.  Just follow the link to googles pages, it has easy description for how to do it.Yoast has a pretty exhaustive article on how to add the +1 button to Google analytics so you can even [...]

  23. [...] Google rolls out an official solution is to check out Yoast who has created a simple guide on Tracking Google +1 button as an event in Google Analytics. I’ve just added it to this site and should hopefully [...]

  24. [...] că amatorii de statistici pot afla cum să urmărească evoluția acestor minunate butoane. Vezi aici [...]

  25. [...] Tracking Google +1 button Interaction in Google Analytics – Yoast Så lägger du till +1-knappen på din sajt, och gör den mätbar i GA. [...]

  26. [...] is also useful – allowing you to track how many people click on the actual Google +1 button on your page – in Google [...]

  27. [...] 0 Our good friends at Yoast published a great tutorial on how to create and add the Google +1 button to your website (they are truely a swifty [...]

  28. [...] resultaten, maar ook dat komt terug in de resultaten zelf. Zoals Joost de Valk laat zien op zijn blog. ConclusieHet delen van vacatures op social media gaat dus een steeds groter effect hebben, met name [...]

  29. [...] décrit dans son article : Tracking Google +1 button une solution pour suivre le nombre de votes enregistrés via les événements de Google Analytics. [...]

  30. [...] hat natürlich wie immer sehr schnell reagiert und zeigt uns in seinem Artikel wie wir die Klicks auf den Button entsprechend in Google Analytics tracken [...]

  31. [...] în Google Analytics interacțiunile vizitatorilor cu butonul +1 recomand modificările explicate într-un articol util scris de Yoast, creatorul celui mai bun plugin WordPress pentru optimizarea blogurilor, WordPress [...]

  32. [...] For those savvy enough to modify a custom function, Yoast has a tutorial on how to hand Google Analytics the useful bit of info: http://yoast.com/plus-one-google-analytics/ [...]

  33. [...] UPDATE 1: Joost de Valk ha publicado una entrada en su blog para hacer el seguimiento de los clicks sobre los botones +1 con Google Analytics: “Tracking Google +1 button Interaction in Google Analytics“. [...]

  34. [...] original del artículo: Yoast Traducción realizada por [...]

  35. [...] Yoast has quickly come up with a way to track Google +1 votes in Google Analytics. Others have expanded on this script with the actual URLs that got clicked and to consider negative clicks (when someone clicks +1 again to revoke the vote). [...]