Blog entries   |  Google +1 good for SEO good for customers

Google +1 good for SEO good for customers

For one of my websites I just added the Google +1 button. As you probably already know it is very similar to the Facebook ‘Like’ or ‘Recommend’ button and it can help your SEO for organic search and of course also the social aspect of people vouching for your website helps you get more visitors.

So how about offering your visitors / customers an incentive to click this button?
According to Google you can offer your visitors exclusive content as reward for pressing the button, you can not offer a service or paid products. Now I feel offering a discount code for clicking the button is not a service neither is it a paid product. So this could be a good opportunity of getting some (SEO) exposure for your website. However you do have to be careful with this as you do not want to get penalized for abusing this option. Knowing Google a little they will do this sooner or later if you are abusing this option.

So how can you unlock this ‘exclusive’ content for pressing the +1 Google button?
Google provided us with the option for a ‘callback’ javascript function thus making it pretty easy. After doing this for the +1 button I also started searching for a similar solution for the Facebook ‘Like’ button.

Put this javascript in the <head> of your website (thanks to Philip_M from codingforums.com for making this js more efficient)
<script type="text/javascript">
function Toggle(obj) {
var Style = document.getElementById(obj).style;
Style.display = (Style.display == "none") ? "" : "none";
}
</script>


Place the following code where you want the button and the exclusive content (the button and div can be separated and located anywhere on the site):
<g:plusone size="medium" callback="GToggle"></g:plusone> //code for the button
<div id="googleplusdisc" style="display:none"> //div for exclusive content
exclusive content / discount code here
</div>
<script type="text/javascript">
function GToggle(plusone) {
if(plusone.state == "on"){
Toggle('googleplusdisc');
}
}
</script>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>


The code needed for doing the same for the Facebook ‘like’ button:
Put this javascript in the <head> of your website (thanks to Philip_M from codingforums.com for making this js more efficient)
<script type="text/javascript">
function Toggle(obj) {
var Style = document.getElementById(obj).style;
Style.display = (Style.display == "none") ? "" : "none";
}
</script>


Codes for the buttons (choose one):
<fb:like action="recommend"></fb:like>
<fb:like></fb:like>


Callback script (place under the button code):
<script>
// this will fire when any of the like widgets are "liked" by the user
FB.Event.subscribe('edge.create', function(href, widget) {
Log.info('DISCOUNT code here'); //this will create a hover FB box with the text 'Discount code here' when user hovers the mouse over the 'Like button'
//or
//  Toggle('fbdisc'); //remove // to activate

});
</script>

Div for content (only if you want to use the Toggle function in code above:
<div id="fbdisc" style="display:none"> //div for exclusive content
exclusive content / discount code here
</div>

One Response to Google +1 good for SEO good for customers

  1. Andrea Reply

    June 8, 2013 at 10:00 pm

    Thanks, Steve! You are always finding new ways to make our lives better online. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *