Sunday, June 29, 2014

What is Push Feedback Service and how to implement it effectively

A feedback service would help us identify whether a device is still opted in to receive push notification from our app. This is one of the ways to measure whether our push campaign is successful or not. The feedback service is not instant, that is Apple would not immediately know when user turns off push at device level for a given App. Apple would add that device to its do-not-send push- list [a name for discussion’s sake] only when there is a failure in delivering the push.

Say you send a marketing campaign push and user receives it and for some reason turns-off the push notification permission for our app. When you execute the feedback service, that user’s device wouldn’t be in Apple’s do-not-send-push-list. But when you send your next push and as it fails for that user’s device, then the user’s device would be in Apple’s do-not-send-push list. Note push notifications that expire before being delivered are not considered a failed delivery and don’t impact the feedback service. The feedback service’s list is cleared after you read it.

 Assume there is a marketing push campaign, and we want to measure success. Do we need to send one more user facing push to identify how many users have opted out of push after the campaign?? No, there is a way, which is using silent push (available from ioS 7 and above). Silent push is nothing but setting content-available key as part of payload. When that key is present in payload, iOS would treat that as silent push, which means user would never know a push was sent to their device.

 Typical Silent push payload in iOS:
{
aps = {
"content-available" = 1;
sound = "";
};
}

         So the steps to identify how many users have turned off push notification after a push campaign, would be to send a silent push and execute the feedback service. 

        These steps can be used on a small set of population to measure the engagement, before we send the actual push campaign.

         Now the question would be is there a silent push equivalent in Android. Well, there is Send-to-Sync messages which can be used. These Send-to-Sync messages update app data using push notifications. But I haven’t used it before. The advantage in Android is whenever a push reaches a device, it is not immediately displayed in notification manager, it signals our app and our App can decide whether we can display it or hide it. Leveraging this we can have a key in payload to help our app decide to hide the push and mimic this as a silent push and then ping GCM to check for NotRegistered error message.
         
     Just in, in android latest version, as part of the payload we can specify delivery_receipt_request value to true, on setting that GCM would indicate whether the message is delivered and we can use upstream messaging using XMPP to indicate to our server whether user have read the message. 
    

Tuesday, June 24, 2014

Differences between iPhone and Android Push Notifications: [APNS Vs GCM]


The documentation on how push works are clearly explained here on the following links:

The above references should help you to understand how push notification works. I felt it would be repetition to explain the content again here. Felt writing an article that explains the differences and some nuances between various push mechanisms: [Note: Please feel free to correct me, if any of the below information is incorrect.]



iOS
Android
Permissions  Methods are available to identify the user’s opt in status No methods are available
Feedback Service Yes, along with silent push it’s a great way to measure success Yes, but lots of tweak is required.
What happens when push reaches the device iOS automatically puts the message into notification center Android informs the app that there is a message, and app can decide whether to display it or hide it.
Store and Forward [What happens if users device is offline, when push is attempted to be delivered] It stores only one unsent message that too recent. It can store multiple based on collapse keys.
Message Expiry Apple didn’t reveal. It can be user set value with time-to-live parameter [0-4 weeks max]
Localization Yes using loc-key,loc-args Not directly but we can use same iOS approach
Two way messaging No Yes using XMPP
Multi-device Messaging No Yes
Receiving messages from Multiple senders No Yes
Misc Silent push,ioS8’s category support Sync to send, Priority flag support.


For Push 101 and other engagement techniques read Push 101
For updates on Android GCM 3.0 refer GCM 3.0 Push
New Blog on Apps & Bots : Why Bots wont replace Apps

Sunday, June 22, 2014

