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 --versionExpected:
fx 0.5.32. Validate the examples
cd examples/marketing-site
fx validate experiments/Expected:
3 experiment(s) valid.3. Start the local dev server
fx devBy default this starts on http://127.0.0.1:8787.
If that port is already in use, choose another port:
fx dev --port 87884. 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/manifestIf you used another port:
curl http://127.0.0.1:8788/manifestYou should see all three experiments in the manifest:
docs-entrypointhomepage-hero-ctaplatform-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-ctaCommon 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 8788To find the process:
lsof -nP -iTCP:8787 -sTCP:LISTENManifest 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 devConnecting these examples to a website
The YAML files define experiment payloads. A live website needs a small SDK integration that:
- fetches the manifest,
- activates the relevant experiment,
- reads the variant payload,
- updates the matching UI placement,
- emits exposure and conversion events.
Example placements:
hero-primary-ctachanges the main homepage CTA.hero-headlinechanges the homepage headline and subheadline.nav-docs-linkchanges the docs navigation link.