How Experiments Execute

Knowing what the A vs B snippet does, step by step, helps you build better experiments and debug problems faster. This section walks through the full lifecycle, from the snippet tag loading to an event reaching A vs B's servers.

Overview

Every page load runs the same fixed sequence:

  1. The first install tag hides the page before the browser paints it, so visitors never see a flash of the original content.
  2. The loader tag fetches the snippet bundle.
  3. The bundle fetches your project's datafile (the file listing everything active in your project: experiments, metrics, and more).
  4. The snippet reads the visitor's cookie, or creates one for a first-time visitor.
  5. It checks each experiment's targeting rules (the conditions that decide who is eligible) and audiences (named, reusable groups of visitors).
  6. It injects the code for whichever variation (one specific version being tested, control or one of the challengers) each visitor should see.
  7. It sets up tracking for the metrics on running experiments.
  8. It reveals the page.

Each stage is covered in detail across the pages below.

Pages in this section

Was this helpful?