Create OSM Campaign

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:

  1. On the left navigation menu in the MoEngage UI, click Engage, and then click Campaigns.
    Screenshot 2025-09-22 at 5.04.11 PM.png
  2. On the All Campaigns page, in the upper-right corner, click + Create campaign. The Create campaign pane appears.
    Screenshot 2025-09-22 at 5.48.54 PM.png
    or
    You can also click + Create new from the left navigation menu. The Campaign pane appears.
    Screenshot 2025-09-22 at 5.51.33 PM.png
  3. Under Inbound, select On-Site. The On-site messaging campaign creation page appears.
    2025-09-22_17-42-54.png

Steps to Create an OSM Campaign

Creating an OSM campaign involves three main steps:

  1. Target users: Select the audience for your campaign.
  2. Define content: Create the message for your campaign.
  3. 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:

  • Campaign name: Enter a name for the campaign. The name must have at least five characters and a maximum of 256.
  • Campaign tags: Select up to five tags from the list to categorize your campaign. For more information, refer to Campaign Tags.
Campaign_Details_OSM.png

Target platforms

Select the platforms where your campaign will appear:

  • Web: Select this option to target your website.
  • Mobile Web: Select this option to target your mobile website.
OSM_TargetPlatforms.png

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).

OnPageLoad.png

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.

custom event on-site.png

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:

  1. From the Select an Event list, select the event.
  2. 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.

multiple trigger attributes.png

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.

and then.png

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.

OnExitIntent.png

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.

    Screenshot 2024-11-07 at 12.54.46 PM.png

To show or hide your campaign on specific pages using the URL path:

  1. Click Specific pages.

    WhatsApp Image 2024-11-12 at 3.53.09 PM.jpeg

  2. 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.
  3. In the box next to the Select Option list, enter one or more URLs.Screenshot 2024-11-14 at 1.36.28 PM.png
    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.
  4. Click + Filter.
  5. Select the And or Or operator, and then select a condition from the Select Option list.
  6. Enter the keywords in the box next to the Select Option list.
    Screenshot 2024-11-14 at 1.33.11 PM.png
  7. To add multiple rules, repeat steps 4 through 6.
    Screenshot 2024-11-14 at 1.39.42 PM.png
  8. To delete a specific rule, click the delete icon (delete icon.png).
  9. Enter a URL in the Check page targeting box to verify it meets the defined conditions.
  10. Click Check.
    • If the URL meets the condition, a Passed notification appears:Screenshot 2024-11-14 at 1.32.30 PM.png
    • If the URL does not meet the condition, a Failed notification appears with error instructions:Screenshot 2024-11-14 at 1.42.27 PM.png

Target audience

Use these segmentation filters to select your campaign's target audience:

All Users Filter by User Property Filter by User Behavior Filter by User Affinity Filter by Custom Segment

This option sends the campaign to all app users. You cannot add multiple filters when using this option.

TargetAudience_OSM.png

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:

  1. 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 and utm_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.
  2. 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.
  3. Day of the Week: Segment users based on the day they visit your website.
  4. Time of the Day: Segment users based on the hour they visit your website. Choose from available one-hour slots.
  5. Geolocation: Segment users based on their geographic location (Country, State/Region, City). You can also exclude specific countries.
  6. Device Type: Segment users based on their device (Mobile, Desktop, or Tablet). You can include or exclude one or a combination.
  7. 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.
  8. 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.

image (2).png

Control groups

Use these settings to exclude users in control groups from your campaign:

  • Enable the Global control group toggle to exclude users in the global control group from the campaign's target segment.
  • Enable the Campaign control group to exclude a fixed percentage of users in this campaign from the target segment. Specify the percentage of users to exclude in the box below the toggle.
  • For more information about control groups, refer to Control Groups.
ControlGroup.png

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:

  1. Create content with the new editor.
  2. Create content using the old editor.
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 AddElement_Icon.png icon on the left pane of the editor.
  • Editing/Styling Options: Click the Options.png 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 UploadImage.png 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 BGIMage.png icon and choose a color.
    • Popup positioning: Move the pop-up horizontally and vertically.
      • To move the pop-up horizontally, click the MoveHorizontally.png icon and position it at the top, middle, or bottom of the webpage.
      • To move the pop-up vertically, click the MoveVertically.png icon and position it to the left, center, or right of the webpage.
    • Customizing the width and height of the popup: Click the Settings__1_.png icon and specify the width and height.
    • Adding CSS options to the popup: Add custom CSS for tailored styling. Click the Settings__1_.png icon, then click the Styling.png icon to add CSS code and custom attributes.

EditingStylingOptions.gif

  • Preview Options: Click the PreviewOptions.png 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.

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.
arrow_drop_down Test Campaign (Optional)

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.

OSM_TestCampaigns.png

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

The following delivery schedule options are available for OSM campaigns:

One Time Periodic

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:

  • Ends: Define when the campaign should stop.
    • Never: The campaign runs indefinitely.
    • Ends On: Specify an end date and time for the campaign.
At a particular date and time

Send the campaign on a specific date and time, with options for time zone and prediction:

  • Campaign timezone: 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.
  • Ends: Define when the campaign should stop.
    • Never: The campaign runs indefinitely.
    • Ends On: Specify an end date and time for the campaign.

OSM_Create_OneTime.gif

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

ConVErsionGoals.png

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.
arrow_drop_down Tracking Revenue Performance (Optional)

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. TrackingRevenuePerformance.png
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. RevenuePerformance.png
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. AttributionWindow.png

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.

Priority_and_Delivery_Controls.png

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

arrow_drop_down How to use a custom font in the OSM editor?

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.

select template.png

3. Modify text settings

  1. Click the text element where you want to apply the custom font:
  2. Click the settings icon (Settings__1_.png), then select the styling icon (Styling.png).
    click on settings.png
  3. Switch to the Advanced tab.
    switch to advanced tab.png
  4. In the CSS Id field, enter a unique identifier, such as text_id1.
    add identifier.png
  5. 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.

embed element.png

5. Insert custom font code

Click the previously added embed element and input the following CSS:

HTML

<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.

Add custom code.png

6. Customize additional elements

To change the font for other elements, such as buttons:

  1. Assign a unique ID to the button, for example, button_id1.
    change button identifier.png
  2. Modify the CSS code to include the button ID:
    HTML
    
    <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.

    button code.png

7. Preview and publish

After adding the CSS, preview your template to confirm the font displays correctly. Once verified, you can publish your campaign.

Updated template.png

Next Steps

Was this article helpful?
2 out of 2 found this helpful

How can we improve this article?