Self-Hosted Web Push Integration Guide
π Getting Started
π Updated 1 week ago
To enable native web push notifications on your website, follow these simple integration steps:
Go to your Websites Dashboard, find your registered website, and click the Download SDK button. This will download a pre-configured .ZIP package containing:
sdk.js (pre-compiled with your dynamic site key and backend URL)sw.js (our standard background service worker)Extract the .ZIP package and upload both sdk.js and sw.js directly into the root directory of your website (usually named public_html, public, or www).
Ensure they are publicly accessible in your browser at:
https://yoursite.com/sdk.jshttps://yoursite.com/sw.js[!IMPORTANT] Web browsers require the service worker (
sw.js) to be hosted exactly at the root of your domain. If placed in a subdirectory, the browser will restrict its security scope and notifications will fail.
Copy and paste this single script tag inside the <head> of your website:
<script src="/sdk.js" defer></script>