Start an A/B test
experiment_createSize and start an A/B test on one page against one goal. The site must be in Attribution mode. Reads the page's last 28 days, works out the visitors each variant needs to detect the lift (mde, default 0.2 = 20%) and how many weeks that takes, and refuses a test that would take over 12 weeks or a page under 50 testable visitors a week, with the numbers. On success it returns the code to put on the page (Next.js with @shipfound/next, or plain HTML with sf.variant), which you ship as a PR. The control is the first variant. Free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Lowercase key the page's code uses, e.g. pricing-headline | |
| mde | No | ||
| goal | Yes | A goal on the site, by name or id (see goals) | |
| name | Yes | ||
| path | Yes | The page, e.g. /pricing (* as a wildcard) | |
| site | No | The site's domain, when the workspace tracks more than one | |
| variants | No | Default ["control", "b"]; the control first | |
| hypothesis | Yes | What changes, for whom, why it should move the goal, and the analytics evidence |