Create On-site Messaging

Introduction to On-site Messaging:

On-site Messaging enables MoEngage end users to show PopUps, Banners and other such messages on your website. With MoEngage On-site Messaging, create highly contextual campaigns for your website visitors (both Anonymous and Logged In users)

Integration Essentials for On-site Messaging:

We have launched this product in closed beta on 19th Nov '18. To signup for On-site Messaging, you need to get it enabled for your MoEngage account. To do so, reach out to your customer success manager or send an email to with your account name.

Ensure that you are on default billing plan of MoEngage so that you can target all your website visitors (ones who subscribed for push and ones who did not)  

Where to find On-site Messaging on MoEngage Dashboard:

Once On-site Messaging is enabled for your MoEngage account, you would be able to see this module on the dashboard -

Campaign Creation

From left side menu bar, Navigate to:  Campaign -> Create Campaign -> Onsite Messaging -> Create On-site Messaging Campaign




Campaign Listing:

Navigate to: Campaigns -> All Campaigns Page 

On the All Campaigns Page, search for campaign type - "On-site Messaging" 


How to create an On-site Messaging Campaign?

After you click the CREATE button for On-site Messaging (Create Campaign -> Onsite Messaging -> On-site Messaging -> CREATE), follow the below steps -

Template Selection

Before you start configuring the campaign, select the type of template you want to use which you can customize completely using our HTML Editor (available on Step-2 of campaign creation).

As of now, we have about 11 out of the box templates for quick use -


These templates can be customized using our editor on Step-2 of campaign creation.

In addition to using our HTML editor to customize these templates, you can completely change / update the HTML code of this template and use something which you have internally developed.

Few templates like Lead Gen and Survey are special templates and you can read the template specific docs for more information on these templates.


Step-1: Segmentation

On the first step, you need to define the below fields -

Campaign Name:

Specify a unique campaign name which has a length between 5-50 characters. 


Specify the platforms between web and mobile web which you want to target for this on-site messaging campaign.



Select Trigger Action:

Select the trigger action based on which the campaign will be triggered for your users.

  • Page Load: There are 3 additional options here - 
     - As soon as possible : Choose this option if you want to trigger the message as soon as the user has completed page load on your website
     - With a delay of __ sec : Choose this option if you want to trigger the message, 30 seconds after the user has completed page load on your website
     - After scrolling the page by __ % : Choose this option if you want to trigger the message
    after the user has scrolled a page on your website by 40%.

  • Custom Event: Choose this option if you want to trigger the message when the user executes a custom event you have tracked on MoEngage. Select a custom event which the user executes on your website. You can also specify additional attribute checks for trigger a message when user executes an event.
    For example. Trigger a message after the user has executed Purchase where "Brand" is "Brand1"


  • Exit Intent : Choose this option if you want to trigger a message when the user is trying to exit your website. For more information on Exit Intent Technology, refer this article.

Select Pages:

Select the webpages on which you want to show/hide this on-site messaging campaign. By defining rules on the URL, you could choose to only include a certain set of URLs or exclude a certain set of URLs. If you want to show a campaign on all pages irrespective of the URL, you just need to select the All Pages option here -


Select Audience:

Select the users who should be included in this segment. There are 2 ways to go about it  

  • All Users: Select this option if you want to target all users of your website via this campaign. This option also needs to be selected in case you want to deliver content to first time visitors.
  • Custom Filters: Select this option if you want to target specific visitors. You can choose custom filters to define your audience based on User Behavior, User Properties or Custom Segments (pre-defined segments)


Once you have defined the above fields on Step-1 of campaign creation, please click NEXT to move to Step-2


Step-2: Create View

On the second step, you need to configure the Template or upload you own template (based on the selection on Template Selection Screen before Step-1)

Customize Template Template:

We have used standard HTML editor to support Template customization in our campaign creation.


You can also upload images or provide an image URL as applicable as shown below - 


For personalizing your text or image URL, you can key in @ in the text box or image URL box and the personalization pop-up will open up where you can define personalization rules. A sample is shown below -


You can also customize the background color of your templates by choosing the container widget and changing the background color as shown below -


