Add a push subscription toggle

How to leverage the subscription status for push channels

Push notifications are messages delivered to your end-users through your mobile app or website, which require an explicit opt-in from the user via the mobile app or the browser (with the exception of Android, which currently doesn't require opting in). For detailed information about this please see our opt-in guide.

Whenever a user visits your integrated website or app, a device profile will be created in Xtremepush. In relation to push channels, by default the device will always be push subscribed (and if they have opted-in for push notifications, also push addressable).

Users can disallow push notifications from the app settings or the browser, which will then mark their device unaddressable. Whenever they do so, it will be very difficult to get them to opt in again. To prevent this, you can use the built-in toggle on your inbox or add a toggle on your website or mobile app, which would allow users to opt-out of, for example, marketing notifications. In this way, their device would continue to be addressable, which would still allow you to send them transactional pushes or urgent alerts by using an engagement category that ignores subscription.

This is a similar concept to using a two-step prompt, which will increase your chances of getting users opted in (in this case it will reduce the chances of users opting out from their app settings or browser directly).

It is possible to allow users to opt-in to specific categories using the Subscription Preferences feature. Review our dedicated guide to learn more.

Inbox push subscription toggle

This option adds a toggle on top of your mobile or web inbox, which directly allows users to opt-in or out from push notifications.

Enable this for each of your apps or sites from Settings > Apps & sites > click on the matching app or website > Inbox Settings.

By default, when you hover over the toggle, the user sees a message saying 'Push notifications OFF or Push notifications ON'.

It is possible to personalise the text that shows when you hover over the toggle from the Translations page. Review our dedicated guide for more details on how to do so.

584

Subscription toggle within the web inbox that shows a personalised message.

Enable your own toggle

It is also possible to add your own toggle to your apps or websites. On the handler of that toggle, you would use the SDK methods to set the subscription status for that device.

mPushConnector.setSubscription(BOOLEAN_VALE);
[XPush setSubscription:YES/NO]
XPush.setSubscription(true/false)
xtremepush('user', 'update', {'push_subscription': 1});