The Mobile SDK lets you push notifications to your customers with an iOS or Android application.
- Subscription – Have access to the marketing package and enable the App Push feature.
- Mobile SDK – Properly configure your 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 allow apps to send notifications to their 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 will 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 Optimizely Data Platform (ODP), confirming the customer's app push subscription and providing analytics and app push values. To see an example event, see the event inspector within your Optimizely 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 and/or Android appears on the customer profile after a customer opts-in as an icon next to the app's name. Click on the iOS or Android icons to see the token value for that customer.
You also can view the app push event in the activity 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.
- Click on the Edit icon of a campaign touchpoint.
- If this is a new campaign or touchpoint, select the app push channel from the prompt. If this is an omnichannel campaign, add 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. However, you can also manually disable individuals platforms.
- Review the following options:
- Add Variation – Allows the push notification to be A/B tested.
- Load Template – Use a previously created message as the basis for this touchpoint.
- Name – Determine how you will be able to identify your content within ODP.
- Variables – Add liquid or custom HTML to customize the push notification further. See your Customer Success Manager (CSM) if you need assistance.
- Enter a message of up to 40 characters in the text area.
- Review additional options if necessary by clicking iOS Options or Android Options.
- Alert Title – The headline used to display the alert. This is the minimum recommended option, and we also recommend 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 called in your application if you have a dictionary. Please reach out to your developer to understand your options.
- Custom Sound – The name of a sound file in your app’s main bundle or the library/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 would like to display when the user launches your app.
- Action Loc-key – The key to a localized action. Please reach out to your developer 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 Generating a remote notification.
- Key/Value Pairs – Call specific values in your application if you have a dictionary. We recommend a title and associated title value with the body of your message. Please reach out to your developer to understand your options.
For information on these options and Android app development, see Developer guide for Android devices.
- Preview and test your touchpoint. Preview allows you to review the touchpoint on-screen, while Test allows you to send a test through the touchpoint channel instead. Both options are available when viewing a touchpoint within the editor.
- Select the campaign's name from the breadcrumb menu, then click Save.
- Click Go Live when the campaign is customer-ready.
Review the performance metrics associated with an app push touchpoint.
- Go to Activation > Engage.
- Select the campaign containing the desired touchpoint.
- Click View (icon) to expand the performance metrics view for the touchpoint with the app push. To review each metric in more detail, see Campaign metrics.