Sub topic 12
A/B testing a subject line or content
An A/B test sends two versions of a campaign to separate parts of your audience. You compare the results and use them to decide what to send to everyone else. This chapter assumes you have already run test sends and checked links, personalization and your audience. An A/B test does not replace those checks. It helps you choose between two versions that are both correct.
What an A/B test can and cannot tell you
A test answers one narrow question: which version performed better with this audience, on this metric, in this time window. It can't catch broken links or a wrong segment. Both versions would share the same error.
Test one variable at a time. If version B has a different subject line and a different button, you can't tell which change caused the result.
| What you test | Metric to judge it by | Why |
|---|---|---|
| Subject line or preheader | Unique open rate | These only affect whether the message is opened |
| Call-to-action wording or placement | Click rate | The change happens after the open |
| Send time | Click rate | Open rates are inflated by automatic opens |
| Offer or content block | Click-to-conversion rate | The change affects what people do on the page |
Many mail clients now load images automatically for privacy reasons, which counts as an "open" even when nobody reads the message. For that reason, prefer clicks over opens when your platform offers the choice.
How the test runs
Decide three things before you send:
- The hypothesis. For example: "A subject line with a specific number will get more clicks than a vague one."
- The metric and the window. Fix both in advance. A window of at least 4 hours is common for opens, and 24 hours is safer for clicks.
- The sample size. Each group needs enough recipients that chance can't explain the gap.
Checking whether the difference is real
Platforms often declare a winner automatically. With small groups, a gap of a few opens is noise. This script runs a two-proportion z-test on the counts, so you can check the platform's claim.
import math
def ab_p_value(successes_a, size_a, successes_b, size_b):
rate_a = successes_a / size_a
rate_b = successes_b / size_b
pooled = (successes_a + successes_b) / (size_a + size_b)
se = math.sqrt(pooled * (1 - pooled) * (1 / size_a + 1 / size_b))
z = (rate_b - rate_a) / se
return math.erfc(abs(z) / math.sqrt(2))
# 1,000 recipients per group: 220 opens for A, 262 for B
p = ab_p_value(220, 1000, 262, 1000)
print(f"p-value: {p:.3f}")
print("Likely a real difference" if p < 0.05 else "Could be chance")A p-value below 0.05 is a common threshold. It means a gap this large would appear by chance less than 5% of the time if the two versions were equal. Here the p-value is about 0.02, so version B probably did win.
Common errors
- Testing several things at once. You then can't say what caused the result.
- Groups that aren't random. If version A goes to your newest subscribers and B to your oldest, you are testing the audiences. Let the platform randomize.
- Stopping early. Picking a winner after 30 minutes favors people who open immediately, who aren't typical.
- Testing groups too small. A 50-person group can't show a small difference.
- Skipping test sends. Send both versions to your seed list first, because a broken variant wastes the test sample.
When to choose a staged send instead
Use an A/B test when you have two plausible versions and want to learn which is better. If you have one version and want to catch problems early, send it to a small slice of the list first. The next chapter covers that approach.
Exercise
Your A/B test of two subject lines shows version B with a 31% open rate and version A with 29%, with 100 recipients in each group. Should you treat B as the winner, and what would you change?
Show answer
No. With 100 recipients per group, a 2-point gap is about 2 opens and is well within chance. Increase the group sizes, use clicks rather than opens if the platform allows it, and wait for the full time window before declaring a winner.