> ## 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 First-Party Data Using Typeform

# Introduction

In today's digital landscape, where many web browsers block third-party cookies, collecting first-party data is more important than ever. First-party data is more accurate and relevant than other types of data because it's collected directly from your customers, prospects, and others who interact with your brand.

#### Advantages of collecting first-party data

* **Data accuracy and reliability**: First-party data is accurate and reliable, unlike third-party data, which can be subject to inaccuracies or biases. It helps you build direct relationships with your customers.
* **Enhanced personalization**: First-party data provides a rich understanding of individual customer profiles. This allows for highly targeted marketing messages, product recommendations, and personalized experiences.
* **Improved customer engagement**: By understanding customer preferences and behaviors, you can tailor their marketing efforts to resonate with specific audiences, increasing engagement and loyalty.
* **Better marketing ROI**: Accurate and relevant data can help you optimize campaigns, reduce wasted expenses, and improve conversion rates.
* **Stronger customer relationships**: Personalization and relevant interactions foster stronger relationships between businesses and their customers.

We will achieve this use case by [creating an On-site Messaging (OSM) campaign](/user-guide/use-cases/on-site-messaging-\(osm\)/collect-first-party-data-using-typeform#create-an-osm-campaign) and embedding the [Typeform](https://www.typeform.com/) survey in it to gather first-party data on your website. Typeform enables you to create user-friendly surveys, while MoEngage ensures that the right audience sees your survey at the optimal time. We will survey the purchasing experience after the user buys a product from your online store.

# Expected Result

When users visit the website, they will see a pop-up message:

<img src="https://mintcdn.com/moengage/S2vOz7ciYYqlhjCf/images/moengage_6b509e.png?fit=max&auto=format&n=S2vOz7ciYYqlhjCf&q=85&s=40d30d530e2e72209ed3dbe7d44ade90" alt="1.png" width="1918" height="1222" data-path="images/moengage_6b509e.png" />

<Tip>
  * Typeform must be integrated with MoEngage. For more information, refer [here](https://partners.moengage.com/hc/en-us/articles/4410030363284-Typeform#h_01HM95JTPHSJA6DBZWM2Q13EGE).
  * URL to the published Typeform survey you want to display to your users must be available.
  * 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) documentation.
  * Events to track the action of a user purchasing the product and related information such as the platform, product's ID, name, and price must be available in MoEngage. In this example, we will use the event *Product Purchased*. To understand how to track events, refer to the [Developer Guide](/developer-guide/introduction).
</Tip>

# Create an OSM Campaign

In this section, we will create an OSM campaign to send a Typeform survey:

## 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/OQ0V9ibjQLpsyCSD/images/moengage_0de64c.png?fit=max&auto=format&n=OQ0V9ibjQLpsyCSD&q=85&s=eeaa2f8c954271bf1934a4ca305c5b71" alt="Screenshot 2025-05-12 at 10.27.58 AM.png" width="1062" height="1660" data-path="images/moengage_0de64c.png" />
   You are taken to the first step, **Target users**.
4. Define your campaign with a name and tags.
5. In the **Target Platforms** section, select both the **Web** and **Mobile Web** options.
   <img src="https://mintcdn.com/moengage/wjYnJKL0xml-g3HM/images/moengage_4855d5.png?fit=max&auto=format&n=wjYnJKL0xml-g3HM&q=85&s=5c03f424038d73425cb4a1af15adbee9" alt="Screenshot 2025-01-21 at 5.12.58 PM.png" width="510" height="200" data-path="images/moengage_4855d5.png" />
6. In the **Trigger criteria** section, select when you want to display the survey to your users. In this use case, we want to get feedback about the product purchasing experience. Therefore, click **On custom event** and define the condition as *Has Executed Product Purchase* to display the survey right after the user purchases the product. For more information, refer to [Create OSM Campaign](/user-guide/campaigns-and-channels/on-site-message/create/create-osm-campaign).
   <img src="https://mintcdn.com/moengage/tNrQQROY8O0h4yWe/images/moengage_12dcb5.png?fit=max&auto=format&n=tNrQQROY8O0h4yWe&q=85&s=81847b7f81577a59d94bced195f143f9" alt="22222.png" width="5338" height="1716" data-path="images/moengage_12dcb5.png" />
7. In the **Select pages** section, click **All pages**.
   <img src="https://mintcdn.com/moengage/BlcsVkkZu61NB-XQ/images/moengage_49b7bf.png?fit=max&auto=format&n=BlcsVkkZu61NB-XQ&q=85&s=2c3adc07a11bb8e87fd523964f3797f6" alt="Screenshot 2025-01-21 at 5.18.34 PM.png" width="762" height="232" data-path="images/moengage_49b7bf.png" />
8. In the **Target audience** section, click **All users**. The success of your survey depends on the questionnaire and your target audience, so define them as specifically as possible.
9. Click **Next** to move to the second step, **Content**, where you can define the content for your campaign.

## Step 2: Content

In this step, we will define the content for your campaign.

1. In the **Search templates** field, search with the keyword "Typeform" and select the desired template.
   <img src="https://mintcdn.com/moengage/jnaevUpPOwD04mEl/images/moengage_829bd0.png?fit=max&auto=format&n=jnaevUpPOwD04mEl&q=85&s=476f7e047eb03ba691a58f481f3a3f18" alt="Screenshot 2025-01-21 at 5.26.56 PM.png" width="3158" height="1160" data-path="images/moengage_829bd0.png" />
2. After the screen loads, click the empty Typeform element. A set of icons is displayed.
3. Click the first icon to edit the HTML code elements to connect your survey here.
   <img src="https://mintcdn.com/moengage/_fazdN5K6hQMBuV9/images/moengage_3b7a27.png?s=c5fc3563cb44815cdd170ed4f1417984" alt="2025-01-21_17-45-08 (1).gif" width="1570" height="686" data-path="images/moengage_3b7a27.png" />
4. Look for the *data-url* and *src* variables. Add your Typeform URL with query parameters against these variables. Make sure you use double quotation marks ("") instead of single quotation marks ('').
   <img src="https://mintcdn.com/moengage/QVZKszouQuxXOzFr/images/moengage_1d71a9.png?s=6751a23f50972e93245484d2ce8d7e75" alt="2025-01-21_17-55-26 (1).gif" width="1570" height="688" data-path="images/moengage_1d71a9.png" />
   <img src="https://mintcdn.com/moengage/Vec55CKt-wYQ1h5L/images/moengage_44b895.png?fit=max&auto=format&n=Vec55CKt-wYQ1h5L&q=85&s=7f82c83650a80ae3ccf84e258631452c" alt="5.png" width="3700" height="2062" data-path="images/moengage_44b895.png" />
5. Click **Next** to move to the third step, **Schedule and goals**.

## Step 3: Schedule and Goals

In this step, we will define the schedule and goal of your campaign.

1. In the **Send campaign** section, define when you want to start and end your OSM campaign.
   <img src="https://mintcdn.com/moengage/0iWkm50wROjmHH3Z/images/moengage_d0be31.png?fit=max&auto=format&n=0iWkm50wROjmHH3Z&q=85&s=1c9e223eda3880008d4149b816d6655d" alt="6.png" width="5354" height="1178" data-path="images/moengage_d0be31.png" />
2. In the **Conversion goals** section, add conversion goals that you would like to track.
3. In the **Campaign priority** section, assign a priority to this OSM campaign. For example, selecting **Critical** ensures that the users will see the campaign, even when there are other campaigns to be shown. For more information, refer to [Create OSM Campaign](/user-guide/campaigns-and-channels/on-site-message/create/create-osm-campaign).
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 Campaign](/user-guide/campaigns-and-channels/on-site-message/create/create-osm-campaign).
   <img src="https://mintcdn.com/moengage/Ci8j4F7VOEUnUuwd/images/moengage_eb4c20.png?fit=max&auto=format&n=Ci8j4F7VOEUnUuwd&q=85&s=99ad5436dd348f39e6c8e42fbe30a3b5" alt="7.png" width="5302" height="1660" data-path="images/moengage_eb4c20.png" />
6. Click **Publish**.

# Conclusion

In this use case, we created an OSM campaign and embedded the Typeform survey. Now that we have published the campaign, we can analyze its performance. For more information, refer to [Analyze On-site Messaging Campaigns](/user-guide/campaigns-and-channels/on-site-message/analyze/analyze-on-site-messaging-campaigns).
