Skip to main content

Web Push Configuration

This guide walks you through configuring the Web Push channel for your app.

Prerequisites

  • An app must be created first
  • The app should have a Site URL set

Accessing Web Push Configuration

  1. Navigate to Apps and select your app
  2. Click on Channels
  3. Click Configure on the Web Push card (or Settings if already configured)

Accessing the Web Push channel configuration from the OCM Pulse app dashboard

Configuration Options

Permission Prompt Settings

These settings control when and how users are asked to subscribe.

Auto Prompt

When enabled, the permission prompt automatically appears after the configured delay.

SettingDescriptionRange
Auto Prompt EnabledShow prompt automaticallyOn/Off
Prompt DelaySeconds to wait before showing0-300 seconds
Page Views Before PromptNumber of pages user must visit first0-100

Recommendations:

  • Set a delay of 5-10 seconds to let users engage with your content first
  • Consider requiring 2-3 page views to ensure engaged visitors

Custom Prompt Text

Optionally provide custom text for the permission prompt (max 255 characters).

Subscription Retry Settings

These settings help recover users who initially decline notifications.

SettingDescriptionDefault
Enable RetryRe-prompt users who declinedOn
Max AttemptsMaximum retry attempts (1-5)3
1st Retry AfterDays before first retry3 days
2nd Retry AfterDays before second retry7 days
3rd Retry AfterDays before third retry30 days

Configuring automatic subscription retry intervals in OCM Pulse

How it works:

  1. User declines the permission prompt
  2. System waits for the first retry interval
  3. On their next visit after that time, prompt appears again
  4. This continues until max attempts reached or user subscribes

Welcome Notification

Send an automatic notification when a user first subscribes.

SettingDescription
Enable Welcome NotificationTurn on/off
Welcome TitleNotification title (max 100 chars)
Welcome MessageNotification body (max 255 chars)
Welcome URLURL to open when clicked (optional)

Setting up an automated welcome notification for new subscribers

Example:

  • Title: "Welcome!"
  • Message: "Thanks for subscribing. You'll receive our latest updates."
  • URL: https://yoursite.com/thank-you

Default Notification Assets

Upload default images used in notifications when not specified individually.

Default Icon

The main notification icon displayed next to the notification.

RequirementValue
Dimensions256×256 pixels
FormatPNG, JPG, or JPEG
Max Size2 MB

You can upload a file or provide a URL. If using a URL, the image must be exactly 256×256 pixels.

Default Badge

A smaller icon shown in the Android status bar.

RequirementValue
Dimensions96×96 pixels
FormatPNG, JPG, or JPEG
Max Size1 MB

Configuring global default icons and status bar badges in OCM Pulse

tip

Use a monochrome or simple icon for the badge as it appears very small.

GDPR CMP Timeout

If your site uses a Consent Management Platform (CMP) for GDPR compliance, the SDK integrates with it automatically:

  1. It waits for an IAB TCF v2 (__tcfapi) or legacy (__cmp) CMP to become available on the page.
  2. Once the CMP is available, it inspects the gdprApplies flag:
    • false → the user is outside the GDPR scope, and the SDK proceeds immediately.
    • true → the SDK waits indefinitely for the user to grant Purpose 1 (Storage) consent. If consent is refused the SDK halts — no subscription is created.
  3. If no CMP shows up within the timeout window below, the SDK errors out rather than subscribing without consent.
SettingDescriptionRange
CMP TimeoutSeconds to wait for a CMP to become available1-60 seconds (default: 10)
tip

If your site does not have a CMP at all and does not need one, ask support about enabling the skipConsentCheck flag on your app — otherwise every initialization will timeout waiting for a CMP.

Service Worker Configuration

Advanced settings for the service worker file location.

SettingDescriptionDefault
Service Worker PathPath to the worker file on your server/ocm-push-worker.js
Service Worker ScopeScope of the service worker/
warning

Only change these if you have a specific reason. Incorrect settings will prevent push notifications from working.

Saving Configuration

Click Save to apply your settings. After saving:

  1. You'll be redirected to the Installation page
  2. The SDK will be rebuilt with your new configuration
  3. New SDK files will be available for download

Advanced Prompts

For more control over how users are prompted, see Permission Prompts.

Next Steps

After configuring:

  1. Install the SDK on your website
  2. Configure advanced permission prompts (optional)
  3. Test your integration