FabricFabricExperiments
Getting started

Run the marketing site examples

Validate, apply, serve, and test the included marketing site experiment examples with the fx CLI.

The repository includes three example experiments for testing Fabric Experiments against a generic B2B marketing website:

  • homepage-hero-cta — tests primary hero CTA text and destination.
  • platform-positioning — tests homepage headline/subheadline positioning.
  • docs-entrypoint — tests which docs link gets more engagement.

These examples are payload-driven. They do not change a live website until that website installs the web SDK and maps each payload to the relevant UI placement.

1. Install the CLI

npm install -g @fabricorg/experiments
fx --version

Expected:

fx 0.5.3

2. Validate the examples

cd examples/marketing-site
fx validate experiments/

Expected:

3 experiment(s) valid.

3. Start the local dev server

fx dev

By default this starts on http://127.0.0.1:8787.

If that port is already in use, choose another port:

fx dev --port 8788

4. Apply the examples

Open a second terminal:

cd examples/marketing-site
fx apply experiments/

Then check the manifest:

curl http://127.0.0.1:8787/manifest

If you used another port:

curl http://127.0.0.1:8788/manifest

You should see all three experiments in the manifest:

  • docs-entrypoint
  • homepage-hero-cta
  • platform-positioning

5. Send test events

Send an exposure:

curl -X POST http://127.0.0.1:8787/v1/exposure \
  -H 'content-type: application/json' \
  -d '{"experimentId":"homepage-hero-cta","subjectId":"visitor-1","variantKey":"start-building","manifestVersion":1}'

Send a conversion:

curl -X POST http://127.0.0.1:8787/v1/conversion \
  -H 'content-type: application/json' \
  -d '{"subjectId":"visitor-1","eventName":"signup","value":1,"at":"2026-05-08T21:00:00.000Z"}'

Read the report:

fx report homepage-hero-cta

Common issues

EADDRINUSE: address already in use 127.0.0.1:8787

Another process is using the default port. Either stop it or run:

fx dev --port 8788

To find the process:

lsof -nP -iTCP:8787 -sTCP:LISTEN

Manifest shows the wrong experiment

fx dev serves the workspace it was started from. If your manifest shows a different experiment, stop the old dev server and start it from examples/marketing-site:

cd examples/marketing-site
fx dev

Connecting these examples to a website

The YAML files define experiment payloads. A live website needs a small SDK integration that:

  1. fetches the manifest,
  2. activates the relevant experiment,
  3. reads the variant payload,
  4. updates the matching UI placement,
  5. emits exposure and conversion events.

Example placements:

  • hero-primary-cta changes the main homepage CTA.
  • hero-headline changes the homepage headline and subheadline.
  • nav-docs-link changes the docs navigation link.

On this page