Posted on Leave a comment

How to +1 a Google Page from Your Own Website




Google Plus pages for business are brand new as of Nov. 7, 2011. Google does offer a tool to create a button for your website or blog posts (a simple example is below).

Problem

Unfortunately, I could not find anywhere how to use the Google Plus +1 button and get it to actually interact with the newly setup Google Plus page. I was going for the same type of interaction that the as Facebook’s Like button. However, if you just use your Google Plus page URL as a parameter in the suggested Google Plus code below, the +1’s do not transfer over like Facebook’s Like button does for a Fan Page.
Example Google Plus +1 button code:
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone size="medium" href="http://www.google.com"></g:plusone>

Solution

After examining the code of the +1 button, I was able to figure out a way to display the +1 button. I used Peterson BMW’s Google Plus page as an example: http://plus.google.com/111774986953590202122
Step 1Create a Google Plus page
Step 2 – You’ll need a browser that has the ability to “Inspect Element” like Chrome, Opera, or Firefox (with Firebug installed). Right-click the 1+ button on your Google Plus page and click “Inspect Element”.
Step 3 – Scroll up in the element code until you see the iframe code of the button like below:

Step 4 – Paste the iframe code into your desired destination.
You can change a few of the parameters in the code to get it to your desired look. For example, you can change the size of the button by changing “size=standard” to “button=medium”. To remove the text “be the first to +1” or any other text to the right, remove the “pp” in “annotation=pp”.

You can test your code buy pressing the +1 button on your website and then checking your Google Plus page to see if it works. Let me know if it works or not in the comments!

Leave a Reply

Your email address will not be published.