Skip to main content

Overview

Statsig requires certain data schema in order for proper processing. We support 3 different types of datasets to be ingested into our platform:
  1. Custom Events
  2. Precomputed Metrics
  3. Exposure Events
During setup, we will ask you to map columns in your data output to fields Statsig expects and run a small sample query to make sure that there aren’t any basic issues with data types, the mapping, or the base query itself. Please note that we will cast fields into the appropriate type. For example, Statsig accepts string IDs, but it is okay to leave an ID field as an integer.

Custom Events

Events that are emitted by your application to measure the ongoing impact of your features and experiments.

Required

Optional


An example dataset for events might look like this: Note that:
  • One user can send multiple of the same event, with or without any changes in metadata. Statsig will aggregate these together.
  • You can send metadata in both of a json-formatted (only one-level deep) string, and/or pull in fields from columns. You can use metadata and values to generate custom metrics in the console, like sum(value) where “product_category”=“clothing”.
  • You can send multiple IDs on a single event. For example, the visit above would could for both user and visit level metrics/experiments. During the mapping flow you tell us which unit types your different IDs correspond to in statsig.


Precomputed Metrics

Precomputed metrics are a powerful way to leverage statsig for experiment results. Use these to send complex metrics and metrics that require delays due to attribution windows or long baking periods. Precomputed metrics in statsig are expected to be calculated at a user-day granularity.

Required


An example dataset for metrics might look like this: Note that:
  • In this dataset, unit types are in different rows from each other
  • Metrics can either have a value or a numerator/denominator pair. We will calculate any metric with numerator/denominator pair as a ratio metric. Ratio takes priority over value; if you provide all 3 fields, we will assume it is a ratio metric.
  • For users with null values, we will infer 0 for metric_value, and exclude null value users for ratio metrics.


Exposure Events

Exposure event import is deprecated. If this is an important use case, see Statsig Warehouse Native, available to Enterprise Customers
Exposure events are generated by your assignment tool, when it assigns your users to a certain variant of an experiment (e.g., show ad vs. hide ad).

Required

Optional