Web Push Opt-Ins

Overview

Web Push Opt-Ins allow users to grant permission to receive push notifications from a website. When users opt-in, they subscribe to messages that can be sent even when not actively browsing the website. This is a powerful tool for engaging users with timely updates, promotions, and alerts directly on their desktop or mobile browsers.

🚧

Prerequisites for Running Web Push Notifications

Before you can start sending Web Push Notifications, ensure you complete the following steps:

  • Configure Web Push Notifications: Set up the necessary configurations to enable web push notifications on your website.
  • Create a Web Push Message: Design and compose the message you want to send to your users.

Configure Web Push Notification

Follow the steps given below to configure Web Push Notification.

  1. Navigate to Assets > Web. Click on View/Edit for the website where Web Push Notifications will be enabled.
  2. Enable Browser Push Notification depending on whether your domain is HTTP or HTTPS.
  • HTTP: A two-step opt-in process is required. You must add a subdomain because Web Push Notifications require an HTTPS domain.
  • HTTPS: No subdomain input is necessary.

Configuration options differ between Chrome and Safari, supporting single and two-step opt-in processes.

1197

Enable Browser Push Notification

  1. Provide the FCM details to enable Web Push Notifications in Chrome and Mozilla:
  • Authorization Key
  • API Key
  • Sender ID
  • Project ID
  • App ID

Configure APNS details (Push Certificate and Intermediate Certificate Password) to enable Web Push Notifications in Safari.

📘

Note

  1. Click here to Get Started with FCM(Firebase Cloud Messaging) and for FCM details.

  2. Once FCM details have been added, a sw.js file is to be put in the Javascript. Click here for details.

  3. For APNS details, contact [email protected].

  4. For APNs, post-safari 12.1 update, double opt-in is mandatory irrespective of whether domain Http or https. User interaction is mandatory for opt-in to be shown. Hence the secondary opt-in in case of two-step opt-in acts as user interaction.

A Firebase Cloud Messaging (FCM) private key file is a credential that authenticates Netcore's server with Google's FCM service. It enables the Netcore server to securely send push notifications to client apps (users) that have subscribed to them.

Add private key

Add private key

Creating Web Push Message

Single Opt-in

Configure Overlay color, transparency, and help text for the single opt-in

Single Opt-In

Single Opt-In

Double Opt-in

This option allows you to customize the Opt-In message, including its Layout, Appearance, and Placement on the website.

Double Opt-In

Double Opt-In

Opt-In Rules

Configure opt-in rules to show the opt-in message only after the user has satisfied the set conditions.

Opt-in rules consists of the following things -

  1. Page URL
  2. Scroll Percentage
  3. Time spent on Page
  4. Time spent on the website in the current visit
  5. Repeat Subscription Prompt
Opt-In Rules

Opt-In Rules

👍

Note

  1. Head over to the Web Integration Doc if Web Integration and Activity Tracking configuration not done.
    This is required in Order to Publish Web Push and to track the events accordingly.

  2. In case of any queries, please contact [email protected]