Statsig uses the raw events emitted by your application to compute a wide range of product metrics. These events contain the context you need to understand user behavior and infer their intentions.
Types of Raw Events
Statsig records two types of raw events from your application:
Exposure events track which users are assigned to control and test groups. This data allows Statsig to generate test results so you can evaluate the impact of new features and experiments. Exposure events also allow Statsig to assess the health of an experiment so you can always make key decisions based on trustworthy experiments. To generate experiment results, Statsig will require you to provide exposure events at a minimum.
Custom events track user actions and as any events that get triggered in the course of using your application, including events that capture performance (e.g. latency) or capture data for analytics (e.g. session start). These events allow Statsig to assess overall user engagement in your application (e.g. daily active users, weekly stickiness) as well as changes in user behavior as you roll out new features and experiments.
You must include at least one unit identifier when you record any raw events with Statsig. This unit identifier is essential for two reasons:
- Ensure that your users receive a consistent application experience when they're allocated to control or test groups in an experiment
- Join exposure events with all custom events triggered by a given user to compute experiment results
Ingesting Raw Events
You can ingest raw events into Statsig in three ways.
- Integrate with Statsig's client or server SDKs or HTTP API
- Set up Statsig as a destination in a data connector such as Segment, mParticle, RudderStack and Census
- Import from your data warehouse such as Snowflake, BigQuery, and Redshift.
Raw Events in Console
As you ingest custom events, you'll see these listed in the Metrics section under the Events tab in the Statsig console.
You can toggle between a list view or chart view of your events to view the trend line over time.
Statsig provides two unit identifiers by default: User ID and Stable ID. Select a unit identifier from the drop down to view all events that include the selected unit identifier. See the guide to create custom ID type to create additional unit identifiers for your project.
Statsig bills you for the two types of raw events outlined above. We only bill for production environment events, because analytics are only run on production environment events.
An Exposure Event is recorded for billing when you check a user for assignment in a Feature Gate or Experiment, or check for a value using a Dynamic Config.
- Statsig does not bill you for duplicate checks for the same user on the same Feature Gate, Experiment, or Dynamic Config within an hour.
- Statsig does not bill you for checks against Features Gates that are disabled.
- Statsig also does not bill you for checks for users who are in not participating in an experiment due to the allocation or targeting you have configured.
A Custom Event is recorded for billing when you log an event using the Statsig SDK (or import from your data warehouse, or ingest from your data collector). Each event may contain multiple unit identifiers and used in multiple experiments.
- Statsig bills custom events only once, regardless of the number of experiments where these events are used.