Iterable
Engage your users by enabling Iterable push notifications.
Overview
The Iterable Plugin enables the integration of mobile push notifications within your app. With support for audience segmentation and targeted messaging, this plugin leverages the capabilities of the Iterable iOS SDK and Iterable Android SDK (Overview of Iterable's iOS and Android SDKs) to enhance user engagement.
This guide provides detailed instructions on configuring the plugin and using its available functions through the Median JavaScript Bridge.
Developer Demo
Display our demo page in your app to test during development https://median.dev/iterable/
Implementation Guide
Plugin Configuration
To configure the plugin, update the following parameters in the Push Notifications tab under Iterable:
{
"active": true | false,
"autoRegister": true | false, // optional, if true push permission will be requested automatically
"apiKey": STRING, // if specified initialization will initiate automatically, otherwise provide when initializing at runtime via JavaScript Bridge
"dataRegion": STRING // if specified (e.g. 'EU') the app will use region-specific endpoints, can also be provided when initializing at runtime via JavaScript Bridge
}
Deep Linking
Enable Deep Linking to ensure that notification links open directly within your app instead of the device's browser.
JavaScript Bridge Functions
Initialize
If automatic initialization is not configured in App Studio, manually initialize Iterable with your API Key.
Provide a callback function or otherwise a promise is returned.
↔️Median JavaScript Bridge
median.iterable.initialize({ 'apiKey': STRING, 'dataRegion': STRING, // optional, e.g. 'EU' 'callback': function // optional otherwise returns promise }); // Return value: { "success": true | false }
Check if Initialized
Verify if the Iterable SDK to avoid duplicate initialization.
Provide a callback function or otherwise a promise is returned.
↔️Median JavaScript Bridge
median.iterable.isInitialized({'callback': function}); // Return value: { 'initialized': true | false, 'apiKey': STRING, // available only if initialized is true 'dataRegion': STRING // available only if initialized is true }
Register for Push Notifications
Register the current user for push notifications and generate a new token.
Provide a callback function or otherwise a promise is returned.
↔️Median JavaScript Bridge
median.iterable.registerPush({'callback': function}); // Return value: { "success": true | false }
Prompt for Push Notification Permission
Request push notification permissions from the user. On Android 13 and above, a dialog appears; on Android 12 and below, permissions are granted automatically.
Provide a callback function or otherwise a promise is returned.
↔️Median JavaScript Bridge
median.iterable.requestPermission({'callback': function}); // Return value: { "granted": true | false }
Check Push Notification Permission Status
Retrieve the current push notification permission status.
Provide a callback function or otherwise a promise is returned.
↔️Median JavaScript Bridge
Set Email or Set User Id
Identify the user in Iterable. After setting, call registerForPush()
to generate a new token.
Provide a callback function or otherwise a promise is returned.
↔️Median JavaScript Bridge
median.iterable.setEmail({ 'email': STRING, 'callback': function // optional otherwise returns promise }); // Return value: { "success": true | false } median.iterable.setUserId({ 'userId': STRING, 'callback': function }); // Return value: { "success": true | false }
Updated 4 days ago