Events received
A tracking API company measures usage with thetracked_pages metric. The customer’s contract contract_example has a monthly billing period, January 1 to January 31, 2027. Your backend sends two events:
Event received #1
Event received #2
Result per aggregation type
Weighted sum also accounts for how long the running total applies within the billing period. Here the total is 10 for one day (January 16 to 17), then 30 for the remaining 15 days of January: (10 × 1 day + 30 × 15 days) / 31 days = 14.84.
Next step
Connect your metric to a Product, then configure pricing through a Rate Card.Aggregation types
Compare the available aggregation types.
Rates
Price the aggregated quantity.
Create a billable metric (API)
POST /billable_metricsIngest usage
Send usage events to Lago.