Monday, June 20, 2011

How to Add Google Plus one (+1) Button to Website/Blogs


The Plus One (+1) button, Google’s new experiment, is shorthand for “this is pretty cool” or “you should check this out.”  By clicking Plus One (+1), you can to publicly give something your stamp of approval. Your vote can help friends, contacts, and others on the web find the best stuff when they search.
Plus One (+1) will be integrated directly into Google’s search engine, and will serve pretty much the same purpose as a Facebook ‘Like’ does. But it is not like face where you should go and and post your like or dislike. The Plus One (+1) button, you can keep on any website/blog. Here we explain implementation of Plus One (+1) button.
Implement Plus One (+1) button to your website
The implementation is very simple and you get started instantly by using this default code where you want the Google Plus One (+1) button to appear. You just  require to insert two line of codes to your HTML.
1. Insert the following javascript code to your <head> tag.
<script type= "text/javascript" src= "http://apis.google.com/js/plusone.js"></script>
2. Insert the following tag to the place where you want the button to appear.
<g:plusone> </g:plusone>
The above code available Here.
Google +1 your website
Parameters 
  • Lang : The value must be one of the valid language values for the Plus One (+1) button. The Plus One (+1) button is available in 40 languages. The default is English. If your site is not in English, do go to the Google Plus One (+1) site to grab the code in your specified language.
  • Parsetags : {explicit, onload} are two valid option for parsetags.The default options is onload.The value onload means the button(s) will be rendered as if gapi.plusone.go() were called immediately upon page load. The explicit value requires you to invoke the gapi.plusone.go(container) or gapi.plusone.render(container) method as outlined in JavaScript API.
  • Count :  {true, false} are two valid option for count parameter. The default options is true. It indicates whether or not to render an aggregate count.
  • Size :  {small, medium, standard, tall} are options for size parameter. The default options is standard , which is 24px tall. You can choose small (15px), medium (20px) or tall (60px). Click here for more detail for Button Size.
  • callback : This function called after the user has clicked the Plus One (+1) button. The callback function may accept a JSON object which will be of the form, {"href": "http://www.example.com/", "state": "on"}. Where href is the URL of the Plus One (+1) and state is on for a Plus One (+1) and off for the removal of a +1.
  • Url (href) : By default current page is value of Url parameter. We can use this parameter when we have a +1 button next to an item description for another page and want the button to +1 that other page. You can specify your own URL with the parameter href="your-url-here".
Notes
  1. Plus One (+1) is a public action, so you should add the button only to public, crawlable pages on your site. If you have a password protected page, or a members only forum, do not use this button. Once you add the button, Google may crawl or recrawl the page, and store the page title and other content, in response to a Plus One (+1) button impression or click. 
  2. You can include multiple Plus One (+1) button on a page, but it is best to add the URL parameter to the code so it can identify the correct link for each button.
For more info, check out the bellow links






2 comments:

  1. This is nice feature, where we can have review of viewers on our site.

    from
    http://lalitsinghmca.blogspot.com/

    ReplyDelete
  2. I agree!

    Google is literally offering total communication solutions along with robust privacy and segregation features which makes a very good balance between sharing and security!

    ReplyDelete