Bloomreach
Engage your users by enabling Bloomreach push notifications and in-app messaging
The Bloomreach plugin integrates mobile push notifications and in-app messaging with support for audience segmentation and targeted messaging.
Why use Bloomreach?
- Push permission control: Request and check notification permission from JavaScript.
- Customer identity support: Identify and persist customer state across sessions.
- Customer logout support: Clear customer session state when needed.
- Deep linking readiness: Configure domains to route links into the app.
Prerequisites
- Access to Bloomreach plugin settings in Median App Studio (Push Notifications tab).
- Bloomreach credentials from your Bloomreach Engagement dashboard:
apiKeyprojectTokenbaseURL
- For Android push, plan Firebase Cloud Messaging (FCM) with
google-services.jsonand Bloomreach; see Android push notifications. - For deep linking, plan domains for
hostsand host platform verification files; see Deep linking setup.
When to use this plugin
Bloomreach is useful for apps that need to:
| Use Case | Example |
|---|---|
| Request push permission | Prompt users from the app UI before enabling push campaigns. |
| Check push permission state | Gate push-dependent actions based on permission status. |
| Identify customers | Associate app sessions with Bloomreach customer identifiers and properties. |
| Logout customer sessions | Clear active customer identity when users sign out. |
| Deep link from campaigns | Open campaign links directly in-app for supported domains |
Developer Demo
Display our demo page in your app to test during development https://median.dev/bloomreach/
What you'll do
Use this section as a fast navigation map into the full setup and implementation details:
- Configure plugin credentials and behavior: Go to Plugin Setup.
- Set deep linking domains: Review
hostsin Configuration Options. - Implement permission and identity calls: Add methods from JavaScript Bridge Functions.
- Apply practical integration patterns: Follow Code Examples.
- Run validation checks: Complete Testing Checklist and review Troubleshooting.
Integration guide
Plugin platform setup
Enable the Plugin
- In the Median App Studio, open Bloomreach plugin settings under Push Notifications.
- Set
activetotrue. - Add required values:
apiKey,projectToken, andbaseURL. - Configure
autoRegisterfor automatic permission prompting on app launch. - Add optional
hostsvalues for deep linking support.
Configuration Options
| Setting | Description | Default | Recommended |
|---|---|---|---|
| active | Enables or disables the plugin. | N/A — not covered in the source. | true for active integrations. |
| autoRegister | Automatically prompts users for push permission on app launch. | N/A — not covered in the source. | false to enable manual permission timing. |
| apiKey | Bloomreach API key (required). | N/A — not covered in the source. | Use the value from the Bloomreach dashboard. |
| projectToken | Bloomreach project token (required). | N/A — not covered in the source. | Use the value from the Bloomreach dashboard. |
| baseURL | Bloomreach API base URL (required). | N/A — not covered in the source. | Use your regional Bloomreach endpoint. |
| hosts | An optional domain allowlist for deep links. | N/A — not covered in the source. | Add all app deep-link domains without scheme (https:///http://). |
Example configuration (JSON)
{
"active": true,
"autoRegister": false,
"apiKey": "your-api-key",
"projectToken": "your-project-token",
"baseURL": "https://api.eu1.exponea.com",
"hosts": ["median.dev", "median.com"]
}Replace values with those from your Bloomreach Engagement project and your app’s domains.
Android push notifications
Android deliver push through Firebase Cloud Messaging (FCM). Configure all of the following:
google-services.json— Embed the Firebase config in your build. In Median App Studio, open the Build & Download tab and upload yourgoogle-services.jsonso it is included in the app binary.- Bloomreach Engagement — In the Bloomreach Engagement web app, enable push for your project and add your FCM server key so Bloomreach can send notifications to your app.
For Bloomreach-side steps (projects, keys, and campaigns), use Bloomreach’s documentation.
Deep linking setup
Deep links open URLs in your app when domains are allowlisted and platform association files are valid.
- Plugin configuration — Add every domain you want to open in-app to the
hostsarray. Do not includehttps://orhttp://; the plugin applies URL schemes as needed. - Hosted verification files — On each domain (and subdomain you use), serve the standard association files over HTTPS:
- Android —
/.well-known/assetlinks.json(format and examples: Deep linking). Example host file: https://median.dev/.well-known/assetlinks.json. - iOS —
/.well-known/apple-app-site-association(or/apple-app-site-association). Example: https://median.dev/.well-known/apple-app-site-association.
- Android —
Use median.co’s Deep Linking Validator to check your domain, and read Deep linking for Universal Links, App Links, and file requirements.
Note
An incorrect deep link setup can cause links to open in the browser instead of the app.
JavaScript Bridge Functions
Request Push Notification Permission
Prompt for the Push Notification permission, which displays a dialog for users to confirm permission. For Android, the dialog only displays on Android 13 and above. Android 12 and below will always be granted without user intervention.
Provide a callback function or otherwise return a promise.
↔️Median JavaScript Bridge
median.bloomreach.promptNotification({'callback': function}) // Return value: { "granted": true | false }
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
callback | function | No | Callback that receives { granted: true | false }. |
Check push notification permission
Checks whether push permission is granted.
↔️Median JavaScript Bridge
median.bloomreach.notificationEnabled({'callback': function}) // Return value: { "granted": true | false }
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
callback | function | No | Callback that receives { granted: true | false }. |
Identify customer
Identifies a customer by identifier and value. State persists until logout.
↔️Median JavaScript Bridge
const params = { "identifier": "registered", "value": "[email protected]" }; const result = await median.bloomreach.identifyCustomer(params);
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
identifier | string | Yes | Customer identifier key (example in source: registered). |
value | string | Yes | Identifier value (example: email). |
properties | object | No | Optional customer properties such as first_name, last_name, age. |
Optionally, include user properties:
↔️Median JavaScript Bridge
const params = { "identifier": "registered", "value": "[email protected]", "properties": { "first_name": "John", "last_name": "Doe", "age": 25 } }
Logout customer
Clears the current customer session.
↔️Median JavaScript Bridge
median.bloomreach.logoutCustomer({callback: function}) // Return value: { "success": BOOLEAN }
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
callback | No | function | Callback for logout completion. |
async function ensureBloomreachPermission() {
const status = await median.bloomreach.notificationEnabled();
if (!status.granted) {
const result = await median.bloomreach.promptNotification();
console.log("Permission granted:", result.granted);
}
}Identify and later clear a customer session
async function setAndClearCustomer() {
await median.bloomreach.identifyCustomer({
identifier: "registered",
value: "[email protected]",
properties: {
first_name: "John",
last_name: "Doe",
age: 25
}
});
await median.bloomreach.logoutCustomer();
}Testing Checklist
Use this checklist to validate Bloomreach integration:
Basic Functionality
- Plugin is active and required config values are set.
-
promptNotificationreturns a permission result. -
notificationEnabledreturns current permission state. -
identifyCustomeris called with valid identifier/value. -
logoutCustomerclears the current customer session.
Configuration Testing
- Android app includes
google-services.json. - Bloomreach push setup includes FCM server key.
-
hostsincludes all intended deep-link domains. - Verification files are hosted for iOS and Android deep linking.
Deep Linking
- Deep links open in-app for configured domains.
- Deep Linking Validator checks pass.
Troubleshooting
Deep links open in browser instead of the app
This typically indicates incorrect deep linking configuration. Verify hosted association files and ensure all intended domains are listed in hosts (without https:// or http://).
Android push notifications are not delivered
Verify google-services.json is embedded in the app and Bloomreach push configuration includes the FCM server key.
Not sure which identifier to use in identifyCustomer
The source notes that registered is the default hard ID in the example, but your hard ID may differ. Check your Bloomreach customer identification setup.
Still having trouble?For issues related to Iretable's own configuration, permissions, or platform-specific behavior outside Median.co's, refer to Bloom Reach's integration documentation.
Updated 10 days ago