How StatsKit fits together
StatsKit is a set of pieces that share one event stream. You install the tracker once, and experiments, flags, metrics, the REST API, and the MCP server all read from or write to the same data.
The pieces
Section titled “The pieces”- The tracker (
v.js): a small browser script that collects page views, clicks, and conversions from your site. See Install the tracker. - Experiments: A/B tests of element, CTA, or manual types, rendered by the tracker or your server. See How experiments work.
- Feature flags: gradual rollouts and kill switches, evaluated through
@statskit/sdk. - Metrics: custom metric definitions computed over the events you already send. See Custom metrics.
- The REST API: manage experiments, flags, metrics, and segments over HTTPS at
/v1/*with a secret key. See the API overview. - The MCP server: lets AI agents create experiments and flags directly. See MCP.
How data flows
Section titled “How data flows”Your site sends events through the tracker to the edge ingest endpoint, which lands them in Tinybird. The dashboard and results views read from there.
Your site v.js tracker
edge.statskit.ai event ingest
Tinybird event storage
Dashboard results & metrics
- The tracker on your page captures a page view, click, or conversion.
- It posts the event to the edge ingest endpoint at
https://edge.statskit.ai. - The edge worker stores the event in Tinybird.
- The dashboard reads from Tinybird to show live events, experiment results, and metrics.
Everything else, experiments, flags, and metrics, is analysis and configuration layered over that same stream. Experiment assignments and flag evaluations are attributed back to the visitor who generated the events.
Explore each area
Section titled “Explore each area” Install the tracker Drop one script tag and start collecting events.
Experiments A/B test elements, CTAs, or server-rendered features.
Feature flags Roll out and kill features with the SDK.
Custom metrics Define metrics over your event stream.
REST API Manage everything over HTTPS with a secret key.
MCP server Let AI agents drive StatsKit directly.