For Sticky Banner templates, you can also select the position of the templates by going to Container -> Position. Only the available positions will be listed here. Choose the one as required for your use-case.


Few things to note while creating campaigns using your own HTML templates or customizing the HTML code of moengage templates.

You can click on the code view button to view the HTML code view and make changes there as required. Please note that you need to select the appropriate template like top banner, pop-up, side banner and then customize the HTML for best possible usage.


When building your own HTML templates, please note that you need to add the below classes for tracking clicks and for allowing your users to close the template - 

- For close button: Add this CSS class in your templates:   moe-inapp-close
Adding this class is very essential if you want the user to be able to close the template. MoEngage SDK will only close the template if this class is found.
Please note that the template will be closed only basis the moe-inapp-close CSS class. Please do not use custom Javascript functions for closing the templates as it will result in an inconsistent behavior.

- For tracking clicks : Add this CSS class in your template:  moe-inapp-click
Adding this class is very essential for MoEngage to be able to track clicks and attribute this to a particular campaign.

- For closing the template when the user clicks on a CTA or a link, add both the classes: moe-inapp-close and moe-inapp-click to the HTML template. This will ensure that the template is closed after the user is redirected to the URL.

Display Settings

These are advanced display settings which are used to define how the message will be displayed.

For Pop-up templates. below display settings are available -

1. Show this message if other campaign is already displayed on the webpage: This means that if a template is already visible on the website and the user executes another trigger action, we will show this campaign on top.
2. This message will allow the user to scroll through the page: Select this if you want to scroll the contents of your webpage in the background.

For Banner templates, below display settings are available -


1. Show this message if other campaign is already displayed on the webpage:  This means that if a template is already visible on the website and the user executes another trigger action, we will show this campaign on top.
2. Keep this message in place on scroll: This message will continue to be visible even after the user scrolls through the website.

3. This message will push the contents of the page down: Use this option only for Top Banners where you want to push the contents of the page down.

Test Campaign

To test how the message will be rendered on your website, enter the destination URL where you have already integrated the 

We recommend you to test every new campaign on your destination URL so that you can ensure the look and feed of the template. By default test campaigns override Display Settings and Delivery Controls.



Step-3: Scheduling

On the third step of campaign creation, you need to define the campaign scheduling, conversion goals, priority and delivery controls which will be useful for campaign sending. Here is how to configure these fields-

Campaign Timing:

Define the campaign Start and End time of this campaign. Outside these bounds, the campaign will be inactive and will not be served to your website users.



Conversion Goals:

Define the conversion goal for your campaigns which will help evaluate the performance of your campaigns. Conversion Tracking works in the same way as other campaign types on MoEngage dashboard.
You can define up to 5 different conversion goals for a single campaign.


Campaign Priority:

Define the priority of your campaign. This priority will be used in case there are multiple campaigns eligible for the same user.

Campaign priority is useful when there are multiple active campaigns on the same trigger action for the same user. The campaign with higher priority will be shown to the user. If two campaigns have the same priority, the recently created campaign will be shown first. 


Delivery Controls:

Delivery Controls are used to control the delivery of messages. It is important that restrictions are put while delivery on-site messaging so as to avoid spammy behavior which results in the same message being shown constantly to the same users.

We have below 4 controls in place to handle this -

Maximum times to show the message ever- Define the maximum number of times, the user can see a message from this campaign in case 

Minimum delay between 2 messages of this campaign - Define the minimum time within which the user will not be shown this message even if the user qualifies for the campaign segment and executes the trigger action.

Ignore global delay between 2 On-site Messaging campaigns - Chose this option if you want this campaign to override the global delay restriction.

Global Delay: This is a global settings which is enforced on all On-site Messaging campaigns. If you have defined Global Delay as 15 minutes then it means that only 1 On-site Messaging campaign can be shown within 15 minutes. You can define time for the Global Delay here

Auto dismiss message after - Choose this option if you want the message to disappear automatically after 60 seconds.


Turning OFF Delivery Controls will ensure that this campaign is shown every time the user is eligible for the campaign - falls in the segment, satisfies the display settings and executes the trigger action.


Was this article helpful?
11 out of 13 found this helpful