On this page

How Metrics Work on Statsig

Understand the fundamentals of how metrics are calculated and used in Statsig experiments and feature gates.

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. You can aggregate this value 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. You can aggregate these values 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 from those environments. Tracking lower-environment data lets you validate your experiment setup before launching to production. Statsig prioritizes production data for final Pulse result analyses.

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?

Statsig bills each event (or a row when importing from your data warehouse) once, regardless of how many experiments use the event.

Was this helpful?