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.
- Click on the + metric tile.
- Select Custom metrics from the left pane of the pop-up window.
- Click the + Create new metric button. This will open the Create Metric window.
- Give your Custom Metric a Name. Try to be clear and descriptive.
- Under Based on metric, click Choose a metric... Find your metric in the Choose a metric window and click on it to add it.
- Under Second metric, follow the same steps above to choose a metric.
- Under Operation, select an operator (division, multiplication, etc.) to operate on the two metrics.
- (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).
- (Optional) Under Units, add the units for this metric.
- 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.
- 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, refer to the Event parameter metrics and State metrics topics.
Edit a custom metric
You can edit any of the custom metrics in your app.
- In the Analytics Dashboard, click on the + metric tile at the bottom.
- Select Custom metrics in the left pane of the pop-up window.
- Find the custom metric you'd like to edit.
- Click the pen icon for that metric.
- Make changes to the metric following the guidelines above for new custom metrics.
- Once you're done making changes, click Finish to save them.
Delete a custom metric
- In the Analytics Dashboard, click on the + metric tile at the bottom.
- Select Custom metrics in the left pane of the pop-up window.
- Find the custom metric you'd like to edit.
- Click the trash icon to delete that metric.
Updated about 3 years ago