---
title: Collect SMS subscribers using a web modal
slug: data-platform/docs/legacy-collect-sms-subscribers-using-a-web-modal
docTags: 
createdAt: 2026-08-10T12:05:15.000Z
---

:::hint{type="info"}
**Note**

Email and SMS channels are legacy features and not offered to new customers.
:::

Customers must give permission to contact them before you can engage them through SMS and MMS. In Optimizely Data Platform (ODP), you can create a web modal that lets shoppers enter phone numbers and explicitly opt-in for SMS and MMS communications.

## Configure a web modal for SMS opt-in

You can add a phone number field to an existing form in a web modal or create a modal and form to collect the phone number.

The following example shows how to create a modal and a form to collect phone numbers: 

### Create a web modal

:::hint{type="info"}
**Note**

The terms *audiences* and *segments* are interchangeable. Optimizely has updated all *segments* to *audiences* on the **Audiences** page and is updating the UI on other pages. See  [Understand audiences](docId\:v-gHiL9jfINBey-4QNtFM) to get information on audiences.
:::

1. Go to **Activations > Overview**.
2. Click **Create New Campaign** and select **Web**.
3. Click **Create From Scratch**.
4. Select **All Visitors** or a [real-time audience](docId\:chCPcgJQ5k5t6nUgnnd43) from the drop-down list as your audience. 
5. Click to edit **Touchpoint 1**.
6. Click **Web Modal**.
7. Expand **Targets** and enter the website URL where visitors can see your web modal.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/9RkmGTYIj7ViP-miMmG3_-20260720-145605.png" size="100" isUploading="false" width="1509" height="195" darkWidth="1509" darkHeight="195" showCaption="false" indent="1"}

### Design the opt-in form

1. Go to **Elements > Forms**.
2. Drag and drop the following elements:
   - A **Text Box** for email collection. 
   - A **Text Box** for phone number collection. 
   - Two **Checkboxes** to let customers explicitly opt in to email communications and SMS communications. 
   - A **Submit Button** to submit the form. 

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/H6S5EItXjvF0gaIZBrkVT-20260720-145606.png" size="100" isUploading="false" width="1513" height="887" darkWidth="1513" darkHeight="887" showCaption="false" indent="1"}

### Configure the opt-in fields

**Email address field**

1. Select the first **Text Box** in your form. 
2. Go to **Details**.
3. Expand the **Field** drop-down list and select **Email**. This automatically marks the field as required.

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/U7fajUBbdz9G_f49Bdz4Q-20260720-145605.png)

**Phone number field with country code selector**

1. Select the second **Text Box**. 
2. Go to **Details**.
3. Expand the **Field** drop-down list and select **Phone**.

   :::hint{type="info"}
   **Note**

   ODP automatically enables **Show Country Code** and **Enable Country Code Selection** and selects the United States as the **Default Country Code**. You should leave the country code selector enabled to help your visitors with proper phone number formatting.
   :::
4. Enable **Required**.

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/cY78R-x_uoWOoDX90JPbD-20260720-145605.png)

**Checkbox**

1. Select the **Checkbox**. 
2. Go to **Details**.
3. Expand the **Action** drop-down list and select **Opt-In**. 
4. Enable **Required** to ensure you obtain explicit consent from your visitors for email and SMS marketing communications.

   :::hint{type="info"}
   **Note**

   If you do not set the checkbox **Identifier** field to **All (Global Opt-In)**, you must have one checkbox per messaging identifier field. In this example, you need one checkbox where **Identifier** is set to **Email**, and another checkbox where **Identifier** is set to **Phone**.
   :::

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/zhktUoq1HjCPK60Yoi3Ww-20260720-145606.png)

**Submit button**

1. Select the **Submit Button**. 
2. Go to **Details**. 
3. Expand the **Action** drop-down list and select **Confirmation Design**. This ensures you are not interrupting visitors' place on your site when they click to submit the form.

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/OgxfeXPFC8idbe3c7b5M5-20260720-145605.png)

### Configure when the modal displays

1. Expand **Triggers**.
2. Adjust the settings. 

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Kb_PRw36wBbLuxyH9jAWJ-20260720-145605.png)

### Preview the web modal

1. Click **Preview**.
2. Enter the **Webpage URL** where you want to preview the web modal.
3. Click **Generate Preview**. A separate browser tab opens with a preview of your web modal.

### Create a confirmation message

You should also create an SMS campaign that [sends a confirmation message](docId:3ZH9ohYNlECePIQCMOP-B) to your new SMS subscribers. You should launch this campaign before you go live with your web modal.
