> For the complete documentation index, see [llms.txt](https://docs.zigpoll.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zigpoll.com/tutorials/a-b-testing-surveys.md).

# A/B Testing Surveys

Use percentage targeting to A/B test different surveys on the same page

You can use Zigpoll's percentage targeting to run A/B tests between two or more surveys. By assigning each survey a percentage of your traffic, you can compare how different questions, formats, or flows perform against each other.

Percentage targeting is **consistent per visitor** — the same person will always see the same survey across page loads and sessions. This makes it reliable for A/B testing, since visitors won't flip between variants on refresh. Each survey rolls separately for each visitor, which is what makes the layering below work.

***

#### How It Works

When multiple surveys are assigned to the same page, Zigpoll evaluates them in order from top to bottom in your **Surveys** list and shows the **first one** whose rules match. If a visitor falls outside a survey's rules, Zigpoll skips it and checks the next one. Each survey's percentage targeting controls what share of visitors see it. To set up an A/B test, layer two surveys on the same page with complementary percentages:

* **Survey A** — Set to **50%** targeting. Half of your visitors will see this survey.
* **Survey B** — Set to **100%** targeting. This acts as the fallback — anyone who doesn't see Survey A will see Survey B instead.

Because Survey A is checked first, it captures its share of visitors. Survey B picks up everyone else. The result is a clean 50/50 split.

***

#### Step 1: Create Your Two Surveys

Create two surveys and assign them to the same page or URL path. You can use different questions, different formats, or any other variation you want to test.

#### Step 2: Set Percentage Targeting on Survey A

1. Open **Survey A** and go to **Settings → Targeting**.
2. Under **Percentage**, set the value to **50%** (or whatever split you want).
3. Click **Save Changes**.

#### Step 3: Set Survey B to 100%

1. Open **Survey B** and go to **Settings → Targeting**.
2. Under **Percentage**, leave it at **100%** (the default).
3. Click **Save Changes**.

#### Step 4: Order Your Surveys

Make sure **Survey A** appears above **Survey B** in your **Surveys** list (drag to reorder). Zigpoll evaluates surveys top to bottom — Survey A's percentage check runs first, and Survey B catches the remaining visitors. If Survey B is on top at 100%, it wins every time and Survey A never shows. See [Survey order](/accounts/active-polls.md#survey-order-the-first-match-wins).

***

#### Adjusting the Split

You can adjust the percentage on Survey A to control the split:

| Survey A | Survey B (at 100%) | Result      |
| -------- | ------------------ | ----------- |
| 50%      | 100%               | 50/50 split |
| 30%      | 100%               | 30/70 split |
| 10%      | 100%               | 10/90 split |

{% hint style="info" %}
Each visitor's assignment is consistent — they will always see the same variant, even across multiple visits and page refreshes. This means your data won't be polluted by the same visitor responding to both surveys.
{% endhint %}

#### Three-Way Tests

You can extend this to three or more variants:

* **Survey A** — 33%
* **Survey B** — 50%
* **Survey C** — 100%

Survey A captures 33% of visitors. Of the remaining 67%, Survey B captures half (roughly 33%). Survey C catches the rest (roughly 34%).

***

#### Comparing Results

Once both surveys have collected enough responses, compare them on each survey's **Dashboard** and **Answers** pages. Look at response rates, completion rates, and answer distributions to determine which variant performed better.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zigpoll.com/tutorials/a-b-testing-surveys.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
