The simplest way to add the +1 button is to simply copy and paste a snippet of code into thesection of your page. However, you also have several options to customize the button. For example, you can enable annotations, or use the callback parameter to provide enhanced functionality for your visitors.
Personalized annotations display the faces of friends and social connections who have already +1'd a piece of content.
Google tries to display +1's to people (specifically those in the user’s social connections) who would find them most useful. We hope that by making these recommendations more discoverable, users will be even more engaged with your site.
Annotations can appear in a couple of ways.
- When a user hovers over the +1 button on a page, we'll display an annotation showing the faces of friends who have +1’d that page. You don’t need to do anything to make this happen.
- You can also add inline annotations that appear next to the +1 button on your page. To enable these, you'll need to update the +1 button code.
Enabling features for people who +1 your content
The +1 button enables you to add features and enrich the user experience for people who +1 your content. Say you have a clothing site that features a number of fabulous but expensive dresses. When a customer +1’s a dress, you could display a dialog to ask if that user would like to be notified when the dress goes on sale.
To enable features like this, you need to edit the button code to add the
<div class="g-plusone" callback="notifyMeWhenThisGoesOnSale"></div>