Web Push Popup

Web Push Popup

To send web push notifications, the client website must be configured to show the popup. The pop-up appears when the customers navigate to the website. When the customers accept to receive web push notifications, a service worker is created in the browser's background. The service worker constantly listens to the push messaging server and shows the notification even when the website is closed.

📘

Private Browsing Mode

Web push notifications are not supported in private browsing mode.

Sample NotificationsSample Notifications

Sample Notifications

📘

Option to download SDK initialization config file from web app asset configuration page

The JavaScript SDK will have a single file containing all configurations required to initialize the SDK.

Web push notifications are supported on the following OS and browsers:

OS

Chrome

Firefox

Safari

Windows Desktop (Version 7 ,8,10)

Yes

Yes

No

Mac OS X 10.11 (EI Captain)

Yes

Yes

Yes

Linux (Fedora 24)

Yes

Yes

No

iOS (9.x)

No

No

No

Android (5.x)

Yes

No

No

For example, to show the web push popup on loading the index.html page, copy the below code and paste it in header or body of your index.html page. Replace the appId with the id that is generated in imiconnect for the web application.

Now the web push configuration is complete to display a popup when the default web page is loaded.

  1. When the web page is loaded a popup appears. When a user clicks on Allow, unique ids are generated and stored in the profile manager. The ids generated are:

Browser

IDs

Chrome

chrome_pushid

Firefox

firefox_pushid and key

Safari

safari_pushid

  1. To send messages without a customerid, you must use browser-specific pushids.

Sending Push Messages to Customers

You can send push messages to customers in many methods. Below is one of them:

  1. When the customers click Allow button, the push details are stored in the profile manager.
  2. Get the profiles based on appid using getAppProfile API. You will get all the browser-specific push ids.
  3. Use Messaging API, to send push messages to the push ids.