A/B experiments and user flows
AnalyticFast uses existing pageviews and goals for user flows. No tracker update is needed. Open User flows on the dashboard, choose a page or goal, and see the next three steps. To conversion works backwards from a goal or payment within a session. Reverse diagrams read from right to left; top paths always read chronologically.
Record an exposure
Create a definition in Settings → Experiments with a unique key, conversion goal (or payment), and optional control variant. Definitions begin measuring at creation time and become immutable; use a new key for a new test. End a definition to freeze its window. Deleting a definition keeps the underlying exposure events, so the key can be rediscovered.
Copy the assignment helper from the experiment card. It randomly chooses between two variants, persists the assignment in localStorage, and falls back to page memory when storage is unavailable. Honor your consent policy before assigning or recording. Render the assigned variant first, then call this after the tracker has loaded:
window.analyticfast?.('goal', 'af_experiment', {
experiment: 'pricing-page',
variant: 'B'
});
Use keys containing 1–64 letters, digits, hyphens or underscores, and nonempty variant names up to 64 characters. af_experiment is a reserved system goal, excluded from customer goal lists, goal rollups, insights and funnel step selection. It cannot itself be a conversion target. No extra script or dependency is added to the tracker.
Keys seen in exposure events without a definition appear as discovered. These use payment as their provisional conversion target. Defining one starts a fresh window; it does not reinterpret old events.
Interpret the report
Each visitor is assigned to their first observed variant in the effective report window. Repeated exposures count once. If they see several variants, their first assignment wins and the conflict count is shown. Conversions must occur strictly after exposure, within the same site and window; they may happen in another session. Each visitor converts at most once. Payments require a positive payment event; refunds alone cannot convert a visitor.
Revenue per visitor includes net payment amounts after exposure, including negative refunds, in the site's reporting currency. Other currencies do not contribute to this metric. Goal conversions can generate revenue later in the window, so revenue is measured independently of the chosen goal. Unattributed payments without a visitor ID cannot count.
Uplift compares conversion rates with the configured control, or the alphabetically first observed variant if the control is absent. Zero control conversions give no relative uplift. A pooled two-proportion z-test supplies a two-sided p-value. The directional normal approximation is labelled “chance to beat control”; it is not a Bayesian posterior probability. At least 100 exposed visitors, 10 conversions and 10 non-conversions in both compared variants are required before showing evidence. A p-value below 0.05 is marked significant. Repeated peeking and multiple comparisons raise the false-positive rate; decide your stopping rule before starting a test.
Bounds and accuracy
- All raw reports cover at most the latest 31 days of the requested range. Experiments additionally respect their creation and end times. Older first exposures are not searched outside this window, so long-running experiments show a windowed snapshot, not lifetime inference.
- Flows consider at most 500 recent sessions that started within that range and 24 pageview/goal events per session. Consecutive duplicate pages collapse. Long paths and report boundaries can affect drop-off; the UI reports truncation. The diagram selects one most recent matching session per visitor so widths stay consistent. Each column keeps its four largest nodes and groups the tail into Other. Payment anchors use the first positive payment attached to a sampled session, rather than an attribution trail spanning sessions. Payments after a truncated event prefix are omitted, so the diagram never connects across unseen steps.
- Results read the earliest 2,000 matching exposure events in the window; repeated exposures consume this budget. At most 50 variants are shown. Discovery checks the latest 2,000 exposure events and shows up to 50 undefined keys. Sampling flags are explicit. Reduce the date range for more complete results.
- Session filters and country exclusions are applied to flow sessions and experiment exposure sessions. Conversion events may occur in other sessions. Discovery lists are unfiltered. Imported aggregate data has no ordered event paths or experiment exposures.
- Visitor identity depends on your tracker/identify setup. Cross-device identity, consent gaps, cookie deletion and blockers can affect assignment and conversion counts.
API and MCP
Cookie-authenticated dashboard endpoints:
GET /api/sites/:siteId/user-flows?period=30d&direction=forward&start=page:/pricing
GET /api/sites/:siteId/experiments?period=30d
GET /api/sites/:siteId/experiments/:key/results?period=30d
POST /api/sites/:siteId/experiments
PATCH /api/sites/:siteId/experiments/:key/end
DELETE /api/sites/:siteId/experiments/:key
Create JSON: {"key":"pricing-page","name":"Pricing headline","conversion_target":"payment","control_variant":"A"}. Creation, ending and deletion require an admin or owner. Analytics reads require dashboard entitlement. All definitions and events remain scoped to one accessible site.
MCP tools user_flows and experiments require an analytics-read token and respect its workspace and optional site binding. Pass site_id, a date range, optional session filters, and either start/direction for flows or key for experiment results. Omit key to list definitions and discoveries. MCP money is in major currency units; dashboard API money is in minor units.