Zero build step
Works on any static site — Hugo, Jekyll, 11ty, Astro, plain HTML. Drop a script tag, copy the service worker file, you are done.
Integration
A single <script> tag, a service worker file copied to your site root, and one ReachBell.init() call. No framework, no build step, no excuses.
Two files: one script tag and one service worker copied to your site root.
<!-- Add before </body> on every page -->
<script src="https://cdn.reachbell.com/sdk/v1/reachbell.min.js" async></script>
<!-- And copy reachbell-sw.js to your site root.
The Push API requires the service worker to be served from the same
origin as the page — / not /assets/, not /static/. -->Initialize once, then call identify() and track() from anywhere on the page.
<script>
window.ReachBellQueue = window.ReachBellQueue || [];
window.ReachBell = window.ReachBell || {
init: (...a) => ReachBellQueue.push(['init', a]),
identify: (...a) => ReachBellQueue.push(['identify', a]),
track: (...a) => ReachBellQueue.push(['track', a]),
subscribe:(...a) => ReachBellQueue.push(['subscribe',a]),
};
ReachBell.init({
projectId: 'prj_8h2k...your-id...',
prompt: { style: 'soft', delay: 8000, placement: 'bottom-right' },
utm: { source: 'site', medium: 'webpush' },
serviceWorker: '/reachbell-sw.js',
});
// Identify the visitor once you know who they are
ReachBell.identify({ email: 'jane@acme.com', plan: 'pro' });
// Track a custom event — feeds segments and automations
document.getElementById('cta').addEventListener('click', () => {
ReachBell.track('clicked_hero_cta', { variant: 'B' });
});
</script>Push, in-app widgets, segments, A/B tests, automations, and analytics — from a single 10 KB script.
Works on any static site — Hugo, Jekyll, 11ty, Astro, plain HTML. Drop a script tag, copy the service worker file, you are done.
The init snippet uses an async loader and a call queue, so anything you call before the SDK finishes loading runs in order once it does. Won't block first paint.
Prompt copy, colors, position, and timing are pulled from the dashboard at runtime — change the wording without touching your HTML or shipping a new build.
The toast widget (v1.0.3), banner + notification center (v1.0.4) ship inside reachbell.min.js — render them with one ReachBell.show() call, no extra files.
Call ReachBell.attachUtmTagger() (v1.0.5) once and outbound clicks pick up UTM params automatically — campaign attribution lines up in GA4 with no manual work.
Single bundle is 9.8 KB gzipped including the prompt, the widgets, and the identify/track API. CDN-cached for one year with stale-while-revalidate.
Every method, callback, and widget option is documented with copy-paste snippets at docs.reachbell.com/integrations/html-javascript.
FAQ
Everything teams usually ask before switching. Something missing? Email us — a human replies.
Yes. The Push API only registers service workers from the same origin and scope as the page — placing the file under /assets/ or /static/ silently breaks subscription. Two-line copy step in your build is usually enough.
Yes. The bundle is published on npm as @reachbell/sdk and on jsDelivr too. Use your own CDN if you have a content security policy that disallows third-party origins.
Yes. The script tag is framework-agnostic — anywhere you can render plain HTML, the SDK works. Astro users typically import it from a global layout file.
Add cdn.reachbell.com to script-src, https://api.reachbell.com to connect-src, and https://*.reachbell.com to img-src. The docs page has the exact directives.
Free for your first 1,000 subscribers. No credit card.
Free forever for your first 1,000 subscribers. Set up in five minutes — no credit card needed.
Start free today