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

# How to Add a Poll or Survey to an Email

A poll in an email is an easy way to find out what your customers think — and track the answers right in Maestra Platform. Each answer option is tied to an action template, so every vote shows up as an action in the customer profile.

> [!WARNING]
>
> **Limitations:**
>
> * A customer can vote in a poll only once, even if the poll is used in several campaigns.
> * A campaign can contain only one poll.
> * Clicks in test emails aren't counted. To test a poll, send a bulk campaign or an automated campaign through a flow.

Once a customer clicks an option in a poll, any later clicks on options aren't counted — no matter how many emails the poll appears in. Say you use one poll in six campaigns and a customer clicks in each email: only the first click counts, and the other five are ignored.

Setting up a poll takes five steps:

1. Create the answer options.
2. Create the campaign.
3. Add the poll to the email.
4. Set up the poll.
5. Analyze the results.

## 1. Create the answer options

Create an action template for each answer option in the poll.

1. Go to **Settings → Customers and actions → Action templates**.
2. Click **Add → Action template**.
3. Create an action template for the first answer option.
4. Clone the template for the other options: click **Clone** in the menu next to the template, then fill in the copy.

## 2. Create the campaign

Create an [automated](https://help.maestra.io/campaigns/email-campaigns/how-to-create-automated-email-campaign.md) or [bulk](https://help.maestra.io/campaigns/email-campaigns/how-to-create-a-bulk-email-campaign.md) campaign.

## 3. Add the poll to the email

You can set up the poll in the Maestra Editor or in the HTML editor:

* **Maestra Editor** — build the email from ready-made blocks, no HTML needed.
* **HTML editor** — use ready-made markup from other services.

### In the HTML editor

Add a special parameter to the markup for each answer option:

```html theme={null}
data-name="answer_option_action_template_system_name"
```

Here's an example for answer option 1:

```html theme={null}
<a data-name="Yes" href="https://your-site.com/thanks-for-your-feedback.html">Yes</a>
```

> [!WARNING]
>
> The link is required. It can point to a thank-you page for taking the poll, or simply to your homepage.

### In the Maestra Editor

You can set up a poll in the Maestra Editor in two ways: with a ready-made standard block or with an empty flexible block.

> [tab] Ready-made block
>
> 1. Add a poll block to the email from the **Standard → Poll** tab.
> 2. For each answer option, set:
>    * **Link type** — *Poll* (the default).
>    * **Click-through link** — the page the customer lands on, for example `https://example.com/`. You can use the same link for every option.
>    * **Link label** — the system name of the action template from step 1 (for example, `Yes`, `No`). The label is what ties the answer option to the customer's action.
> 3. Save the campaign.

> [tab] Empty block
>
> 1. Add a block from the **Empty block** section to the email.
> 2. Add a column for each answer option.
> 3. Add a **Text** element to each column.
> 4. Type the answer options and style them (border, color, font).
> 5. Select the text and add a link to it. In the settings, set:
>    * **Type** — *Poll*.
>    * **Click-through link** — the page to land on, for example `https://example.com/`.
>    * **Link label** — the system name of the action template from step 1 (for example, `Yes`, `No`). The label is what ties the answer option to the customer's action.
> 6. Save the campaign.

> [!NOTE]
>
> When you create the poll under **Campaigns → Polls**, the answer options are pulled in from the campaign automatically.

## 4. Set up the poll

1. Go to **Campaigns**.
2. Click **Create campaign → Poll**.
3. Choose a folder and click **Create**.
4. Fill in the poll settings and click **Add**.

> [!NOTE]
>
> Clicks in test emails aren't counted. To test a poll, send a bulk campaign or an automated campaign through a flow. See [How to test your campaign](https://help.maestra.io/campaigns/how-to-test-your-campaign.md).

## 5. Analyze the results

To see how many customers picked each answer, filter customers by the action templates tied to the poll options.

1. Open the poll you set up.

2. Under **Answer options**, click **Customers with this action** in the actions menu next to the action template. A ready-made customer filter opens. The number of customers it returns equals the number of votes for that option.

   > [!TIP]
   >
   > You can also build the filter by hand. Go to **Customers** and set the condition: **Customer action → exists → Action template → Name → \[template name]**.

3. Repeat for each answer option.

4. To get the **total number of voters**, add every answer option to the **Name** condition in the filter.

5. Work out each option's **share** with this formula:

   `Option % = (customers who picked the option / total voters) × 100`

For example, 120 customers voted *Yes* and 80 voted *No*, for 200 in total. *Yes* gets 120 / 200 × 100 = **60%**, and *No* gets **40%**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.