Usage events & metrics

Usage events

Usage events are discrete records of actions or activities that occur within your application. They track specific interactions such as:

  • Feature activations
  • Completed workflows
  • Resource consumption
  • Business transactions (orders, emails, etc.)

These events form the raw data layer for Mantle's analytics, billing, and feature entitlement systems.

Usage metrics

Usage metrics aggregate event data into meaningful measurements. They transform individual events into quantifiable insights by:

  • Counting occurrences of specific events
  • Summing values from event properties
  • Tracking unique users performing actions
  • Measuring activity over defined time periods

Their function in Mantle

Usage events and metrics serve several key functions:

  • Billing operations: Power usage-based billing, tiered plans, and hybrid pricing models
  • Feature entitlements: Control access to features based on usage limits
  • Analytics: Provide visibility into customer behavior and feature adoption
  • Customer insights: Identify patterns in how users interact with your application

Implementation flow

The typical implementation follows these steps:

  1. Send usage events to Mantle via the API
  2. Configure metrics to aggregate these events
  3. Connect metrics to plans or features (optional)
  4. Query metrics for billing or analytics purposes

Next Steps

To implement usage events in your application, see:


Did this page help you?