How To Get +1 But­ton For Your Website

Google’s CEO Larry Page just an­nounced 10 Mil­lion Google+ users this evening. I’d guess most of those are tech savvy early adopters, click- and share-happy so­cial net­work­ers. With Google+ buzzing (pun in­tended) even be­fore its of­fi­cial launch, you prob­a­bly thought about adding a Google +1 but­ton to your web­site. It could send a quickly grow­ing traf­fic stream to your site.

It’s the same like adding a Face­book share but­ton or a twit­ter but­ton to your site. A Google +1 but­ton al­lows peo­ple to share your web­site with the so­cial cir­cles on Google+.

It comes in 4 dif­fer­ent sizes: small, medium, stan­dard, and tall.

Screenshot of Google +1 button in 3 sizes.

In this post I’m giv­ing you the sim­ple code to copy and paste to have your own Google +1 but­ton on your site within minutes.

Here’s how to get the +1 but­ton for your web site, it’s easy to do. You need only 2 things:

1. In your web page’s source code you need to link to some Google JavaScript code that will in­te­grate the but­ton’s fea­tures into your site. That’s just 1 line of code, and it’s the same for all pages and for all but­ton vari­a­tions. It looks like this:

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

Where to put it?

Tech­ni­cally cor­rect you could put it into the head sec­tion of your page, for ex­am­ple right be­fore the clos­ing head tag.

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

Or you could put it close to the end, right be­fore the clos­ing body tag.

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

2. Next you need to put the ac­tual but­ton into your web page. You can chose to use a stan­dard but­ton with­out adding any prop­er­ties. The ba­sic code is un­be­liev­ably short:<g:plusone></g:plusone>Yes, that’s all you need to make the +1 but­ton show up any­where in your page

Add a +1 but­ton, the quick & dirty way.

By ‘quick & dirty’ I mean: not wor­ry­ing where to put the JavaScript. Just put it all to­gether with the but­ton itself.

In your web site’s source code find the spot where you want the but­ton to show. Then en­ter the fol­low­ing code into your site.

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

It will look like this:

How to cus­tomize your Google +1 button

If you want more con­trol, you can chose one of the 4 sizes shown above, and you can chose NOT to dis­play the share count. Here’s the code ready to copy and paste:

Small but­ton with count:
<g:plusone size="small"></g:plusone>

Medium but­ton with count:
<g:plusone size="medium"></g:plusone>

Stan­dard but­ton with count:
<g:plusone size="standard"></g:plusone>

Tall but­ton with count (it’s not avail­able without):
<g:plusone size="tall"></g:plusone>

Small but­ton with­out count:
<g:plusone size="small" count="false"></g:plusone>

Medium but­ton with­out count:
<g:plusone size="medium" count="false"></g:plusone>

Stan­dard but­ton with­out count:
<g:plusone size="standard" count="false"></g:plusone>

In this post I wanted to give you a su­per fast and easy way to get the +1 but­ton for your site, and I’m sure it’s enough for 95% of all web mas­ters. For the geeks: be­sides ‘size’ and ‘count’ there are more pa­ra­me­ters you can use. The com­plete doc­u­men­ta­tion for the but­ton can be found here:

https://code.google.com/apis/+1button

By the way: all those but­tons above are work­ing, feel free to click and share this post.