FabricFabricExperiments
Getting started

Add the web SDK

Use the lightweight browser SDK to fetch manifests, assign users, and emit exposure events.

The web SDK is intentionally small and delivery-focused. At M5.1 it is about 1.78 KB gzipped and covered by real-browser tests.

import { createClient } from "@fabricorg/experiments-web";

const fx = createClient({
  manifestUrl: "https://manifests-staging.example.com/acme/manifest",
  userId: currentUser.id,
  ingestUrl: "https://exposure-staging.example.com/v1/exposure",
});

const assignment = await fx.activate("homepage-cta");
if (assignment?.variantKey === "treatment") {
  renderNewCta();
}

Delivery contract

  • Fetch the current signed manifest.
  • Deterministically assign the user.
  • Keep sticky assignment across reloads.
  • Emit exposure once per client activation.
  • No-op safely for paused or malformed experiments.
  • Capture variant execution failures without breaking the page.

The SDK is not a full feature-flag platform. It is the delivery layer for governed experiments managed by the control plane.

On this page