How to Add Google+ Content Recommendations to Your Mobile Site

By Posted 2013 Updated   BloggingGoogleTutorials

Google+ Content Recommendations is a great way to add more interactivity to your mobile site. Google has introduced this new feature to enhance the Google+ integration with your site, recommending the articles which have been +1 by your visitors and lead them to deeper engagement with your site.

It will work on the latest Android as well as iOS browsers on the native Android browser, Safari, and Chrome. You can increase mobile site pageviews for sure by adding this feature in a few minutes.

google+ recommends

Add Google+ Content Recommendations

For most websites and blogs which already display the +1 button or Google+ badges, it means simply editing a single line of code.  Here is the code you need to add  or edit.

1. Link to Publisher Profile –  We already had the link to our Google+ publisher profile in the HEAD tags of the HTML. Most sites have this code as it is essential for integrating your site Google+ page.

<link href="https://plus.google.com/104720479662987122222/" rel="publisher" />

That long number 104720479662987122222 is our publisher ID. You need to replace it with your page ID.

2. Add the Google+ Script to Footer. Again we already had it loaded in the footer as we display +1 buttons.

<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>

3. Add Publisher ID to the Google+ Script. This is the only single code change everyone needs to do if you already have the earlier codes loaded up.

We need to replace

https://apis.google.com/js/plusone.js

with

https://apis.google.com/js/plusone.js?publisherid=104720479662987122222

Remember to replace our page ID  with your page ID for this to work. So now the final script posted in our footer looks like this.

<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?publisherid=104720479662987122222';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>

You can then configure your settings from the Google+ dashboard  and choose to disable recommendations for selected pages or choose for the script to work on selected urls or choose after how much page scroll to display recommendations. I am sure they will implement it for the full screen desktop view soon just like Facebook recommendation bar.

See how this will work on your mobile website

So now visit QOT.CO (our short url) on your mobile device to visit our responsive mobile website and check out if you get content recommendations from your friends.


6 comments on “How to Add Google+ Content Recommendations to Your Mobile Site

  1. Rohan Mod says:

    first it was available to pc version and now it is on the mobile that will surely increase blogger visibility and personal exposure in the field of blogging era.

  2. Debopam Banerjee says:

    This is will be really good for bloggers…. This will surely increase exposure…. Thanks for the share…..

  3. Lloyd X. Ross says:

    This page describes how you can access Google data with some handy PHP code, using the official Google Client API for PHP and OAuth2. To make it short, this is not a dirty hack but provides the official way of doing this. Unfortunately the samples provided in the client library by Google might not suite you very well. This script is the foundation for the other Google client API tutorials.

  4. Tracy Rice says:

    With Multi-Channel Funnels Google Analytics provides even more value for users who are passionate about conversion rates.

  5. Man says:

    Great Post. Google+, as part of the Googleverse, is pushing interactivity for users far beyond just being in the Google+ app or on the website. Instead, Google is pushing the service as content on the move, both as you travel with your smartphone and following you from page to page. With that degree of integration, the power of the Google+ sign-in, as opposed to a local log-in or using a rival service, offers more relevant content.

  6. matthew says:

    Thanks this will really help out, we have been building a lot of mobile sites lately,and all great info like this helps out..

Leave a Reply

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




Next Article »
css.php