No results for ""
EXPAND ALL
  • Home
  • API docs

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 typeExample usesExample randomization unit
Clicked or tapped conversion

How often do customers click a "Save" button?
How many times do customers click on a link?
When is the best point during a process to display a sign-up invitation?

user
Custom conversion binary

Do customer searches call a particular service?
Do customer payments succeed?
Do customers contact customer service within a set period of time?
Do customers renew their contract within 30 days?
Does this process generate an error?

user
organization
Custom conversion count

How many purchases did a customer make?
How many times per quarter do customers contact Support?

user
organization
Custom numeric

How much do customers spend per transaction in my store?
How much do customers spend in total?
How many items do customers purchase per transaction?
How many items do customers purchase total?
How much time do customers spend on a page?
How long does it take for a server to respond to a request?
How long until the time to first byte (TTFB)?

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:

  1. Navigate to the Metrics list.
  2. Click the title of the metric you want to edit. The metric details screen opens.
  3. Click the pencil icon in the right sidebar next to the field you want to edit. The "Edit metric" dialog appears.
  4. 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:

  1. Navigate to the Metrics list.
  2. Click the title of the metric you want to delete. The metric details screen opens.
  3. Click Delete metric. A "Delete metric" dialog appears.
  4. Click Delete metric.

This metric is now deleted permanently across all environments in the project.

You can also use the REST API: Delete metric