Web Push Opt-In Module
Introduction
Collect consents for Web push notifications to send personalized Web push notifications to your customers in a GDPR-compliant way.
Typical Use Cases
This module is required to collect opt-ins for Web push notifications.
How to Use the Module
Ensure the following conditions are met:
- Browser Compatibility: The web browser must support Web push subscriptions and Web push notifications. Currently, Safari DOES NOT support Web push subscriptions! Instead, only Chrome, Edge and Firefox support Web push subscriptions. Chrome sets push notifications to off by default on desktop. We recommend to use Google Chrome on desktop (not on mobile) for repeated testing.
- Service Worker File: The hosting website must provide the file
service-worker.js
from tabPublish
at the webpage root directory, e.g. athttps://www.example.org/service-worker.js
- No Prior Opt-in: The customer must not have accepted or declined a Web push subscription for the hosting website, yet. In case of Google Chrome on desktop this can easily checked by opening URL
chrome://settings/content/notifications
in Chrome web browser on desktop and checking the list of domains. Delete any existing Web push subscription for your domain, and completely RESTART Google Chrome! Only after a restart of Google Chrome you will be asked again. - HTTPS: The hosting website must be opened with
https
, not withhttp
. - No HTTP Basic Authentication: There must not be any HTTP basic authentication present on the hosting website, e.g. as it could be the case in a staging environment.
If these requirements are not met, the chat will simply skip the process module and proceed with the next one.
Re-Ask After Denial
You can configure how many days to wait before asking again if the opt-in is denied. Set the value to 0 to ask every time the module runs, or leave it blank to never re-ask.