Push retargeting on iOS and preference center

     This article explains the guidelines to be followed when we miss the first chance to opt the customers in for push notifications. [You may need to read this to understand the benefits of opting the user in first time alert itself]

      Once we miss the first chance, the possible approach would be to apprise the end users on how our notifications are going to help them and ask their permission for optin. Before we do this, we need to identify the possible touch points that would strongly motivate the user to optin for notifications. An example would be to show the permission alert when an item in their shopping list have a coupon, “Hey would you want us to send an push alert when you have a coupon for the item in your shopping cart”,after they have added an item in the shopping list.

     After identifying the touch points we may not be able to just display the OS alert and opt them in (in iOS alone), and the reason is explained in the previous article which is basically user needs to manually change the device level optin settings. Hence, now we need to display an additional alert for iOS alone, which instructs the user on how to achieve that.

     An example of that instruction alert would be like what Facebook messenger does. [Try turning off push notification at OS level and open facebook messenger app]. So the retargeting steps would be to display an optin alert at right time and followed by an instruction alert on how to turn on at OS level. This instruction alert is required only in iOS.

      Now we understood how difficult it is to retarget when user says no to initial alert or turn off notification at device level. At the same time,we need to provide a facility for the user to turn off push notification in a simpler way,inside our app, so that it would be easier for us to opt them back when required. That's where preference center comes into picture.

      Its basically a toggle/set of toggles that helps the user to optin/opt out of push notification(s). In iOS, this works perfectly after user has given their consent to OS alert, if not display an instruction page on preference center on how to turn on push at OS level. If the user wants to opt out of push notification encourage them to do so using the toggle which we have provided here,rather than user turning it off at OS level. Another advantage in providing the toggle is we can measure how many users have opted in/ opted-out so that we can appropriately use other channels like SMS/email for engagement. The preference center is recommended in Android as well.

       The recommended apps to check out preference center would be Bank of America and Facebook.

Tech Notes:

  1. In iOS you have option to read status of each notifications option (like status of Alert Style etc.,).
  2. In Android prior to Jelly Bean, you never had option at OS level to opt-out of push. After Jelly Bean you do have an option but there is no method to read the toggle status.

Tuesday, June 3, 2014

Push Notifications Basics - 101 [Permissions handling]

   As the recent WWDC also came up with new updates on push notifications, I felt it is right time to revise the basics of good push messaging experience. I will start with basics and will cover till advance topics like silent push. 
 Let us start with push permissions:
iOS:
 
  Seeking permissions for sending push notifications is actually an OS driven alert. The caveat here is, this OS driven alert can be displayed only once, so we need to be very cautious in using this. If user opts for "Dont allow" on the OS alert, then it would be difficult for us to opt them back, as they need to manually opt-in through device's settings.

 Here are some guidelines which if we follow would have maximum conversions:
i) Never ask for permissions until you have decided to send push notifications on the same app release. I have seen lot of apps doing this mistake and in fact when I am new to push notifications, I felt by default when we install app this alert would be shown :).
ii) Once you decide to send push notifications ensure that before initiating/displaying the OS level permission request/alert, display a custom page and apprise the users about the benefit they gain by accepting for push notification.
Try to be more specific, as the prevailing users have a general idea on push notifications. Once user accepts, then display the OS alert because without which you cannot opt-in the user for APNS/ push notification service. It would be wise to have an option like “Not now” on the custom alert page and retarget the user on later stage.
   The advantage of this approach is 
a) We have apprised the user about the benefits and have helped them to make a decision.          
b) We are using the one time OS push permission request very carefully and use it only when the chances of conversion are very high. (ie., in our case displaying when user says “Enable” and not showing when they choose “Not now”) 

iii) Decide carefully on where to display this custom alert. I see lot of apps that displays this screen when the app is installed and launched, which might go well if we have a custom page. But a better option would be when the chances of conversion are very high. An example is to ask permission for push notification when user completes a checkout
            "We will send you a push, when the order is shipped" etc.,
  On my next blog I would explain better ways for re-targeting in case if we miss the first opportunity to make them accept for push notifications.
Android:
 
 In Android GCM notifications, we do not have permissions concept as the permissions for push are sought in Playstore itself, when user is installing the app.
 Note: Prior to Jelly Bean user never had an option to opt-out for push and after Jelly Bean Android came up with an option against each app at device settings level.
Windows:
 As far as I know I didn’t see any option for optin for Live/Raw notifications. 
       
    Now before we wind off let me show you a small technique to test this permissions on iOS and here you go:
  • Delete your app from the device.
  • Turn the device off completely and turn it back on.
  • Go to Settings > General > Date & Time and set the date ahead a day or more.
  • Turn the device off completely again and turn it back on.

  Once you do this you might be able to see the iOS permissions alert again even though you have seen before.