/Docs

How Experiments Execute

Understanding what happens under the hood when the A vs B snippet loads will help you build better experiments, debug issues faster, and avoid common pitfalls. This section covers the full execution lifecycle — from the moment the snippet tag is parsed by the browser to the moment events are sent to A vs B servers.

Overview

When a visitor loads a page on your website, the following happens in sequence: the snippet loads and hides the page, it fetches your experiment configuration, it reads or creates the visitor's cookie, it evaluates each experiment against targeting rules and audience conditions, it injects variation code, it reveals the page, and it begins tracking events. Each of these stages is covered in detail in this section.

Pages in this section