Creating and managing metrics
Read time: 3 minutes
Last edited: Nov 07, 2024
Overview
This topic explains how to create, edit, and delete metrics, and how 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:
Metric type | Example uses | Example randomization unit |
---|---|---|
Clicked or tapped conversion | How often do customers click a "Save" button? | user |
Custom conversion binary | Do customer searches call a particular service? | user organization |
Custom conversion count | How many purchases did a customer make? | user organization |
Custom numeric | How much do customers spend per transaction in my store? | user guest request |
Page viewed conversion | How many times do end users view a blog post? | user |
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
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