Collecting subscribers with Notix push service
For collecting push subscribers two bunches of code are required:
- Small in-page script that should be inlined into your site HTML code
- Service worker that should be located somewhere on your site
Start collecting push subscribers with Notix
- Create a tag inside Notix SSP
- Download the service worker and upload it into your site as a file
- Copy the in-page script and paste it into your site
Technical requirements
- Your web side should use https:// scheme (not http://). Subscribing to push notifications inside non HTTPS pages is impossible.
- Service worker that should be located on the same domain and also be available through https://. It means that you could not use any CDNs or Google Tag Manager to upload serviceworker file. Also you need a privileges to upload files on your site.
In-page script usually looks like this:
<script> var s = document.createElement("script") s.src = "https://notix.io/ent/current/enot.min.js" s.onload = function (sdk) { sdk.startInstall({ appId: "YOUR-APP-ID-HERE", loadSettings: true }) } document.head.append(s) </script>
All parameters that define tag behaviour are located inside sdk.startInstall({})
block.
You can customize all of them using UI inside the Notix SSP,
without changing anything inside Notix tag inlined to your web site.
Also you can customize tag settings directly inside the code of your site and override settings that were customized inside SSP.