Skip to main content
Create metrics that aggregate measurements across instances of an entity.

Before You Begin

Before creating a metric, ensure you have:
  • An API access token with appropriate permissions
  • Created the entity you want to measure
  • Created a fact table with the measurements to aggregate
  • Determined the aggregation type and time windows

Create an Average Metric

Create an average metric that measures the average sales amount per user:

Create a Ratio Metric

Create a ratio metric like conversion rate:

Aggregation Types

For average metrics, choose how to aggregate data within units:
  • AGGREGATION_TYPE_SUM: Sum all measurements
  • AGGREGATION_TYPE_COUNT: Count occurrences
  • AGGREGATION_TYPE_COUNT_DISTINCT: Count unique values
  • AGGREGATION_TYPE_MAX: Maximum value
  • AGGREGATION_TYPE_MIN: Minimum value
  • AGGREGATION_TYPE_UNIQUE: Single unique value (fails if multiple values exist)

Time Windows

Aggregation Window

The aggregationWindow defines how long after exposure to aggregate measurements:
Common windows:
  • 86400s: 1 day
  • 604800s: 7 days
  • 2592000s: 30 days

Exposure Offset

The exposureOffset defines how long to wait after exposure before starting measurement:
Example with delay:

Variance Reduction (CUPED)

Enable or disable variance reduction to improve statistical power:

Enabled (Default)

Disabled

Next Steps

After creating metrics:
  • Configure experiments to track these metrics
  • Analyze experiment results using these metrics
  • Create additional metrics to measure different aspects of user behavior