Web Push Notifications require a Service Worker file to be available on your domain in order to subscribe and receive web push notifications. Before you can start to send Web Push Notifications to any users, please follow the instructions below.
How Do I Setup the Service Worker File?
- Download the .js file - You can download the file here.
- Upload .js files to your server - You can place this file in your site's root or in a subdirectory path you will never link users to. If you place these files in a subdirectory path, they will not conflict with any other Service Workers you have now or may add in the future.
- Example path where to place: https://dundermifflin.com/CloudmattrServiceWorker.js