Skip to main content

How Metrics Work on Statsig

Warehouse Native users: You’re viewing the Cloud docs for this page. Metrics and experiments behave differently in Warehouse Native. Read more in About Warehouse Native.
A metric in Statsig is a numeric value for each user on a given day. This value can be aggregated across the entire user base or a subset, such as the test or control group of an experiment. For example, say one user made two purchases on September 1st, and another made only one. These values can be aggregated across multiple users to calculate the total number of purchases across all users on September 1st. By default, Statsig computes metrics from logged raw events in the production environment. When testing experiments in lower environments (such as development or staging) with Enable for Environments, you can track cumulative exposures and metric results collected from those environments. This allows you to validate your experiment setup before launching to production but production data is prioritized for final Pulse result analyses.

Two Sources of Statsig Metrics

There are two fundamental sources of metrics in Statsig:
  1. Raw Events
  2. Precomputed Metrics - You can provide these pre-computed values to Statsig
Statsig’s Stats Engine joins these metrics with your exposure events from feature gates and experiments to compute experiment results and analytics.
Statsig data flow architecture diagram
How are events and metrics billed? Each event (or a row when importing from your data warehouse) is billed once, regardless of how many experiments the event is used in.