Understanding the Subscriber Life Cycle

Understanding the Subscriber Life Cycle

This guide explains how web push subscribers are created, tracked, categorized, and automatically maintained by HyperPush X.


🔄 The Life Cycle Flow

A subscriber moves through several distinct phases:

graph TD
    A[Visitor on Website] -->|Grants Permission| B(Active Subscriber)
    B -->|SDK Tagging| C(Segmented Audience)
    B -->|Receives Campaign| D{Delivery Check}
    D -->|Success| B
    D -->|410 Gone / 404 Not Found| E[Expired / Bounced Status]
    E -->|Re-visits & Opts-in| B

1. Opt-In & Registration (Active State)

When a visitor arrives at your website and grants push permissions (either via the native prompt or your custom opt-in banner):

  • The browser security sandbox generates a unique Push Subscription Endpoint and encryption keys (p256dh, auth).
  • The SDK registers this payload to our servers via /api/sdk/subscribe.
  • The subscriber is saved in the database with an Active status.

2. Metadata Cataloging & Segmentation

Once active, the SDK automatically detects and saves details about the subscriber's environment:

  • Operating System & Browser: Used to format the push payload correctly (e.g., handling Safari home-screen rules).
  • Geo-location & Language: Extracted from browser headers to support locale targeting.
  • Custom Tags: Added programmatically (e.g., HyperPush.setTag('level', 'pro')) for personalized targeting.

3. Campaign Broadcasting

During campaign broadcasts, HyperPush X encrypts the message payload and dispatches it to the browser vendor's Push Server (e.g., Google's FCM, Mozilla's Autopush, or Apple's Web Push Service).


4. Token Expiration & Bouncing (Expired State)

If a user revokes notifications inside their browser settings or clears their browser profile, subsequent push delivery attempts will fail.

  • The browser push server responds with 410 Gone or 404 Not Found.
  • Our background queue system detects this response and flags the subscriber as Expired (stored as bounced in the database).
  • Expired subscribers are automatically excluded from future campaign runs to keep your delivery rates high and avoid queue delays.

5. Re-Subscription Recovery

If a previously expired subscriber visits your website again and clicks the opt-in banner, the SDK registers their new valid browser token. This automatically updates their status back to Active, restoring their subscription.