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

# A/B testing

> Send different versions of an email, SMS, or push message to random parts of its audience and compare how each one performs. Then promote the winning version, so everyone who gets the message after that receives it.

## Before you begin

* An email, SMS, or push message in a campaign or a journey. In a campaign, you can add or remove an A/B test only while the campaign is a draft. In a journey, you can until the message first sends.
* The **Draft messages & campaigns** permission to set up a test, and **Manage messages** to promote a winner or publish changes to a live campaign. See [Approvals](https://docs.hightouch.com/native-delivery/approvals.md) for what each one allows.

## How A/B tests work

An A/B test splits a message's recipients at random across two to five versions, called variants. You set the share each variant gets, such as 50% each for two subject lines. Each recipient gets one variant, and Hightouch measures how each variant does on the metrics you choose, such as open rate or click rate.

Hightouch doesn't pick a winner for you. Every variant keeps sending at its percentage until you review the results and promote one. From then on, every recipient gets the winner.

What you can test depends on the channel:

| Channel | What you can test |
| - | - |
| Email | The subject and preheader, the body, or both |
| SMS | The message body |
| Push | The notification content |

An email can run a subject and preheader test and a body test at the same time. They're separate tests with their own variants, metrics, and results. With two subject lines and three bodies, each recipient gets one of six combinations. The results compare the subject lines with each other and the bodies with each other, not the combinations.

## Set up an A/B test

### Test an email's subject and preheader

#### 1. Open the email's metadata

On a campaign's overview, click **Edit** on the **Email metadata** card. On a journey's **Send email** tile, open the email's metadata.

#### 2. Turn on the test

In the **Subject + Preheader** section, turn on **Enable A/B test**.

#### 3. Write each variant

Write the subject and preheader for each variant. Add a variant to test more than two, up to five.

#### 4. Set the split

Set each variant's percentage. Every variant needs at least 1%, and the percentages must add up to 100.

#### 5. Check the metric and save

Under **A/B test metrics**, check the **Primary metric**. It starts as email opens, since the subject and preheader mainly change whether people open. See [Choose what to measure](#choose-what-to-measure). Then save.

![The Subject + Preheader section with Enable A/B test on, showing variants A and B at 50% each, each with its own subject and preheader](https://mintcdn.com/hightouch-3c037897/Z7wHHtMDbASDaAjU/images/native-delivery/ab-testing/nd-ab-test-subject.png?fit=max\&auto=format\&n=Z7wHHtMDbASDaAjU\&q=85\&s=c7091fda28d80fdc941efb010a378611)

### Test the body

#### 1. Start the test

In the message composer:

* For an email, expand the **A/B test** panel in the editor and click **Enable**.
* For an SMS or push message, click **Enable A/B test** in the message body's header.

#### 2. Name the variants and set the split

In the **A/B test** dialog, name each variant and set its percentage. Click **Add variant** to test up to five, or **Distribute evenly** to give each one the same share. Every variant needs at least 1%, and the percentages must add up to 100.

![The A/B test dialog with three named variants split 34%, 33%, and 33%, email click rate as the primary metric, and email open rate as a secondary metric](https://mintcdn.com/hightouch-3c037897/Z7wHHtMDbASDaAjU/images/native-delivery/ab-testing/nd-ab-test-dialog.png?fit=max\&auto=format\&n=Z7wHHtMDbASDaAjU\&q=85\&s=7304fce18643b681450818b0294c6b31)

#### 3. Choose the metrics

Under **Metrics**, choose a **Primary metric**, and add secondary metrics to track alongside it. See [Choose what to measure](#choose-what-to-measure). Then click **Enable**.

#### 4. Write each variant

Switch between variants to write each one's content. For an email, click a variant's card in the **A/B test** panel. For SMS and push, pick the variant from the menu in the message body's header.

#### 5. Save the message

Save the message.

To change the variants or metrics later, click the settings icon. For an email, it's in the **A/B test** panel. For SMS and push, it's in the message body's header. You can also double-click a variant's card in an email's **A/B test** panel. To drop the test, click **Remove test** in the same dialog, then save. Saving deletes the variants and their content, and the message goes back to a single version.

### Choose what to measure

The primary metric is the one you judge the test on, and results list it first. Secondary metrics show beside it, so you can check that a variant that wins on clicks doesn't lose on opens.

Each test starts with defaults you can change:

| Test | Primary metric | Secondary metric |
| - | - | - |
| Email subject and preheader | Email opens | Email clicks |
| Email body | Email clicks | Email opens |
| SMS | SMS clicks | None |
| Push | Push opens | None |

Results show each metric as a rate, such as open rate. To judge a test on what happens after the click, choose an event related to the parent model your messages send to, such as a purchase.

## Change a live test

A campaign's variants and percentages are fixed once the campaign leaves draft. You can still edit each variant's content and rename it in a campaign draft. Publishing those changes to a live campaign takes the **Manage messages** permission. See [Change a live campaign](https://docs.hightouch.com/native-delivery/campaigns.md#change-a-live-campaign). An SMS message can't be edited once its campaign is live.

In a journey, the variants and percentages are fixed once the message first sends.

## Review results

A message's overview has an **A/B test** card once the test exists. In a journey, the card is on the message tile. Results appear after the message's first send.

The card shows each variant's rate for the primary metric. Click **View details** to see each variant's recipients, every metric, and its content. Recipients are assigned at random, so the actual split can differ a little from the percentages you set.

![The A/B test card for a subject and preheader test, showing the open rate for variants A and B, with View details](https://mintcdn.com/hightouch-3c037897/Z7wHHtMDbASDaAjU/images/native-delivery/ab-testing/nd-ab-test-results.png?fit=max\&auto=format\&n=Z7wHHtMDbASDaAjU\&q=85\&s=72e5accba90f84b08694fef19327ce02)

Each message A/B test also appears in Intelligence under **Experiments**, where you can compare it with your other experiments. See [Experiments in Intelligence](https://docs.hightouch.com/campaign-intelligence/experiments.md).

## Promote a winner

When you've seen enough results, promote the variant you want everyone to get.

1. On the **A/B test** card, click **View details**.
2. Click **Promote a winner**.
3. Choose the variant and click **Promote a winner**.

![The Promote a winner dialog with variant B selected](https://mintcdn.com/hightouch-3c037897/Z7wHHtMDbASDaAjU/images/native-delivery/ab-testing/nd-ab-test-promote.png?fit=max\&auto=format\&n=Z7wHHtMDbASDaAjU\&q=85\&s=4134da9de4202b13fcd13c152262cf9b)

Every recipient from then on gets that variant, and the other variants stop sending. The test keeps collecting results, so the numbers keep updating. The test shows a **Winner promoted** badge, and **Promote a winner** no longer appears for it.

You can promote a winner while a campaign is **Scheduled**, **Running**, or **Paused**, or while a journey is on or draining. You can't promote a winner on a realtime journey.

## Use A/B tests with other features

* Emails built with the agent, and messages that use linked content, can't run A/B tests.
* A message with an A/B test can't use [dynamic content](https://docs.hightouch.com/native-delivery/dynamic-content.md), or an RCS rich card on an SMS message.
* With [localization](https://docs.hightouch.com/native-delivery/localization.md#choose-what-to-translate), each variant needs its own translation for every locale.

## Next steps

* [Experiments in Intelligence](https://docs.hightouch.com/campaign-intelligence/experiments.md) to compare a test's results with your other experiments.
* [Localization](https://docs.hightouch.com/native-delivery/localization.md) to translate each variant for every locale you send to.
