Creating and managing metrics
Overview
This topic explains how to create, edit, and delete metrics, and how to select which metric type to use with LaunchDarkly features, such as experiments and guarded rollouts.
Choose a metric type
You should choose a metric type that correctly measures the effect of a change on your customers or codebase. If you are unsure of what metric type to use, it may be helpful to begin by determining what kind of data you are trying to measure. For examples of common metrics and how to configure them, read Example metrics.
This table includes examples of different kinds of data you can measure with different metric types, and common randomization unit context kind mappings:
When you create a metric, you must decide how you want to handle its metric and unit analysis. To learn more, read Metric analysis.
Create metrics
Click on the following links to learn how to create each metric type:
- Clicked or tapped conversion metrics
- Custom conversion binary metrics
- Custom conversion count metrics
- Custom numeric metrics
- Page viewed conversion metrics
Edit metrics
You can edit all of an existing metric’s settings except for its metric kind and metric key.
To edit a metric:
- Navigate to the Metrics list.
- Click the title of the metric you want to edit. The metric details screen opens.
- Click the pencil icon in the right sidebar next to the field you want to edit. The “Edit metric” dialog appears.
- Make the edits you want and click Save metric.
You can also use the REST API: Update metric
Filter metrics
After you create a metric, you can optionally configure metric event filters to control which events are included in its analysis. This lets you focus the metric on specific context attributes or event properties, such as events where the variationKey
is treatment
or the country
context attribute is CA
.
To learn more, read Filtering custom metric events.
Delete metrics
You should delete a metric only when you are sure you will no longer use it.
To delete a metric:
- Navigate to the Metrics list.
- Click the title of the metric you want to delete. The metric details screen opens.
- Click Delete metric. A “Delete metric” dialog appears.
- Click Delete metric.
This metric is now deleted permanently across all environments in the project.
You can also use the REST API: Delete metric