How to add Google +1 button to website

  • Sharebar

Google recently released the +1 button for websites. This will help anyone to recommend contents to Google search. This means your friends recommendations will appear on search result when you search on Google.

google plus 1

Integration of +1 button is very simple. First put this JavaScript code to head part of your page or just before the ending body </body> tag.

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

 

Then put this code where you want the +1 button will appear on your page.

<g:plusone size="standard" count="true"></g:plusone>

Or Just use this

<div class="g-plusone" data-size="standard" data-count="true"></div>

+1 tag parameters

Key Value Default Description
count {true, false} true Indicates whether or not to render an aggregate count. See Button sizes for more information.
href URL to +1 URL of current page We recommend using this tag when you have a +1 button next to an item description for another page and want the button to +1 that other page.
size {small, medium, standard, tall} standard The button size to load. See Button sizes for more information.
for more information please visit +1 API documentation.
Or just configure your button here:

 

Leave a Reply