Set up the service worker
Shopify
It’s built into our existing plugin
Magento
We plan to add support for push notifications inside our existing plugin
Others
Install the Service Worker
Create a new file on your website's server. This file should be publicly accessible.
You can name this file anything, but a common convention is
serviceWorker.js
.Add the following code to the file:
importScripts("https://wisepops.net/serviceWorker.js");
File Placement
The service worker file should be placed at the root of your website.
Correct placement:
https://example.com/serviceWorker.js
Incorrect placement:
https://example.com/inside/a/subfolder/serviceWorker.js
Note: If you need to place the file in a different location, it may be possible to configure this through Wisepops. However, this option is not currently available on the user interface.
Enable Web Push on Wisepops
Go to the Web Push settings page and check "Allow Web push on my website"