Overview
On-Site Messaging (OSM) campaigns allow you to deliver personalized, in-the-moment messages directly on your website. Use OSM to engage users based on their behavior, page visits, or other in-session attributes. This guide walks you through setting up an OSM campaign in MoEngage.
Navigation
To create an OSM campaign, follow these steps:
- On the left navigation menu in the MoEngage UI, click Engage, and then click Campaigns.
- On the All Campaigns page, in the upper-right corner, click + Create campaign. The Create campaign pane appears.
or
You can also click + Create new from the left navigation menu. The Campaign pane appears. - Under Inbound, select On-Site. The On-site messaging campaign creation page appears.
Steps to Create an OSM Campaign
Creating an OSM campaign involves three main steps:
- Target users: Select the audience for your campaign.
- Define content: Create the message for your campaign.
- Schedule and goals: Configure when the campaign delivers and what actions to track.
Step 1: Target Users
This section allows you to define who sees your On-Site message and when they see it. It includes the following settings:
Campaign details
Use these fields to manage and identify your campaign:
|
Target platforms
Select the platforms where your campaign will appear:
|
Trigger criteria
Define when your On-Site message will display to users:
On page load
Select this option to show the message as soon as a page loads on your website.
- Immediately: Displays the OSM as soon as the page loads.
- After Delay: Displays the OSM after a specified delay (for example, 2 seconds after page load).
- After Scroll: Displays the OSM after the user scrolls a specified percentage of the website (for example, after scrolling 30% of the page).
On custom event
You can display On-Site messages when a user performs a specific custom event. Choose to send the message immediately or after a delay.
If user
The If user section allows you to select an event that triggers the message. You can add multiple events and attributes to refine the conditions.
To define events in the If user section:
- From the Select an Event list, select the event.
- To refine the event:
- Click + Attributes to add attributes to the filter.
- Select the logical drop-downs for the attribute (for example, "is equal to," "is not equal to").
- To add more attributes, click + Attributes button.
- Select AND or OR to combine conditions.
- From the attributes list, select the attributes and their logical drop-downs.
For example, if you select the User installs the app event, you can add an attribute called App Version to filter for users who installed a specific app version.
AND then
Use the AND then feature to combine multiple events for more precise targeting. For instance, you can select the On-site Message Clicked event and then use the AND then option to add the Added to Cart event.
With this setup, the On-Site message appears only to users who have clicked an On-Site message campaign at least once AND then added an item to their cart at least once.
You can also define the time to wait before the event in the Filter condition is evaluated. Setting this limit to 15 minutes means the user must perform the Filter event within 15 minutes of the first trigger event (for example, On-site Message Clicked).
- The maximum delay you can set is 24 hours, and the minimum delay is 1 minute.
If you click the + Filter button again, you can add another event to the trigger criteria. Choose AND to combine conditions, or OR to filter users if they perform any of the events within the time limit.
THEN
In the THEN section, under Trigger the message, select an option to define when to show the message:
- Immediately: The message displays as soon as the trigger criteria are met.
- After Delay: The message displays after a specified delay. For example, if you set a 2-second delay, the OSM will appear 2 seconds after the page loads.
info |
Information When you select After Delay, you can set a maximum delay of 1 day (86,400 seconds) and a minimum delay of 1 second. |
Trigger Criteria Summary: The Trigger Criteria Summary provides an overview of the selected trigger events and attributes, helping you easily understand the campaign's trigger logic.
On exit intent
Select this option to trigger a message when a user attempts to leave your website. For more information, refer to Exit Intent Technology.
Select pages
This section allows you to choose which web pages display the campaign. You can select one of the following options:
- All pages: The campaign displays on all website pages.
-
Specific pages: The campaign displays on specific website pages. You define which pages to show or hide the campaign on by setting URL rules.
To show or hide your campaign on specific pages using the URL path:
- Click Specific pages.
- Under If URL, select a condition from the Select Option list:
Conditions Explanation is The pop-up displays on specific URL(s) that match exactly. is not The pop-up displays on all URLs except those that match exactly. contains The pop-up displays on any URL that includes at least one of the specified texts or strings. contains (all of) The pop-up displays on any URL that includes all of the specified texts or strings. does not contain The pop-up displays on any URL that does not include any of the specified texts or strings. does not contain (all of) The pop-up displays on any URL that does not include all of the specified texts or strings. starts with The pop-up displays on any URL that begins with the specified text or string. ends with The pop-up displays on any URL that ends with the specified text or string. does not start with The pop-up displays on any URL that does not begin with the specified text or string. does not end with The pop-up displays on any URL that does not end with the specified text or string. - In the box next to the Select Option list, enter one or more URLs.
info Information
- You can manually add multiple URLs and keywords by pressing Enter.
- You can also copy and paste a list of URLs from a CSV file into the input box.
- Click + Filter.
- Select the And or Or operator, and then select a condition from the Select Option list.
- Enter the keywords in the box next to the Select Option list.
- To add multiple rules, repeat steps 4 through 6.
- To delete a specific rule, click the delete icon (
).
- Enter a URL in the Check page targeting box to verify it meets the defined conditions.
- Click Check.
-
- If the URL meets the condition, a Passed notification appears:
- If the URL meets the condition, a Passed notification appears:
-
- If the URL does not meet the condition, a Failed notification appears with error instructions:
- If the URL does not meet the condition, a Failed notification appears with error instructions:
Target audience
Use these segmentation filters to select your campaign's target audience:
This option sends the campaign to all app users. You cannot add multiple filters when using this option.
This option targets users based on properties such as first seen, last seen, or city. To use this filter:
- Select the desired attribute from the list. This enables filters specific to the chosen attribute (for example, numeric attributes have "is equal to," "is not equal to," "is between" conditions; string attributes have different filters).
- Provide the filter value(s) to create the user segment.
For more information, refer to Create Segments.
This option targets users based on their behavior or events, such as "app/site opened" or "viewed product." To use this filter:
- Select the execution condition and the desired user activity (event).
- Provide the event frequency and time duration.
- Click +Attributes and add an event attribute with a filter condition.
- Provide the filter value(s) to create a rule.
For more information, refer to Create Segments.
This option targets user groups based on an action they performed with a specific attribute value. To use this filter:
- Select the desired user event or attribute.
- Select a user affinity parameter from the following:
- Predominantly: Select an affinity attribute with a filter condition and provide the affinity values.
- Minimum of: Select an affinity attribute with a filter condition and provide the affinity values.
- Most no. of times: Type or use the arrows to specify the top or bottom percentage of users.
- Least no. of times: Type or use the arrows to specify the top or bottom percentage of users.
- Type or use the arrows to set the time duration for the event execution.
- Click Attribute to add more attributes to the filter.
This option allows you to select a Custom Segment as your target audience from a list of available segments. For more information, refer to Custom Segments.
info |
Information If you have the Portfolio feature enabled, you can create user segments by combining user data and behavior from different apps and websites (Projects) within your workspace. For more information, refer to Segmentation in a Multi-Project Portfolio. |
In-session attributes
In-session attributes allow you to group and target users based on their actions within their current website session.
For example, if a user is in India, you can show them a personalized pop-up created for Indian users. This helps deliver an immediate, personalized experience within the same session.
To add an in-session attribute, click + In-session attributes.
You can combine multiple in-session attributes and exclude users based on their in-session activity.
You can use the following in-session attributes with your On-Site campaign:
-
Query Parameter: Segment users based on URL query parameters. Typically, users would land on your personalized URL by clicking an advertisement on any Social Media platform
- You can use UTM parameters (Source, Medium, Content, Campaign) to segment users by traffic source.
- UTM parameters like
utm_source
andutm_campaign
help identify which campaigns drive users to your website. You can use UTM and custom parameters to segment users and personalize their website experience.
-
User Type: Segment users based on whether they are new or returning. The Web SDK stores user details (
unique_id
) in the browser. If these details exist, the user is returning; otherwise, they are new.- If the browser cache is cleared, the user is treated as new.
- If two users are using the same device and user 2 logs in after user 1, they would be considered a returning user.
- If a user logs in from a mobile browser and then from a desktop browser, the desktop login counts as a new user.
- Day of the Week: Segment users based on the day they visit your website.
- Time of the Day: Segment users based on the hour they visit your website. Choose from available one-hour slots.
- Geolocation: Segment users based on their geographic location (Country, State/Region, City). You can also exclude specific countries.
- Device Type: Segment users based on their device (Mobile, Desktop, or Tablet). You can include or exclude one or a combination.
- Operating System: Segment users based on their device's operating system (Android, iOS, Windows, Mac, Linux, or others). You can include or exclude one or a combination.
- Browser Type: Segment users based on their browser (Chrome, Safari, Firefox, Opera, or others). You can include or exclude one or a combination.
Campaign audience limit
This feature helps you control campaign reach and expenditure by capping the number of users who receive it based on engagement metrics like sends, impressions, and conversions. You can set total, daily, or instance-level limits for campaigns. For more information, refer to Campaign Audience Limit.
Control groups
Use these settings to exclude users in control groups from your campaign:
|
Click Next or use the tabs at the top of the Create Campaign navigation to move to Step 2.
Step 2: Define Content
You can create content for your OSM campaigns using two options:
- Create content with the new editor.
- Create content using the old editor.
The new editor offers the following template types:
-
Banner: Use banner templates to display information on your website as customers browse or perform actions.
- Show countdown timers.
- Display cookie information and request consent.
- Show notifications about sales and offers.
-
Nudge: Use nudge templates for non-intrusive messages that provide subtle information or calls to action.
- Show countdown timers.
- Add call-to-action information.
- Display notifications.
- Ask for subscriptions and opt-ins.
- Generate leads.
- Capture feedback during service/product delivery.
-
Popup: Use pop-up templates for intrusive communication to grab a user's attention.
- Display sales information and direct customers to relevant web pages.
- Request feedback from customers.
- Generate leads.
- Prevent customer churn.
Template Type | When to use it |
---|---|
Popups | Use for intrusive communication. |
Nudges | Use for non-intrusive communication. |
Banner at the Top | Use to show offers at the top of the page. If the Push the contents of the page down option is enabled and headers are not sticky, these banners will move page content down without overlapping. |
Banner at the Bottom | Use to display policy information or seek consent at the bottom of the screen. These banners cover the entire width of the screen and overlap with content while remaining non-intrusive. |
You can create your On-Site message using a blank template or choose from available templates for each type. You can search for a template or click on your preferred template.
- Blank Template: To create a pop-up template from scratch, hover over Blank Template and click Popup. Click the + icon to open the editor and add elements. For more information, refer to OSM Editor.
- Other Templates: The following template types are available: Offers and Announcements Templates, Lead Generation Templates, and Typeform Survey Templates. For more information, refer to OSM Templates.
Once you select a template, it loads in the OSM editor. The following options are available:
-
Add elements: Add elements to the template by clicking the
icon on the left pane of the editor.
-
Editing/Styling Options: Click the
icon at the top right corner of the template to add styling elements:
- Display Close Button: Specify whether a close button is available for users to dismiss the message. The close button is displayed by default. You can hide it by turning off the toggle.
-
Background Image/Filters: Add background images to the message. Click the
icon to upload an image. Use the Filters tab to apply filters to the image.
-
Background Color: Add a background color to the message. The background is black by default. Click the
icon and choose a color.
-
Popup positioning: Move the pop-up horizontally and vertically.
- To move the pop-up horizontally, click the
icon and position it at the top, middle, or bottom of the webpage.
- To move the pop-up vertically, click the
icon and position it to the left, center, or right of the webpage.
- To move the pop-up horizontally, click the
-
Customizing the width and height of the popup: Click the
icon and specify the width and height.
-
Adding CSS options to the popup: Add custom CSS for tailored styling. Click the
icon, then click the
icon to add CSS code and custom attributes.
-
Preview Options: Click the
icon on the left panel to preview your template.
- Desktop: Shows how the template appears on a desktop browser.
- Tablet: Shows how the template appears on a tablet browser.
- Mobile: Shows how the template appears on a mobile browser.
You can create your On-Site message from the available templates. For more information, refer to On-Site Messaging Templates (Old Editor).
Display settings
The following options are available:
Display Setting | Template Type | Description |
---|---|---|
Show this campaign if another campaign is already displayed on the webpage | Popups, Nudges, and Banners | If selected, this OSM campaign displays even if another OSM is already on the page. For this to work, the events triggering the OSMs must be different. |
Push the contents of the page down | Banner | If selected, the banner occupies space at the top of the website without overlapping existing content. This requires the banner to be positioned at the top and the website's headers to be non-sticky. |
Test campaigns allow you to preview your campaign on a test URL to ensure your On-Site message displays as intended. Enter a test URL and click Test to preview the message. For more information, refer to Testing your OSM Campaign.
Step 3: Scheduling and Goals
This section allows you to configure when your campaign will deliver and what actions you want to track:
- Delivery Schedule: Choose when the campaign delivers to your users.
- Conversion Goals: Select conversion goals and revenue metrics to track for the campaign.
- Campaign Priority and Delivery Controls: Set the campaign's priority and configure delivery options like auto-dismissal, minimum delay between notifications, and message frequency.
Delivery schedule
The following delivery schedule options are available for OSM campaigns:
Choose this option to send the campaign immediately or at a specific date and time.
Field | Action |
---|---|
As soon as possible |
Send the campaign immediately to your target users. Options include:
|
At a particular date and time |
Send the campaign on a specific date and time, with options for time zone and prediction:
|
Choose this option to send the campaign periodically on specified dates and times. The following fields are available:
- Campaign time zone: Select the time zone for campaign delivery.
- Start date: Select the date when the campaign should begin.
- Send time: Select the time (for example, 14:00) for campaign delivery.
-
Periodic: Select the campaign's periodicity:
Periodicity Description Daily Repeat every: Specify the number of days after which the campaign should repeat.
Weekly Repeat every: Specify the number of weeks for which the campaign should repeat.
Repeat on: Select the day(s) of the week for campaign delivery (for example, Monday, Wednesday, and Friday).
Monthly Repeat every: Specify the number of months for which the campaign should repeat.
Repeat on: Choose from the following options:
-
Days of month: Select specific dates of the month for repeating campaigns (for example, 5th and 25th).
Note: If the selected date does not exist in a shorter month (for example, February 30th), the campaign sends on the last day of that month (for example, February 28th).
-
Days of week: Select specific days of the week for campaign delivery (for example, every Monday, Wednesday, and Friday).
Note: If a selected day of the week does not exist in a month (for example, fifth Saturday), the campaign will be skipped for that instance. If there is an overlap (for example, 4th Monday and last Monday), only one instance will be sent.
-
Days of month: Select specific dates of the month for repeating campaigns (for example, 5th and 25th).
-
Ends: Select the date when the campaign should end:
- Never: The campaign runs daily.
- On: The campaign ends on the specified End Date.
-
Campaign active window: Defines the time duration during which the campaign is active for the set periodicity.
- Start time: The time when the campaign will trigger for the user.
- End time: The time after which the campaign will not display to the user, regardless of its active status for the day.
Conversion goals
Add up to five conversion goals to track business metrics for your campaigns. You can choose any app event as a conversion goal activity. The first goal you set becomes the primary goal.
For example, if you want to track how many customers purchased an iPhone after your campaign, your conversion goal setup might include:
- Goal Name: iPhonePurchase
- App Event you wish to track: Made Purchase
- Event Attribute/Property: product is an event attribute/property
- Value of Event Attribute/Property: iPhone
With multiple conversion goals, you can track more than one business metric or visualize a user action funnel. For example, you can track:
- How many users viewed the product page.
- How many of them added that product to their cart.
- How many of them successfully completed an order.
MoEngage allows you to track revenue generated by your campaigns. To track revenue performance, enable the Revenue Performance toggle for the desired conversion goal.
For example, to track revenue for orderSuccessful events, enable the Revenue performance toggle. After choosing the goal, select the numeric attribute that captures the order's total monetary value (for example, cartValue). You can also choose the currency in which your monetary value is reported. |
After selecting the goal, choose the numeric attribute that captures the total monetary value of the order. In the example, cartValue contains the total order value. You can also choose the currency in which your monetary value is reported. |
Set Attribution window: Define the time period after a user receives the campaign during which conversion goals are attributed to that campaign. The default is 36 hours. For example, if you set it to 5 hours. |
Campaign priority and delivery controls
This section contains the following options:
- Campaign Priority: Set one of the following priorities: Critical, High, Medium, Normal, and Low. If a user is eligible for two campaigns simultaneously, the one with higher priority displays. If both have the same priority, the most recently created campaign displays first.
- Global Delivery Control: Enable this toggle to ignore the global minimum delay settings for the On-Site Messaging channel.
-
Local Delivery Controls: These options specify delivery controls specific to this campaign:
- Maximum times to show a message: Define how many times a user can see the On-Site message from this campaign. MoEngage tracks this using the On-site Message Shown event in the user's profile. For example, if you publish a campaign with this option off and later set it to "one time," users who already saw the message before the edit will not see it again.
- Minimum delay between 2 messages on this campaign: Set the minimum time gap between two On-Site messages from the same campaign.
- Auto dismiss message after 'x' seconds: Specify the time after which the On-Site message will disappear from the URL.
Your campaign is now ready. Click Publish and confirm in the dialog box to create the campaign.
Once you successfully create the campaign, the Campaign Info page displays.
FAQs
Integrating custom fonts into your OSM templates enhances visual appeal and maintains brand consistency. Follow these steps to use custom fonts:
1. Host your font file
Ensure your custom font file is hosted on a secure domain or a publicly accessible URL. For example: https://yourdomain.com/fonts/yourfont.ttf
For demonstration, use this Roboto font link: https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2
Clicking the URL should start a download, confirming the font file is hosted correctly.
2. Prepare your template
Select the template you want to customize within OSM Pro.
3. Modify text settings
- Click the text element where you want to apply the custom font:
- Click the settings icon (
), then select the styling icon (
).
- Switch to the Advanced tab.
- In the CSS Id field, enter a unique identifier, such as
text_id1
.
- Close the settings menu after adding the identifier.
4. Add an embed element
Insert an embed element into your template. This element will not be visible to users; it only modifies the font style within the template.
5. Insert custom font code
Click the previously added embed element and input the following CSS:
<style type="text/css">
@font-face {
font-family: 'customfont';
src: url('https://yourdomain.com/fonts/yourfont.ttf'); /* Your font URL */
}
#text_id1 p {
font-family: 'customfont' !important;
}
</style>
This code imports your custom font named 'customfont' from a specified URL and applies it to paragraphs within the element with ID #text_id1
, ensuring the custom font is used regardless of other styles.
6. Customize additional elements
To change the font for other elements, such as buttons:
- Assign a unique ID to the button, for example,
button_id1
. - Modify the CSS code to include the button ID:
<style type="text/css">
@font-face {
font-family: 'customfont';
src: url('https://yourdomain.com/fonts/yourfont.ttf');
}
#text_id1 p, #button_id1 span {
font-family: 'customfont' !important;
}
</style>This CSS code defines a custom font named 'customfont' loaded from a specified URL and applies it to text within elements identified by
#text_id1
and#button_id1
, ensuring the custom font is used regardless of other styles.
7. Preview and publish
After adding the CSS, preview your template to confirm the font displays correctly. Once verified, you can publish your campaign.