Leanplum's user guides and developer documentation.

Leanplum Documentation

Leanplum's user guides, SDK setup, API docs, and more resources are here to help you get the most out of A/B testing, Campaigns, Messaging, and Analytics.

Custom metrics

How to create, edit, and delete custom metrics

Leanplum gives you the ability to easily create custom metrics based on the default, out-of-the-box metrics. Custom metrics, like the default metrics, will appear as tiles in the Analytics Dashboard and can be filtered, grouped and cohorted.

Create a custom metric

To start creating a custom metric, scroll to the bottom of the Analytics Dashboard.

  1. Click on the + metric tile.
  2. Select Custom metrics from the left pane of the pop-up window.
  1. Click the + Create new metric button. This will open the Create Metric window.
  2. Give your Custom Metric a Name. Try to be clear and descriptive.
  1. Under Based on metric, click Choose a metric... Find your metric in the Choose a metric window and click on it to add it.
  2. Under Second metric, follow the same steps above to choose a metric.
  3. Under Operation, select an operator (division, multiplication, etc.) to operate on the two metrics.
  4. (Optional) Under Scaled by, you can enter a number (usually 100) that will adjust the result of the custom metric. Most typically, this is used to convert a decimal to a percentage (by scaling the two divided metrics by 100).
  5. (Optional) Under Units, add the units for this metric.
  6. For I'd like this metric to, choose either increase or decrease depending on your goal for this custom metric. This will affect how changes are displayed in the Analytics Dashboard.
  7. Click Finish.

Example

Let's create a Custom Metric for Conversion rate based on two custom events: Add to Cart and Checkout.

  • Name the custom metic "Conversion rate".
  • Set the Based on metric to Event > Checkout > Total occurrences.
  • Set the second metric to Event > Add to Cart > Total occurrences.
  • Choose / for the operation.
  • Scale by 100.
  • Units are %.
  • We'd like this metric to increase.

📘

The Based on metric will serve as one of two metrics in a calculation, specifically the numerator if division is selected as the operator.

Metrics based on a numeric parameter

For events and states, Leanplum lets you create custom metrics from event or state parameters. To create a custom metric based on a numeric parameter:

See Metrics for event and state parameters for the full instructions.

Edit a custom metric

You can edit any of the custom metrics in your app.

  1. In the Analytics Dashboard, click on the + metric tile at the bottom.
  2. Select Custom metrics in the left pane of the pop-up window.
  3. Find the custom metric you'd like to edit.
  4. Click the pen icon for that metric.
  5. Make changes to the metric following the guidelines above for new custom metrics.
  6. Once you're done making changes, click Finish to save them.

Delete a custom metric

  1. In the Analytics Dashboard, click on the + metric tile at the bottom.
  2. Select Custom metrics in the left pane of the pop-up window.
  3. Find the custom metric you'd like to edit.
  4. Click the trash icon to delete that metric.

Updated 2 years ago


Custom metrics


How to create, edit, and delete custom metrics

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.