Email experiments
An email experiment runs one Statsig experiment on your site and in your newsletter at once. A user in arm B sees arm B on your site and arm B’s subject and stories in the edition. Statsig analyses both channels as one experiment.
You attach the experiment to an edition and write what each arm sees. The edition still goes out as one Braze send per variant. Braze works out each recipient’s arm while it renders their email, from their user id, with the same hash Statsig uses. Nothing is stored per recipient, and nothing is called per recipient. After the edition is sent, EdgeKit logs each recipient’s exposure to Statsig.
What you need
Section titled “What you need”- Statsig as your organization’s experiment provider, deployed. EdgeKit uses the two Statsig keys you already entered in Delivery › Configuration › Experiments, so there is nothing new to set up. See Statsig.
- The experiment synced. In Revenue › Decision Engine › Experiments, select Sync experiments. An edition needs no deploy after a sync.
- The experiment keyed on
userIDin Statsig. Statsig’suserIDis the EdgeKit user id. An email recipient has no device id, so an experiment keyed onstableIDor another ID type cannot be emailed. On your site, an experiment keyed onuserIDreaches signed-in users only. - On Braze, profiles keyed by EdgeKit user id, the default
profile key. Braze computes each arm from the profile’s
external_id. Under External identity that is your own user id, not the EdgeKit user id, so an email can show a different arm from your site and from the exposure EdgeKit logs, and the results are wrong. EdgeKit does not refuse this setup. - An email publication. Push has no arms: it is the same for every recipient.
What an experiment can test
Section titled “What an experiment can test”Braze computes each recipient’s arm from their user id alone. So EdgeKit can email an experiment only when every rule in it depends on the user id and nothing else:
- the allocation and each group’s share;
- overrides that name user ids;
- holdouts, layers and targeting gates that also read nothing but the user id.
An experiment that reads anything else cannot be emailed: a user attribute such as email or country, an IP address, the browser, an ID list segment, the current time, another ID type, or a rule that hands off to another experiment. Saving the edition refuses it, and the message names the rule and what it reads.
Attach an experiment
Section titled “Attach an experiment”Open the edition from Messaging › Email & Push Editions › Publications. The Experiments section comes after the subject. It shows only when there is an experiment to attach, or one is already attached.
- Pick an experiment in Attach an experiment. The list holds the synced experiments keyed on
userIDthat are still in Statsig. - The experiment shows a chip for each arm, with the number of changes written for it. Select a chip to write that arm’s content. Select it again to go back to the edition’s own.
- Write the arm’s content. See Write each arm’s content.
- Select Save.
An edition takes up to three experiments, each one once. An attached experiment that the list no longer offers stays
in the section, flagged, so you can remove it. That happens when it was removed from Statsig, is no longer keyed on
userID, or Statsig is no longer the experiment provider.
Saving refuses what it adds, and names the reason, when:
- Statsig is not the deployed experiment provider;
- the experiment is not synced, is gone from Statsig, or is not keyed on
userID; - the content names an arm the synced experiment does not have;
- the experiment reads something an email cannot know (see above);
- two experiments vary the same field.
To check what an experiment reads, EdgeKit reads Statsig’s current config when you save a newly attached one. If Statsig does not answer, the save still goes through, and Checks warn. An experiment already saved is never refused again, even once Statsig changes it: Checks warn instead, so an unrelated edit always saves.
Duplicate copies an edition’s experiments and arm content. A new edition starts with none: arm content belongs to one edition, so a long-running experiment is attached and written again on each edition.
Write each arm’s content
Section titled “Write each arm’s content”With an arm’s chip selected:
- Subject and Preheader are this arm’s, in every variant. Leave a field empty to send the edition’s own.
- Rich-text slots edit this arm’s text. Copy the edition’s starts it from the edition’s own.
- Curated slots take this arm’s stories, from the same search.
- Feed slots are the same in every arm, so a feed fills once per edition.
Arm content follows the rules for the edition’s own: up to 500 characters for the subject and preheader, no {{ or
{%, up to 500 blocks of rich text, and up to the slot’s number of stories.
Anything left empty sends the edition’s own content to that arm, so you write only what differs. Each field can vary on one experiment only: the subject, the preheader and each slot. Two experiments in one edition must vary different fields, for example one the subject and the other the lead story.
Who sees what
Section titled “Who sees what”| Recipient | Sees |
|---|---|
| In an arm that has content for the field | That arm’s content |
| In an arm with nothing written for the field | The edition’s own |
| In no arm: not allocated, held out, outside targeting, or not started | The edition’s own |
| Anyone, once an arm is shipped in Statsig | The shipped arm’s content |
A slot that is empty in the edition’s own content but has an arm’s content is sent for that arm only. Everyone else gets no slot there. Arm content alone does not fill an edition: one whose own slots are all empty at the send time is skipped.
The public archive shows the edition’s own content, never an arm’s. With Skip items an earlier edition sent on a feed, a story that any arm carried counts as sent.
Variants and arms
Section titled “Variants and arms”Variants and arms do different jobs, and they work together:
- A variant decides who receives. It goes to its own delivery segment, with its own template, and Braze reports on it.
- An arm decides what one recipient sees, in whichever variant they receive.
An arm’s subject and preheader replace every variant’s for that arm’s recipients. A recipient in no arm sees their variant’s own. An arm’s slot content shows in each variant whose template shows the slot: the cut template shows the first two slots only. It replaces a variant’s own slot content too, for that arm’s recipients.
Braze still counts each variant as one message, so it has no per-arm results. Read them in Statsig.
Preview each arm
Section titled “Preview each arm”The arm picker beside the preview’s width switch chooses what the preview shows: Edition’s own, or one experiment’s arm. With an arm chosen, the preview shows that arm’s subject, preheader and slots, with your unsaved changes, and the slots in the editor edit that arm. The arm chips and the picker change the same choice.
Preview as one user
Section titled “Preview as one user”View as user, at the top right of the preview, shows the email one user would get. Search by name, email or email domain and pick someone:
- Arms. The preview shows that user’s arm of every attached experiment, as saved, with the arm’s subject and preheader. Statsig’s own assignment decides it, computed in EdgeKit. No exposure is logged.
- Variant. On SendGrid the preview switches to the variant whose bucket range holds the user. If no active variant’s range holds them, the preview says the send skips them. On Braze the variant stays the one you chose: Braze picks the segment, and EdgeKit cannot know it before the send.
- Their values. Their first name, user id and email fill the email’s placeholders, and Braze’s campaign id fills a link’s. A newsletter link carries that user’s real signature, so the link works as theirs: treat a copied preview link as you would the user’s own email. Values that exist only at the send, such as Braze’s dispatch id, stay as placeholders.
The editor follows: the variant chip and the arm picker move to the user’s variant and first arm. Choosing another variant or arm yourself, or saving, ends the view. An experiment you attached but have not saved is not assigned.
Checks
Section titled “Checks”With an experiment attached, Checks add The experiments compile against Statsig. It compiles each experiment against Statsig’s current config, as the send would. It only warns, and never blocks scheduling:
- An experiment that would send the edition’s own content, and why: it no longer compiles, Statsig’s config cannot be read, or Statsig is no longer the experiment provider.
- Content for an arm Statsig no longer has, because the arm was renamed or removed. That content is not sent. Write it again under the arm’s new name, or remove it.
Checks also warn, on the render check and for any email, when it is over its messaging provider’s body limit, 400 KB on Braze. Braze receives every arm’s version in one body and picks one per recipient, so each arm’s content adds to it.
Send a test
Section titled “Send a test”A test send compiles each experiment from Statsig’s current config, as a real send does. Each person in the test group gets the arm they really get, by their EdgeKit user id: subject, preheader and body. A test send logs no exposure.
To put a tester in a given arm, add an override for their user id in Statsig. To see every arm without sending, use the preview.
At the send time
Section titled “At the send time”When the edition starts sending, EdgeKit compiles each attached experiment once, from the Statsig config it holds then. That one copy is kept with the edition’s email sends. Every variant uses it, and Force resend reuses it. A change in Statsig during or after the send never changes the arm a recipient got, or the arm logged for them.
So arms are fixed per edition. A new split in Statsig applies from the next edition. Until then, your site and the last edition can give a user different arms.
An experiment never stops an edition. An experiment can fail to compile at the send, Statsig’s config can be unreadable, or Statsig can stop being the experiment provider. If that happens, every field the experiment varies sends the edition’s own content to everyone, and the experiment logs no exposures. The edition page shows it under the send: Sent with the edition’s own content, and the reason.
Exposures in Statsig
Section titled “Exposures in Statsig”Once an edition is fully sent, EdgeKit logs its exposures to Statsig in the background, apart from the send:
- Who: the users subscribed to the publication’s list at the moment the edition was first sent, read from the list’s history. A user who unsubscribes after the send is still logged. A user who subscribes after it is not. An erased user is never sent.
- Which arm: the arm the email rendered, from the copy kept at the send.
- Which rules: experiment groups only. A recipient in no arm, held out, outside targeting, or in an experiment with a shipped arm is not logged.
- When: each exposure carries the time the edition was first sent.
The exposures use the same userID as your site’s, so Statsig joins web and email results in one experiment.
The edition page shows the outcome under its sends: how many exposures were logged and when, or why none were. None are logged when every experiment was dropped at the send, the publication has no list, or EdgeKit holds no Statsig server secret for your organization.
A partially sent or failed edition logs no exposures. If a Force resend then brings it to sent, they are logged then. When Statsig refuses a request, EdgeKit tries that batch of users again. A batch tried again can repeat exposures, and Statsig analyses a user’s first one. If Statsig keeps refusing, EdgeKit stops, and the edition page says that some exposures may be missing.
Ship the winner
Section titled “Ship the winner”When you ship an arm in Statsig, every recipient of a later edition with the experiment attached gets the shipped arm’s content, and no exposure is logged. Editions already sent keep the arms they had.
Arm content belongs to each edition. Once an arm has won, write its content into the edition’s own and remove the experiment.
Limits
Section titled “Limits”- Up to three experiments per edition, and one experiment per field.
- The subject, preheader, rich-text slots and curated slots vary by arm. Feeds and push do not.
- Braze’s 400 KB body limit counts every arm’s content.
- Exposures count the list’s subscribers at the send, which is more people than Braze delivered to. Braze leaves out people it counts as unsubscribed, invalid addresses, and anyone outside each variant’s delivery segment. Exposure on open would be less exact still: a subject test changes who opens, and Apple Mail Privacy Protection reports opens that never happened.
- An exposure already in Statsig stays there when the user is erased later.
- Results are Statsig’s. EdgeKit computes none, and Braze reports per variant only.