Web push notifications
The notification content is managed entirely in the CRM, and its task is to receive and render the notification in the player's browser.
Implementation
To implement this channel and enable support for web push notifications, it is necessary to host a Service Worker file with the following content:
importScripts(
'https://{pep-cdn}.gamanzaengage.com/casino-ui-widgets/gamanza-service-worker.f11d1af1.min.js'
);
By default, our script will look for a service worker called push-notifications-service-worker.js
, hosted at the root of your domain. For example, if your site is https://example.com, our script will search in the following path: https://example.com/push-notifications-service-worker.js.
Prompt
In order to send web push notifications, it is necessary to request permission from the user. Our script provides a permission prompt dialog which will be shown to the player when they log in.
The texts (message and CTAs) are configurable using translations, like the rest of the platform. The "Ask Me Later" button will set a cookie that will show the dialog again a month later.
Once the user clicks on the "Allow" button from our script, the browser itself will display an additional prompt that the user must also approve.
Examples
This is an example of how a Push Notification will appear in Chrome on macOS. The final Push Notification layout will vary depending on the client's device, Operating System and browser version.
When the above process is complete, whenever a campaign is sent using the Web Push Notification channel, the targeted users will receive a notification that looks like this: