Skip to main content

Web push: how visitors subscribe to notifications

How the Monfri script invites visitors and subscribes them — the banner, the window and the browser's question — what to install, consent, phones, and how to send once people subscribe.

M
Monfri Team
Updated ·3 min read

Web push lets visitors get notifications from your site in their browser — new products, a price drop, a cart they left — without giving an e-mail address.

How visitors subscribe

With the Monfri script on your site, there is nothing else to install:

  1. A few seconds after a visitor arrives, a small banner invites them — your title, message and two buttons, Allow and a decline button.
  2. Allow opens a small window on push.monfri.net, where the browser asks its own question: Show notifications?
  3. When the visitor agrees, the window closes and they are a subscriber.

The banner's words, colour, delay and the pages it shows on are yours to set: The opt-in prompt.

Because the browser's question is asked on push.monfri.net, your notifications show push.monfri.net as the site they come from, under your own title and icon.

On a site whose consent mode waits for consent, the banner waits for the visitor's marketing consent from your cookie banner; on a site with implied consent it shows right away. See Consent and cookies on your site.

Phones and browsers

Chrome, Edge, Firefox and Opera on computers and Android, and Safari on Mac, can subscribe. On iPhone and iPad, browsers allow notifications only to sites added to the Home Screen, so the banner does not show there.

Someone who clicked the decline button is not asked again for the number of days you set (7 by default). Someone who blocked notifications in the browser is not asked at all — only they can change that, in the browser's site settings.

A site without the Monfri script

Developers can add web push on its own: Push → Apps → the site → Setup Guide walks through the Push SDK, a file named push-sw.js at the root of the site, and a check. See Apps: one for each website.

After people subscribe

When a subscriber is also known in CDP — after they log in or order — the two are linked, so recipes can reach them by name.

If something doesn't work

The banner does not show

See When notifications do not work — most often the visitor already decided, the browser does not support it, or your site waits for marketing consent.

Didn't find your answer?

Write to us and tell us what you were trying to do.