Push Notification Scripts
Push subscriber collection requires script tags and (in some cases) service worker files on your landing page. What you need to do depends on your lander type and collection mode.
Quick Reference
| Lander Type | Mode | Script Tags | SW Files |
|---|---|---|---|
| Lander Uploads (No Redirect) | Any | Automatic | Automatic |
| Lander Uploads (With Redirect) | Notix Only | β οΈ Paste 1 script in your HTML | Automatic |
| Lander Uploads (With Redirect) | Parallel | β οΈ Paste 2 scripts in your HTML | Automatic |
| External | Notix Only | β οΈ Paste 1 script in your page | β οΈ Host sw.enot.js on your domain |
| External | Parallel | β οΈ Paste 2 scripts in your page | β οΈ Host both SW files on your domain |
| Blog (No Redirect) | Any | Automatic | Automatic |
| Blog (With Redirect) | Any | Automatic | Automatic |
| Internal (No Redirect) | Any | Automatic | Automatic |
| Internal (With Redirect) | Any | Automatic | Automatic |
Step 1 β Configure Push Settings
Go to Push Notifications > Settings and set up your collection mode:
- Notix-Only β uses only Notix for subscriber collection
- Parallel β uses Tacoloco as the primary prompt, then registers Notix in the background after permission is granted
Save your Notix App ID and (if using Parallel mode) your Tacoloco JS URL and upload the Tacoloco service worker file.
Step 2 β Add Scripts (if needed)
No Redirect landers (Lander Uploads, Blog, Internal)
No action needed. Scripts and service workers are injected automatically.
Lander Uploads (With Redirect)
Add the scripts before </head> in your lander HTML. Service worker files are served automatically on your tracking domains.
Notix-Only Mode
<script>
var s = document.createElement("script");
s.src = "https://notixio.com/ent/current/enot.min.js";
s.onload = function(sdk) {
sdk.startInstall({ "appId": "YOUR_NOTIX_APP_ID", "loadSettings": true });
};
document.head.append(s);
</script>Parallel Mode (Tacoloco + Notix)
<script type="application/javascript" src="YOUR_TACOLOCO_JS_URL" async></script>
<script>
var _ntxInterval = setInterval(function() {
if (Notification.permission === 'granted') {
navigator.serviceWorker.register('/sw.enot.js?appId=YOUR_NOTIX_APP_ID', { scope: '/ntx' });
clearInterval(_ntxInterval);
}
}, 300);
</script>Replace YOUR_NOTIX_APP_ID and YOUR_TACOLOCO_JS_URL with your values from Push Notifications > Settings.
External Landers
External landers require scripts and service worker files hosted on your domain.
Notix-Only Mode
Add this script before </head>:
<script>
var s = document.createElement("script");
s.src = "https://notixio.com/ent/current/enot.min.js";
s.onload = function(sdk) {
sdk.startInstall({ "appId": "YOUR_NOTIX_APP_ID", "loadSettings": true });
};
document.head.append(s);
</script>Then create a file called sw.enot.js at the root of your domain with this content:
importScripts("https://notixio.com/ent/current/enot.sw.min.js?r=sw");Parallel Mode (Tacoloco + Notix)
Add these scripts before </head>:
<script type="application/javascript" src="YOUR_TACOLOCO_JS_URL" async></script>
<script>
var _ntxInterval = setInterval(function() {
if (Notification.permission === 'granted') {
navigator.serviceWorker.register('/sw.enot.js?appId=YOUR_NOTIX_APP_ID', { scope: '/ntx' });
clearInterval(_ntxInterval);
}
}, 300);
</script>Then host both service worker files at the root of your domain:
sw.enot.jsβ create this file with the following content:importScripts("https://notixio.com/ent/current/enot.sw.min.js?r=sw");- Tacoloco SW file (e.g.
{appId}.js) β download from your Tacoloco dashboard under βService Workerβ
Replace YOUR_NOTIX_APP_ID and YOUR_TACOLOCO_JS_URL with your values from Push Notifications > Settings.