> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Collect Leads from First-Time Users

# Introduction

Many new users visit websites daily but often leave after only a few minutes of browsing. To avoid losing potential customers and revenue, it is essential to collect their contact information before they exit.

#### Advantages of collecting leads from first-time users

* **Building a customer base**: By collecting leads, you can establish a database of potential customers, which is essential for future marketing campaigns and sales efforts.
* **Targeted marketing**: With a list of leads, you can personalize your marketing messages and tailor your offers to specific customer segments, increasing the chances of conversion.
* **Increased sales and revenue**: By nurturing relationships with early-stage prospects, you convert them into paying customers down the line. You can drive sales and increase your overall revenue by providing offers and discounts.
* **Improved customer understanding**: Lead capture helps you gain insights into your target audience, their needs, and preferences, which can inform product development and marketing strategies.
* **Staying ahead of the competition**: In today's competitive landscape, you need to actively seek out and engage with potential customers to stay ahead of the competition.

In this article, we will [create an On-site Messaging (OSM) campaign](/user-guide/use-cases/on-site-messaging-\(osm\)/collect-leads-from-first-time-users#create-an-osm-campaign) to collect contact details from your first-time users.

# Expected Result

When users visit the website, they will see a pop-up message with a prompt to enter their phone number:

<img src="https://mintcdn.com/moengage/UX7SFw6G5JwoHWFq/images/moengage_5f13e0.png?fit=max&auto=format&n=UX7SFw6G5JwoHWFq&q=85&s=23d32b3a1a908eb7317bbbd01a8b6c48" alt="1.png" width="2368" height="1954" data-path="images/moengage_5f13e0.png" />

<Tip>
  * Your website must be integrated with the MoEngage Web SDK. For more information, refer to the [Web SDK](/developer-guide/web-sdk/web-sdk-overview/web-sdk-overview).
  * The [On-site Messaging](/developer-guide/web-sdk/onsite-messaging/configure-and-integrate-on-site-messaging) channel must be configured.
</Tip>

# Create an OSM Campaign

In this section, we will create a campaign to collect contact details from your first-time users.

## Step 1: Target Users

1. On the left navigation menu in the MoEngage dashboard, click **Engage**, and then click **Campaigns**.
2. On the All campaigns page, click **+ Create campaign**.
3. Under **Inbound**, click **On-site**. <img src="https://mintcdn.com/moengage/S2vOz7ciYYqlhjCf/images/moengage_6e0e21.png?fit=max&auto=format&n=S2vOz7ciYYqlhjCf&q=85&s=c009c04bd40fa588bcd90767e8df6d13" alt="Screenshot 2025-04-29 at 2.14.36 PM.png" width="1056" height="1646" data-path="images/moengage_6e0e21.png" /> \
   You are taken to the first step, **Target users**, in defining your campaign.
4. Define your campaign with a name and tags.
5. In the **Target platforms** section, select **Web** and **Mobile Web**. <img src="https://mintcdn.com/moengage/rmgWdhG7TCISpEIz/images/moengage_d3894c.png?fit=max&auto=format&n=rmgWdhG7TCISpEIz&q=85&s=63e69148132b8ce88565db4d5ae598fb" alt="Screenshot 2025-04-29 at 2.16.19 PM.png" width="3192" height="928" data-path="images/moengage_d3894c.png" />
6. In the **Trigger Criteria** section, click the **On Exit Intent** card. This will ensure that the campaign is displayed to your users when they attempt to leave the page. For more information on defining exit intent, refer to [Exit Intent Technology](/user-guide/campaigns-and-channels/on-site-message/create/exit-intent-technology). <img src="https://mintcdn.com/moengage/7H2dU4CG2W0DQCPI/images/moengage_6e6853.png?fit=max&auto=format&n=7H2dU4CG2W0DQCPI&q=85&s=2498a6c0a729cdfd59eb8a18e8448f01" alt="3.png" width="5360" height="1118" data-path="images/moengage_6e6853.png" />
7. In the **Select pages** section, you will define where you would want to display the campaign. Select **Specific pages** to display the campaign on specific pages of your website. Define the condition shown in the following example to display the campaign on the website's product pricing page. <img src="https://mintcdn.com/moengage/DUgG020WbtkVK2Ls/images/moengage_35a9bb.png?s=567ea9956f7aa640c549a444140c1615" alt="2025-01-08_11-54-13 (1).gif" width="1580" height="470" data-path="images/moengage_35a9bb.png" /> You can click **+ Filter** to add more conditions and click **And** or **Or** to define the logic to be applied.
8. In the **Target audience** section, click **Filter users by**. Under **User property**, select the attribute *ID* and define the condition *does not exist*. This will segment the first-time users. <img src="https://mintcdn.com/moengage/wjYnJKL0xml-g3HM/images/moengage_4523f1.png?fit=max&auto=format&n=wjYnJKL0xml-g3HM&q=85&s=14eb800672161cac78066116018656fb" alt="5.png" width="5376" height="1952" data-path="images/moengage_4523f1.png" />
9. Click **Next** to move to the second step, **Content**, where we will define the content for your campaign.

## Step 2: Content

1. On the **Prebuilt and saved templates** tab, use the search box to search with the keyword *lead* to find the **Popup: Lead Gen** template.
2. Select the desired template from the **Templates** section. Alternatively, you can start from scratch and build your own template by selecting **Blank Popup Template** in the **Start from scratch** tab. <img src="https://mintcdn.com/moengage/jnaevUpPOwD04mEl/images/moengage_81c861.png?s=b31d6ce95a95c3e29023f0bb066f295a" alt="2025-01-08_12-25-39 (1).gif" width="1578" height="784" data-path="images/moengage_81c861.png" />
3. After the template loads, you can edit it and define the OSM according to your requirements. Click the **+** icon on the left to add new elements to your campaign. <img src="https://mintcdn.com/moengage/T-dEj4C-7pywzBS3/images/moengage_a411e7.png?fit=max&auto=format&n=T-dEj4C-7pywzBS3&q=85&s=603785396ee0aab611a434cbaafd91ce" alt="Screenshot 2025-01-10 at 11.13.50 AM.png" width="3132" height="1240" data-path="images/moengage_a411e7.png" />
4. To define the OSM, click the input box and then click the first icon to get the settings shown in the image below: <img src="https://mintcdn.com/moengage/N1a7P_mcSpm-5bMa/images/moengage_5a22fd.png?s=bdf1530dd63eddb50341827760af766b" alt="2025-01-10_11-16-42 (1).gif" width="608" height="498" data-path="images/moengage_5a22fd.png" />
5. Here, you can implement basic checks. Selecting the *Tel* option from the **Type** list allows MoEngage to verify that users enter only their mobile numbers.
6. On the **Advanced** tab, you can select the attribute where you would like to store the input value to save it to the profile created at MoEngage. This will help you engage with them in the future. <img src="https://mintcdn.com/moengage/eF2J43N9Ckga5Apm/images/moengage_2cd7f4.png?fit=max&auto=format&n=eF2J43N9Ckga5Apm&q=85&s=d92f00bf570a9bde68713f8e44152fc9" alt="Screenshot 2025-01-08 at 12.48.38 PM.png" width="916" height="752" data-path="images/moengage_2cd7f4.png" />
7. Click **Next** to move to the third step, **Schedule and goals**, where we will define your campaign's schedule and goals.

## Step 3: Schedule and Goals

1. In the **Send campaign** section, define when you want to start and end your OSM campaign. <img src="https://mintcdn.com/moengage/xGyg9rXr6djolSrt/images/moengage_de12a0.png?fit=max&auto=format&n=xGyg9rXr6djolSrt&q=85&s=eaa02b154d0be3b0575bfde83bec95c3" alt="10.png" width="5396" height="1590" data-path="images/moengage_de12a0.png" />
2. In the **Conversion goals** section, add conversion goals that you like to track. For more information, refer to [Conversion Goals](/user-guide/campaigns-and-channels/on-site-message/create/create-osm-campaign#conversion-goals).
3. In the **Campaign priority** section, assign a priority to this campaign. For example, selecting **Critical** ensures that the users will always see the campaign even when there are other campaigns for which they are eligible. <img src="https://mintcdn.com/moengage/OQ0V9ibjQLpsyCSD/images/moengage_11c381.png?fit=max&auto=format&n=OQ0V9ibjQLpsyCSD&q=85&s=74c3841a6912253d91718fd9616839bb" alt="Screenshot 2025-01-08 at 1.45.20 PM.png" width="3240" height="156" data-path="images/moengage_11c381.png" />
4. In the **Global Delivery controls** section, turn the **Ignore global minimum delay** toggle on to override the defined minimum delay between any two campaigns defined in settings.
5. In the **Local Delivery controls** section, define the controls based on your requirements. For more information, refer to [Create OSM Pro Campaign](/user-guide/campaigns-and-channels/on-site-message/create/create-osm-campaign). <img src="https://mintcdn.com/moengage/fQ0QnP2abFkVAzJ2/images/moengage_506afe.png?fit=max&auto=format&n=fQ0QnP2abFkVAzJ2&q=85&s=0b09333eb9e7866021655a1bcaf2716a" alt="11.png" width="5384" height="1658" data-path="images/moengage_506afe.png" />
6. Click **Publish**.

The campaign is now published. The submitted response is stored in the user attribute in the MoEngage user profile.

# Conclusion

In this use case, we created an On-site Messaging (OSM) campaign to collect contact details from your first-time users.

Now that we have published the campaign, we can track our CTR and conversions (if defined) to understand its performance. For more information, refer to [Analyzing an On-site Campaign](/user-guide/campaigns-and-channels/on-site-message/analyze/analyze-on-site-messaging-campaigns).
