Send your first Web Push

This article is in continuation of Web Push integration series. The first article can be accessed here which describes about configuring Web Push Settings and Web SDK integration.

On MoEngage Dashboard, navigate to Campaigns -> Push Campaign -> Create Campaign from the sidebar.

Step 1: Segmentation

Name the campaign, select target platform as “WEB” and define the campaign target audience - you can select "All users".

Once you start tracking website events/attributes, you can apply audience filters in this section to target specific set of users.

Step 2: Messaging

The various parts of the web push message are as below:

  • Message Title & Body: Enter the content as you wish to be displayed
  • Redirect URL: On notification click, the user will be redirected to this URL
  • Notification Dismiss: Option to auto-dismiss the message automatically after 20 seconds on Chrome Desktop. (Chrome/Firefox/Opera Push on Android does not auto-dismiss. Firefox/Opera Push on Desktop auto-dismisses after about 5 secs)

The push preview on the left side would enable you to see how the web notification would appear

Step 3: Scheduling & Goals

There are three ways you can time this campaign - Immediate (as soon as possible), Scheduled (at a future time) and Periodic (repeats after regular time interval).

Conversion Goal - Select App Opened in the "Select Event" dropdown. If required, you can read this article to track few events for setting conversion Goal.

All Done! Click on Create Campaign button, confirm in the dialog box and your campaign is created. You should see the notification even if your website is not open.

❗️

Before you take your website LIVE

In case you are taking your website live, do ensure -

  1. To pass debug_logs: 0 parameter in Moengage initialization in HTML code as mentioned below to send website data to LIVE environment on Dashboard (top toggle switch on Dashboard to right).
    app_id: "YOUR_APP_ID_GOES_HERE",
    debug_logs: 0
  2. To configure the Web Push Settings in the LIVE environment by switching to Live environment and navigate to Settings -> Channel -> Push -> Web Push. Read more about TEST/LIVE environment here

You can next proceed to track events/attributes. This will help you to send segmented notifications to avoid spamming and target only relevant users who did an event or share a common attribute (such as location).

You may also change the way Push Permission is asked on your webpage. There are three option which you can refer to in this article.

📘

Troubleshooting and FAQs

In case you are facing any issues, check out our Troubleshooting and FAQ section