Experimentation

Custom CSS and JS

The escape hatch, so a test is never blocked on what the editor can express.

Per variantRuns before paintTypeScript tolerated

Every variant can carry its own CSS and its own JavaScript alongside the changes made by pointing and clicking. This is where animations, conditional behaviour, third-party widget tweaks and anything else with real logic in it belong.

The code is embedded in the per-website bundle the visitor loads, so it runs as part of the variant rather than being fetched separately. It executes while the page is still hidden by the anti-flicker style, which is what stops a scripted change from being visible as a jump.

One convenience worth knowing about: variant JavaScript is passed through a TypeScript transpile step during generation, so type annotations pasted in from a codebase are stripped rather than shipped as a syntax error. If the code cannot be parsed at all, the original is embedded unchanged and the build warns naming the variant, rather than failing generation for every other website.

Custom code sits under the same fail-safes as everything else. An exception is captured and reported rather than thrown, and no failure path is allowed to leave the page hidden.

Better experiments, better conversions

Test on all visitors with the world’s lightest script and make confident decisions powered by real-time reporting.