The Optimizely Data Platform (ODP) mobile SDK lets you push notifications to your customers with an iOS or Android application.
Prerequisites
- Subscription – Have access to the marketing package and enable the App Push feature.
- Mobile SDK – Properly configure the ODP mobile SDK settings by navigating to Account Settings > Integrations > Mobile Apps.
Collect app push subscribers
Communicate with customers with app push notifications by collecting opt-in events. Similar to email opt-ins, a customer's consent determines your reachable audience through the channel. Opt-in consent varies by platform:
- iOS – iOS devices only let apps send notifications to users who have agreed to receive them.
- Android – Android devices inform users that an app's permissions automatically allow push notifications. Users can opt out if they do not want to receive them, but it is a manual process, reducing the number of people who choose to do so.
The following image shows how to opt in to push notifications on iOS (left) and opt out of push notifications on Android (right).
Customer opt-ins send an event to ODP, confirming the customer's app push subscription and providing analytics and app push values. To see an example event, see the event inspector in your ODP account. Look for the following values in the event inspector:
- Event Type = push
- Action = add_push_token
- User Agent Information (UA)
A token for iOS or Android displays on the customer profile as an icon next to the app's name after a customer opts in. Click the iOS or Android icon to see the token value for that customer.
You can also view the app push event in the event history feed of the customer profile.
Include app push touchpoints in a campaign
After customers opt in to app push notifications, you can include app push touchpoints in your campaigns and send messages to customers.
Review app push audience
After you create or add a segment to a campaign, review the reachable app push audience next to the mobile icon.
You can reach a customer if you know their app push token value. When a customer opts out of the app push channel, the system removes the token from their customer profile and captures a Remove Token event. This behavior means you can segment based on push token attributes to specifically target app push customers or create a campaign that only uses app push messages.
Create app push touchpoint
After you determine your campaign audience, you can create an app push touchpoint.
- Go to Activation > Engage > Create New Campaign.
- Select or create a One-Time or Behavioral campaign.
- Select the desired segment of customers who have opted in for app push notifications and configure the additional enrollment rules as desired.
- Edit the campaign touchpoint and select the App Push channel. If this is an omnichannel campaign, see Create an omnichannel campaign to add additional channels to an existing touchpoint.
- Go to Push Delivery > Deliver Push To and select the display name of your app. The platforms associated with the app auto-populate with iOS Sandbox, iOS, or Android, depending on your integration setup. You can manually disable individual platforms.
- Design the app push notification: Add a variation to A/B test the push notification, load a template, enter a name, enter the message you want customers to receive, add liquid or custom HTML variables to customize the push notification, and so on. The message should be no longer than 40 characters.
- (Optional) Expand iOS Options or Android Options to define additional settings.
iOS options
- Alert Title – The headline used to display the alert. This is the minimum recommended option. You should also use a dictionary. If you specify a string, the alert displays your string as the body text. For example, title, subtitle, launch image, and so on.
- Key/Value Pairs – Specific values are called in your application if you have a dictionary. Work with your developers to understand your options.
-
Custom Sound – The name of a sound file in your app’s main bundle or the library or sounds folder of your app’s container directory. Specify the string
default
to play the system sound. Use this key for regular notifications. - Badge Number – The number to display in a badge on your app’s icon. If there are any badges currently, specify 0 to remove them.
- Mutable Content – A notification to your notification service app extension before delivery.
- Launch Image – The name of the launch image file you want to display when the user launches your app.
- Action Loc-key – The key to a localized action. Work with your developers to understand your options.
-
Loc-key – The key for a localized message string. Use this key, instead of the body key, to retrieve the message text from your app's
Localizable.strings
file. The value must contain the name of a key in your strings file. - Loc-args – An array of strings containing replacement values for variables in your message text.
- Title Loc-key – The key for a localized title string.
- Title Loc-args – An array of strings containing replacement values for variables in your title string.
For information on these options and iOS app development, see Apple's documentation on generating a remote notification.
Android options
- Key/Value Pairs – Call specific values in your application if you have a dictionary. You should include a title and associated title value with the body of your message. Work with your developers to understand your options.
For information on these options and Android app development, see Android's developer guide.
Finalize your touchpoint
- Preview and test your touchpoint. Preview lets you review the touchpoint on-screen, while Test lets you send a test through the touchpoint channel instead.
- Select the campaign's name from the breadcrumb trail, then click Save.
- Click Go Live when the campaign is customer-ready.
Review performance
Review the performance metrics associated with an app push touchpoint.
- Go to Activation > Engage.
- Select the campaign containing the desired touchpoint.
- Click the Eye icon to expand the performance metrics view for the touchpoint with the app push. See Campaign metrics for more information.
Article is closed for comments.