@adv-ui/ij-braze-wrapper
v1.5.0
Published
![](https://img.shields.io/badge/automatic-release-brightgreen)
Downloads
692
Maintainers
Keywords
Readme
Jobs Braze wrapper
Description
This wrapper sets up the required logic in order to interact safely with the Braze browser SDK, named under the legacy appboy
object
Features
Register for in-app messages
The subscribeToInApp
method is possible to subscribe for any InApp campaign.
N.B. This method is automatically invoked when creating a Braze instance, so is not necessary to call it explicitly.
Register for Web Push Notifications
The registerPushMessages
method allow to render the soft prompt for push notification triggering a Braze InApp campaign.
Since this is a custom event (Web Push Primed), if the soft prompt does not render check wheter the campaign is correctly configured in the Braze dashoboard.
The registerPushMessages
method accept an optional object parameter for additional options.
{
pageWhitelist: Array<string>
}
- pageWhitelist: list of allowed pages for rendering the Prime for push campaign. If none is passed, the campaign is available for any page.
import Braze from '@adv-ui/ij-braze-wrapper'
const braze = new Braze()
// Trigger the campaign everywhere
braze.registerPushMessages()
// Trigger the campaign only for the passed pages
braze.registerPushMessages({ pageWhitelist: ['/ofertas-trabajo']})
Release a new version
Once you have merged your changes, the @s-ui/ci tool will automatically release a new minor version for the dependency @s-ui/ij-braze-wrapper