Add push notifications to your website
Five steps, no Firebase project, and it works in Chrome, Edge, Firefox, Opera, Samsung Internet and Safari 16.4+.
Add your website
Sign in, open Domains and choose Add site or app. Pick Website and enter your site address, for example
https://example.com. Notizop creates the keys your site needs.Upload the service worker
On the Install code page, download
notizop-sw.jsand upload it to the root folder of your website, so it opens athttps://example.com/notizop-sw.js.Paste the script tag
Copy the script tag from the Install code page (it already contains your App Key) and paste it before
</head>on every page:<script src="https://notizop.com/sdk/notizop-web.js" data-app-key="cpk_your_app_key" async></script>Choose how visitors are asked
On the Overview page, choose the browser’s own permission prompt or a soft prompt that explains why first. A soft prompt usually gets more people to say yes.
Subscribe and test
Open your website, click Allow, then send a test notification from the panel. Your new subscriber also appears under Subscribers.
Your site already has a service worker?
Keep it. Add this line at the top of your own service worker, and point the script tag at it with data-sw:
importScripts('/notizop-sw.js');
<script src="https://notizop.com/sdk/notizop-web.js" data-app-key="cpk_your_app_key" data-sw="/your-worker.js" async></script>
JavaScript you can call
Notizop.subscribe(); // ask for permission and subscribe
Notizop.showPrompt(); // show your opt-in prompt
Notizop.setUserId('user-42'); // link the subscriber to your user
Notizop.setTags({ plan: 'pro' }); // tags for segments
Notizop.trackEvent('purchase_completed', { cart_total: 2499, currency: 'INR' });
Notizop.on('subscribed', () => console.log('subscribed'));
Tip: On iPhone and iPad, Safari shows web notifications only for sites the visitor added to the Home Screen.