Sub topic 14
Measuring results and A/B testing personalisation
Personalisation takes effort to build and adds ways for an email to go wrong. This chapter shows how to find out whether it is worth that cost. You compare personalised and generic versions of the same email in a controlled test and read the results without fooling yourself.
This chapter assumes you can send a campaign, know what contacts, lists and fields are, and have met merge tags, fallback values and conditional blocks in earlier chapters. The code example uses basic Python.
Why a controlled comparison is needed
A personalised campaign that gets a 3% click rate sounds good until you ask what the generic version would have earned. Without that baseline you cannot tell whether personalisation helped. Other things change between sends: the day, the offer, the audience and the season. Comparing this month's personalised newsletter to last month's generic one mixes all of them together.
A controlled comparison, usually called an A/B test, fixes this. You split one audience at random into groups, send each group a different version at the same time, and compare the results. Because the groups are alike apart from the version they received, a difference in results can be credited to the version.
Choose a metric that matches the change
Pick one primary metric before you send. Different personalisation changes affect different points in the email's journey.
| Change you are testing | Best primary metric | Why |
|---|---|---|
| Merge tag in the subject line | Unique click rate (per delivered email) | The subject line affects whether people open, but opens are unreliable (see below). Clicks show real interest. |
| Conditional content or dynamic block in the body | Click-through rate on the personalised block | The change sits in the body, so measure what happens there. |
| Order or product list | Click-through or conversion per delivered email | Relevance of items should lead to clicks and purchases. |
| Behaviour-triggered email | Conversion rate (purchase, sign-up) | The goal is a downstream action. |
Choose a secondary set of guardrail metrics as well: unsubscribe rate, spam complaint rate and bounce rate. A version that wins on clicks but doubles unsubscribes is not a win. Personalisation that feels intrusive tends to show up in these numbers first.
Why open rate is a weak metric
An open is recorded when a tracking image loads. Some mail apps, notably Apple Mail with Mail Privacy Protection, load images automatically for every message, whether or not the person reads it. This inflates open rates and makes them unreliable, particularly for comparing subject lines. Treat opens as a rough signal at best. Prefer clicks, conversions and replies, which require a person to act.
Design the test
A sound test follows these steps.
- Write a hypothesis, such as "Adding the first name to the subject line will raise the click rate."
- Change one thing. If version B has a new subject line, new hero block and new send time, you cannot tell which one mattered.
- Split the audience at random. Most platforms do this for you. Do not split by hand, such as by alphabet or sign-up date, because those groups differ in ways that affect results.
- Send both versions at the same time.
- Decide the sample size and the end point before sending, and do not stop early because one version looks ahead.
- Compare the primary metric, then check the guardrails.
What to use as the control
For personalisation, the control is the same email without the personalised element, not an email with a broken or empty one. Examples:
- Merge tag in subject line: A is "Your spring offer is here", B is "Sam, your spring offer is here".
- Conditional block: A shows one generic message to everyone, B shows the plan-specific message from the earlier conditional-content example.
- Dynamic product list: A shows the same bestsellers to everyone, B shows items based on each contact's behaviour.
Keep fallbacks in mind. In version B, contacts with no first name get the fallback ("there"). They are still in the personalised group, because that is what would happen if you rolled it out. Excluding them would overstate the benefit. If you want to understand the effect on contacts with complete data, analyse that subgroup separately and label it as a secondary finding.
Holdout groups for ongoing programmes
For automated emails that run for months, such as a recommendations block in a welcome series, keep a small holdout group (for example 5 to 10%) that always gets the generic version. Comparing the holdout with everyone else shows the long-run effect and catches decay when a tactic stops working.
How big should the test be?
Small groups give noisy results. If 40 people click on one version and 46 on the other, that gap can easily be chance. A rough rule for 80% power and a 5% significance level (a common default) is:
n per version ≈ 16 × p × (1 − p) ÷ d²
Here p is your current rate and d is the smallest absolute change you care about. If the current click rate is 2.3% (p = 0.023) and you want to detect a rise of 0.3 percentage points (d = 0.003), you need about 16 × 0.0225 ÷ 0.000009 ≈ 40,000 recipients per version. Smaller lists can only detect larger effects. If your list is small, test bigger changes, or combine several sends of the same test.
Read the result
Once the planned sample has been sent and enough time has passed (most clicks arrive within a few days), compare the two rates. A two-proportion z-test asks how likely a difference this large would be if the two versions really performed the same. That probability is the p-value. The following script uses only the Python standard library.
from math import erf, sqrt
def two_proportion_z(successes_a, n_a, successes_b, n_b):
p_a = successes_a / n_a
p_b = successes_b / n_b
pooled = (successes_a + successes_b) / (n_a + n_b)
std_error = sqrt(pooled * (1 - pooled) * (1 / n_a + 1 / n_b))
z = (p_b - p_a) / std_error
# Two-sided p-value from the normal distribution
p_value = 2 * (1 - 0.5 * (1 + erf(abs(z) / sqrt(2))))
return p_a, p_b, z, p_value
# A: generic subject line, B: first name in subject line
p_a, p_b, z, p_value = two_proportion_z(230, 10000, 281, 10000)
print(f"A click rate: {p_a:.2%}")
print(f"B click rate: {p_b:.2%}")
print(f"Lift: {(p_b - p_a) / p_a:.1%}")
print(f"z = {z:.2f}, p = {p_value:.3f}")This prints click rates of 2.30% and 2.81%, a relative lift of about 22%, and a p-value of about 0.022. A p-value below 0.05 is the usual threshold for calling a result statistically significant, so here B is likely better than A.
Statistical significance is not the same as importance. Ask whether the size of the lift justifies the cost. A 0.01-point gain on a huge list can be significant but too small to matter. Also look at the interval of plausible values, not only the headline number. Many platforms report this as a confidence interval.
Check the guardrails
After the primary metric, compare unsubscribes and complaints between versions. These events are rare, so differences are often noise. Look for a clear pattern, such as complaints doubling, rather than reacting to one or two extra unsubscribes.
Common mistakes
- Peeking and stopping early. Checking results hourly and stopping when B pulls ahead leads to false winners. Fix the sample size and duration in advance.
- Testing many things at once. If you compare ten subject-line variants, one will look good by chance. Use fewer variants, or treat the winner as a hypothesis to confirm in a second test.
- Auto-winner on opens. Some platforms pick a winner by open rate and send it to the rest of the list. Apple's image preloading distorts that choice, so set the platform to use clicks if it allows.
- Non-random groups. Splitting by segment (for example, new customers get B, long-term customers get A) confounds the result. Randomise within a segment.
- Rendering failures hidden in the data. If a merge tag fails and sends "Hi ," to 3% of version B, the result mixes the personalisation effect with a bug. Run the preview and incomplete-data tests from the previous chapter before the test starts, then check for blank or fallback renderings afterwards.
- Novelty effect. First names in subject lines can work well at first and fade as subscribers get used to them. Re-test periodically, or use the holdout approach.
- Ignoring consent. If the test uses behavioural data, the contacts must have agreed to that use. A winning test does not justify collecting more data than you need.
Record and reuse what you learn
Keep a simple log with the hypothesis, versions, sample sizes, dates, primary and guardrail results, and the decision. Over time the log shows which kinds of personalisation work for your audience and which are not worth maintaining. A merge tag that never beats the control costs you nothing to remove. A complex conditional block that gives no lift is a good candidate for deletion, because every branch is one more thing to test and keep correct.
Exercise
You test a first-name merge tag in the subject line. Version A (generic) goes to 5,000 contacts and version B (personalised) to 5,000. B has a 4.1% open rate against 3.6% for A, but clicks are 1.9% for both versions. Which metric should decide the result, what does this outcome suggest, and what is one check you should run before rolling out B?
Show answer
Click rate should decide it, because open rates are inflated by automatic image loading in some mail apps. Equal click rates suggest the merge tag did not change real engagement, and the open difference may reflect tracking noise or a small curiosity effect. Before rolling out, check the guardrails (unsubscribes and complaints) and the rendered output of B, for example how many contacts received the fallback or a blank name. With no click benefit, keeping the simpler generic subject line is reasonable.
Exercise
Your current click rate is 4% (p = 0.04). Using n ≈ 16 × p × (1 − p) ÷ d², roughly how many recipients per version do you need to detect an increase of 0.5 percentage points (d = 0.005)?
Show answer
n ≈ 16 × 0.04 × 0.96 ÷ 0.000025 = 0.6144 ÷ 0.000025 ≈ 24,600 per version. A list with fewer contacts than about 49,000 in total cannot reliably detect a change this small in one send.