The system at a glance
Web Push connects four systems: browser permission, a service worker, a unique subscription, and an application server that encrypts messages for a vendor push service. A campaign tool coordinates those pieces, but it does not replace them.
- Permission
- Subscription
- Encrypted send
- Worker display
Start with a useful reason to subscribe
If the information needs a durable long-form record instead of a time-relevant signal, use the Web Push versus email decision matrix before choosing the channel.
A visitor should know what will arrive and why it is worth interrupting them. Good starting cases include account events, saved-search matches, order updates, publication alerts, and reminders the person explicitly requested. A vague promise such as “stay updated” makes permission harder to evaluate.
Write one example notification and its exact destination before designing the permission prompt. If the example is not useful, the subscription promise is not ready.
The browser creates the subscription
After a user gesture, the browser can present its permission prompt. When permission is granted, PushManager.subscribe() creates a subscription associated with the service-worker scope. The record includes a unique endpoint, encryption material, and an authentication secret. The application stores the complete record on the server.
The endpoint is not a normal marketing identifier. It is a delivery address issued by a push service and tied to the browser subscription. Store it as sensitive data, isolate it by verified domain, and follow a documented Web Push subscription lifecycle when the browser or push service changes its state.
VAPID identifies the application server
VAPID uses an application-server key pair. The public key can be sent to the browser during subscription. The private key stays on the server and signs the authorization information used when sending. The VAPID key and rotation guide separates that identity from the per-subscription keys used to encrypt message content.
The service worker handles background events
A push event arrives in the service worker even when the site is not open in a foreground tab. The handler parses the expected payload and displays a visible notification. The Web Push service-worker implementation guide covers event lifetime, safe click handling, scope, and updates.
Service workers require a secure context. HTTPS is mandatory in production, while localhost is treated as trustworthy for development. Scope matters because a registration controls only the URLs within its scope.
The vendor push service is still in the path
A self-hosted dashboard can own subscriber storage, campaign logic, scheduling, and reporting. Delivery still travels through infrastructure chosen by the browser. The application server sends the encrypted payload to the endpoint in the subscription, and that push service communicates with the user agent.
Build the smallest complete system
- Verify one HTTPS domain and register one root-scoped service worker.
- Create a permission explanation tied to a direct user action.
- Store subscriptions with site ownership and lifecycle status.
- Send a test payload with a specific title, body, and destination.
- Handle notification clicks and permanent endpoint failures.
- Report attempted, accepted, rejected, clicked, and opted-out outcomes separately.
What to measure first
Count the people shown your explanation, the people who triggered the browser prompt, granted subscriptions, attempted deliveries, provider acceptances, permanent failures, clicks, downstream actions, and opt-outs. These stages reveal different problems. The push notification metrics framework defines the denominator and evidence boundary for each stage.
Primary technical references
A launch sequence that exposes failures early
Release one vertical slice before importing a large audience. Verify the production HTTPS origin, worker scope, VAPID key backup, subscription validation, a short encrypted payload, permanent-failure cleanup, and safe click destination. The implementation reference for the Web Push API and SDK provides the browser, worker, API, error, and security checkpoints for that slice. Send to a small internal device set across the supported platforms, then test with the browser open, backgrounded, and closed. Only after the same trace is repeatable should scheduling and bulk audience rules be enabled.
Document the boundary between a push-service acceptance and a user action. This keeps dashboards honest and gives support a shared vocabulary when a subscriber says a notification did not arrive.