JavaScript SDK
One Script Tag. Zero Flicker. Full A/B Testing.
The CADENCE JavaScript SDK brings enterprise-grade A/B testing to any website with a single script tag. Lightweight, deterministic, and reliable -- it handles variant assignment, event tracking, and visual mutations without slowing down your site.
The Problem
Most A/B testing SDKs are bloated. They add hundreds of kilobytes to your page weight, hurt your Core Web Vitals, and introduce flicker where visitors see the original page flash before the variant loads. Some require complex server-side integration or framework-specific packages that lock you into a particular tech stack. And when visitors navigate away mid-test, conversion events get lost because the tracking fires too late. The result: unreliable data from a tool that makes your site slower.
How CADENCE Solves It
The CADENCE SDK is built from the ground up for performance and reliability:
Under 5kb total size means the SDK is smaller than most analytics pixels. It loads asynchronously and has zero measurable impact on page load performance or Core Web Vitals scores.
Deterministic variant assignment uses a hash of the user ID and experiment ID to assign variants. The same visitor always sees the same variant across sessions without any server-side state or cookies. No random assignment means no variant flickering between page loads.
Auto-batched event delivery queues exposure and conversion events, then flushes them every 5 seconds or when 10 events are queued. On page unload, remaining events are sent via the sendBeacon API for guaranteed delivery even when the visitor navigates away.
Anti-flicker protection optionally hides the page until all visual mutations are applied. Using requestAnimationFrame, variant changes render in a single frame so visitors never see the original content flash before the test variant appears.
Universal compatibility works on any website regardless of tech stack. Add one script tag with a data-project attribute and the SDK handles initialization, variant assignment, exposure tracking, and visual mutation application automatically.
Key Benefits
- Zero performance penalty -- under 5kb with no impact on Core Web Vitals or page speed scores
- Reliable data collection -- sendBeacon ensures events are delivered even on page unload
- No server-side setup -- a single script tag is all you need to start running tests
- Works everywhere -- static sites, SPAs, WordPress, Shopify, no-code builders, and custom frameworks
- Click tracking built in -- CSS selector-based click conversion tracking with delegated event listeners
Get Started
Add the CADENCE SDK to your site with one line of HTML and start running A/B tests immediately. No build step, no framework integration, no performance compromise. One script tag. Zero flicker.