Documentation
Short pages, one topic each, written to be read by people and by coding agents. Every page is also plain Markdown at the same URL with .md appended, and the whole set is in llms-full.txt.
Start
Getting started
Set up SplitHub in a website or an app, collect pageviews, screens and events, create an experiment and read its verdict.
How it works
Config file as source of truth, analytics properties, deterministic assignment, exposures and goals, self-hosted vs cloud.
splithub.config.ts
Every field of the config: storage, goals, properties, experiments, variants, traffic, schedule, targeting.
Analytics
Experiments
Redirect experiments
Test whole pages: match a path, send each variant to its own URL with middleware, a script or short links.
Targeting flows
Country, device, UTM, cookie, time, platform and app version conditions as a node graph, in the dashboard and in the config.
Goals and revenue
Any event as a goal, pageview and click goals, revenue props, attribution by first exposure.
Statistics and verdicts
A sequential test that is safe to peek, SRM check, minimum sample, data-quality stars, guardrails, when a verdict is final.
SDKs
React
SplitHubProvider with a property, <Experiment>/<Variant>, useVariant, useValue, useTrack, useIdentify, automatic pageviews.
Next.js
Middleware, Server Components, redirect experiments without flicker, live overrides, analytics on the provider.
Drop-in script
sh.js for sites without a build step: pageviews and events with data-property, redirect experiments, splithub.track and identify.
Apps
Apps
A/B testing and analytics in mobile apps: screens as page views, app version targeting, offline events, retention, and why app experiments live in the cloud.
React Native and Expo
@splithub/react-native: install with npx splithub init, SplitHubProvider, Expo Router and React Navigation screens, hooks, offline queue, release builds.
iOS (Swift)
The SplitHub Swift package for iOS and macOS: SplitHub.start, variants and values, SwiftUI SplitHubExperiment, screens, events, offline and QA.
Android (Kotlin)
io.splithub:splithub for Android: SplitHub.start in Application, variants and values, Jetpack Compose Experiment and TrackScreen, offline and QA.
Tools
CLI reference
init (websites, React Native, Expo, iOS, Android), create, start/pause/finish, status, results, analytics, push, pull, login, doctor, skills.
MCP server
@splithub/mcp for Claude Code, Cursor and Codex: tools for experiments and analytics on websites and apps, setup, working rules.
Agent skills
The nine skills the CLI installs and how an agent uses them to run experiments and analytics correctly, on websites and in apps.
HTTP API
Ingest of exposures, goals, pageviews and events, experiment and property endpoints, key scopes, live overrides JSON, errors.
Cloud and data
Self-hosted (your database)
The ingest handler, the Store interface, Postgres/MySQL/SQLite/D1, the events table, attribution SQL, raw analytics counts.
SplitHub Cloud
Dashboard for analytics and experiments, projects, keys, live overrides, event gate, retention, what is billed.
Alerts, digest, AI reviews
Rules that pause or finish tests, channels, the scheduled digest, AI reviews at start, during progress checks and on finish.
Short links
Weighted and targeted destinations, sticky choice, UTM pass-through, click stats, QR codes.
Plans and limits
Free, packs and Pro side by side, what counts toward the allowance (exposures, pageviews, events), what happens at the limit.