Sharing: Best practices for targeting Interactive Posts

Yesterday, Joanna and I gave a talk on best practices for the Google+ platform. We discussed just a couple subtle ways that you can make the most of the features that we’ve shipped with the Google+ Sign-In button. In this post, I share a few thoughts on interactive posts, the newest way of sharing on Google+, and a brief look into taking full advantage of targeting posts to specific recipients.

There are two types of sharing available on Google+:

This post is focused on the latter, Interactive posts.

What are Interactive posts?

I like to think of Interactive Posts as a number of things:

  • A better way of sharing
  • A way of enabling interactions with your online presence
  • A way of creating experiences both within and outside the Google+ social stream
  • A way of targeting shares to bring people into your apps

Put concisely, the interactive post is a greatly enhanced version of our existing share button that has specifically been updated for the recent release incorporating sign-in for 3rd party web sites that most importantly allows you to generate notifications across Google.

You now can do the following things that you could not before:

  • Target posts to specific people
  • Prefill text
  • Link directly within your apps and sites from the posts in the Google+ stream
  • Show different labels within the post other than share
  • Include deep links for mobile devices

Now, think about it for a second.  The updated functionality of this feature wasn’t chosen at random. Each of these pieces of Interactive Posts is there to let you tailor the content to allow you to make the MOST out of this feature. In this post, I’m going to show you a small way that you can take advantage of just one of these features, the recipients field.

Demo

Enough about what it is, how about a quick demo? Look at a demo of interactive posts. You will notice that the box behaves very similarly to a share. However, the recipients of the post are specified so that each person receives notifications across Google.  This is huge because it allows you to create experiences within your application that bring in users to the social experience and allows you to choose the relevant people.

For example, if you have a game where people need to draw a coalition of others to win, you can target your posts to those specific people who you believe the current user can influence.

Code

Let’s talk about interactive posts and how they work:
First, you configure your interactive post by taking a div or other HTML entity, such as the following:

<div id="sharePost"><button>Attack</button></div>

Next, using JavaScript, you configure the post with a content URL, call to action label, and other properties, inherited from the Google+ Sign-in button:

  var options = {                                                                
    contenturl: 'https://blog.gusclass.com',  
    contentdeeplinkid: '/',                                                      
    clientid: clientId,                                                          
    prefilltext: 'I love reading Gus's blog, you should add it to your blog reader.',  
    calltoactionlabel: 'SUBSCRIBE',                                                 
    calltoactionurl: 'http://gusclass.com/blog/?feed=rss2',                                  
    requestvisibleactions: '',
    cookiepolicy: 'http://gusclass.com',
    recipients: '109716647623830091721, io2013@gusclass.com'
  };                                                                             
  gapi.interactivepost.render(divId, options);

Then, using JavaScript, you call gapi.interactivepost.render, passing in the appropriate parameters:

      // Call the render method when appropriate within your app to display
      // the button.
      gapi.interactivepost.render('sharePost', options);

When the button renders, the user is presented with the new targeted sharing dialog. When the user shares, those people receive notifications across Google including all of the supported Google products such as their mobile device, GMail, Google Calendar, and so forth.

Again, this demo is here:

http://wheresgus.com/iodemos/demotargetipost/

Making it even better

In the talk on Google+ best practices that Joanna Smith and I gave at I/O this year, we discussed ways that people are going above and beyond the basics in Google+ integrations.  I have taken a short pass at ways that people can do this when targeting recipients in interactive posts and here is a subtle example:

    function findPeople(){
      // only render once - the interactive post will ALSO call the callback
      if (!rendered){
        gapi.client.plus.people.list(
          {
            userId : 'me',
            collection: 'visible',
            orderBy : 'best',
            fields : 'items/url,items/id,items/image/url'
          }).execute(
          function (result){
            var people = result.items;
            for (var i=0; i < 10 && i < people.length; i++){
              contentUrl = people[i].url;
              peopleIds += people[i].id;
              if (i < 9 && i < people.length-1){
                peopleIds += ',';
              }
              $('#picker').append('<img src="' + people[i].image.url + '"/>');
            }
            renderPost();
            rendered = true;
          });
      }
    }

    function renderPost(){
      var options = {
        contenturl: contentUrl,
        clientid: '671005127968.apps.googleusercontent.com',
        cookiepolicy: 'single_host_origin',
        prefilltext: 'Attack the evil people!!!',
        calltoactionlabel: 'ATTACK',
        calltoactionurl: 'https://plus.google.com/+GusClass',
        recipients: peopleIds
      };
      // Call the render method when appropriate within your app to display
      // the button.
      gapi.interactivepost.render('sharePost', options);
    }

What I’m doing in this code block is getting the people associated with the currently signed-in user and am filling the recipients with the people visible to the app, ordered by best.  This is better because you are taking advantage of the features that Google has made available to you and are using it to grow your app’s audience. What I’m showing in this demo is a mockup for a picker as well as the best people populated into the interactive post. I would recommend that you take it a little further than I did in your integrations and actually let people pick from a few of their friends by clicking on their faces.

Making it amazing

A final improvement you could make would be specific to the information that YOUR site has about your users and their connections. By taking advantage of internal social graphs or interactions of your users, you could create more engaging experiences that would drive more click-throughs for your interactive posts. For example, if you wanted to target interactive posts to people already connected on your site, for things like “contributing to a purchase” on your site, you have this information and Google does not – use this to your advantage and you can drive engagement and growth for your site.

Conclusions

Interactive posts are one of the most significant features that launched with Google+ sign-in. This form of sharing is very powerful and flexible to let your users share with the right people and grow the engaged audience for your apps. Take the time to think about how you can best use this feature for your site and take advantage of order by best in people.list to make the most of the feature.