Web push is available on the Pro and Enterprise plans. Push subscribers never count toward your contact limit or your bill, and there is no cost per notification.
Set up web push
1
Generate your keys and list your sites
Go to Settings → Web push. Enter the sites that may ask visitors for permission, one per line (for example
https://shop.example.com). Your workspace website from Settings → General is always allowed. Choose Set up web push. InstantCampaign generates your workspace’s signing keys (VAPID). The private key is stored encrypted and is never shown.2
Put the service worker on your site
Download
ic-push-sw.js from the link in the install guide and serve it from the root of your site, for example https://shop.example.com/ic-push-sw.js. Browsers only deliver notifications to a worker on the same site as the page, so it cannot be loaded from InstantCampaign. If you serve it from another path, enter that path in the push prompt’s settings.3
Optional: add a web app manifest
Safari on iPhone and iPad only shows web push for sites added to the Home Screen, which needs a web app manifest. Start from the template in the install guide, change the name and icons, and link it from your pages with
<link rel="manifest" href="/manifest.webmanifest">.4
Create a push prompt
Go to Forms, create a form and choose the Push prompt display type. Write the message and the button labels visitors see. Use the targeting rules (pages, delay, scroll depth, exit intent, how often) to decide where and when the prompt appears.
5
Add the prompt to your pages
Copy the prompt’s
popup.js script from the form or from Settings → Web push into every page where it may appear.How visitors opt in
The prompt asks in two steps. Visitors first see your card with Allow and Not now. The browser’s own permission dialog opens only after they choose Allow. A visitor who declines in the browser is not asked again by the browser. After someone subscribes, InstantCampaign tries to match the browser to a contact:- they arrived from a tracked link in one of your emails;
- their visit was already identified;
- they later submit any of your forms on that site.
Send push from an automation
Add a Send push step to an automation. Enter a title, a text, the link that opens when the notification is clicked, and an optional icon. You can personalise the text with{{first_name}}, {{last_name}}, {{company}} and {{workspace_name}}, each with an optional fallback such as {{first_name|there}}. Email addresses are never offered, because notifications appear on lock screens.
You can also add:
- an image (an https address): a large picture under the text, shown by Chrome and Edge;
- one button with its own label and link, shown before Notification settings. A button needs both a label and an https link;
- Keep on screen until dismissed: desktop Chrome and Edge keep the notification until the person closes it.
Send push with a campaign
On a campaign page, turn on Also send as push. The title, text and link start from email 1’s subject, preheader and main button, and you can edit them. The notification goes out with each batch of emails, after the email, to the contacts in that batch who have a live push subscription. There are no stand-alone push campaigns.When the visitor is on your site
If a notification arrives while someone has your site open and in view, and the page carries the push prompt’spopup.js script, it appears as a card on the page instead of a system notification. The card uses the prompt form’s accent colour and position (bottom right for a centred prompt) and shows the title, text, icon, image and button, a close button and a Notification settings link. Clicking the card or its button opens the link in a new tab and counts as a click.
In the push prompt form’s settings, Show on the site as a card turns this off (the system notification is then always shown) and Card stays for (seconds) sets how long the card stays (0 keeps it until the visitor closes it; default 8).
Browsers sometimes renew a subscription without telling the site. On every page load, and again whenever the visitor returns to the tab, the prompt script checks that the subscription InstantCampaign holds is still the browser’s current one and sends the new one when it changed, keeping it attached to the same contact. The service worker does the same when the browser reports the change itself, so notifications keep arriving.