Data integrations
Custom metrics
Define KPI metrics from your imported events to measure routing impact
After you import events from your analytics platform, create custom metrics in Portal. The metrics aggregate those events. Link them to routers to see how routes and variants affect your business KPIs.
Prerequisites
Before creating a custom metric, you need:
- At least one integration (Mixpanel or BigQuery) with import enabled
- At least one event configured for import in that integration
Creating a metric
Open the New Metric dialog
In Portal, open Routers > Metrics, then click Custom Metric.
Choose an aggregation type
Select how the event should be aggregated:
| Aggregation | Description |
|---|---|
| Unique Users | Count of distinct users who triggered this event |
| Total Events | Total number of event occurrences |
| Property Sum | Sum of a numeric event property across all occurrences |
| Property Average | Average of a numeric event property across all occurrences |
If you choose Property Sum or Property Average, an additional Property dropdown appears. Select the numeric property to aggregate — available properties are automatically discovered from your imported event data.
Set the target direction
Choose whether a higher or lower value indicates improvement:
- Increase ↑ — Higher values are better (e.g., conversion rate, revenue)
- Decrease ↓ — Lower values are better (e.g., error rate, churn)
Portal uses the target direction to visually indicate whether metric trends are positive or negative.
Associating metrics with routers
Link custom metrics to specific routers to show their trends by route and variant on each router's dashboard. This lets you compare how routing configurations affect your KPIs.
To associate a metric with a router, you can either:
- Select the router when creating the metric
- Edit an existing metric and add router associations
Editing and deleting metrics
Open Routers > Metrics and click the edit button for a metric. You can update:
- Display name and description
- Event, aggregation type, and property
- Target direction
- Router associations
The metric identifier (shown as "Name" when editing) is set at creation time and cannot be changed.
To delete a metric, click its Delete metric button on the Metrics page, then confirm with Delete.