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

Creating metrics

Read time: 3 minutes
Last edited: Aug 15, 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
Click 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 customers contact customer service within a set period of time?
Do customers renew their contract within 30 days?
Do customer payments succeed?

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 view 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:

  • Click conversion metrics
  • Custom conversion/binary metrics
  • Custom numeric metrics
  • Page view conversion metrics

Edit metrics

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 Edit metric in the "Event information" section. You can edit a metric's key, unit of measure, success criteria, randomization units, and tags.
  4. 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.

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

You can also use the REST API: Delete metric