Build a hybrid pricing and billing system like Segment, the Customer Data Platform leader, based on subscription plans, with a usage-based component that makes your revenue grow with your users.

Summary

1

Track unique users with a billable metric

Meter unique users with a billable metric by using the unique_count_agg aggregation type. (More here).

2

Create a plan with tiers of MTUs

Create a new price plan with tiers of tracked users, using the graduated pricing model. (More here).

3

Ingest usage for unique users in real-time

Ingest raw usage of users that are automatically deduplicated by Lago. (More here).

Pricing structure

Segment offers three pricing plans, called ‘Free’, ‘Team’ and ‘Business’. As the latter has a custom pricing, we will focus on the first two plans.

PlanFree planTeam plan
Subscription Fee$0/month$120/month
Base Consumption (included)1,000 MTUs10,000 MTUs
Consumption (10k-25k MTUs)n/a$0.012/month/MTU
Consumption (25k-100k MTUs)n/a$0.011/month/MTU
Consumption (100k+ MTUs)n/a$0.010/month/MTU
Trial Periodn/a14 days

The usage-based component in Segment’s pricing is related to monthly tracked users (MTUs), namely the number of unique users whose data is stored on the platform each month. As these are unique users, we must ensure that each user is counted only once during the billing process.

Now let’s see how we can implement Segment’s pricing plans using Lago.

Step 1: Keep track of unique users

Segment has implemented a graduated pricing model, based on the number of MTUs.

MTUsPrice
10k-25k MTUs$0.012/unit
25k-100k MTUs$0.011/unit
100k+ MTUs$0.010/unit

Therefore, we need to calculate the number of unique users in order to implement our second pricing plan.

We are going to use a billable metric, which will allow us to aggregate incoming events on the platform to measure consumption.

We have created a billable metric, called Monthly Tracked Users, which includes the user_id property. In addition to this, we have defined unique_count_agg as the aggregation type.

What does this mean? Every time the customer data platform (e.g. Segment) records a new activity, a mtu event will be sent to Lago, which will then use the user_id property to deduplicate users to get only the total number of unique ones.

Step 2: Create a plan with tiers

It’s time to create our Team plan. The subscription part is similar to the ‘Free plan’ (except that the amount is now $120). We can also add the 14-day free trial currently offered by Segment.

To charge customers for consumption (i.e. based on MTUs), we need to add a charge to our plan. Using the mtu billable metric created previously, we have implemented the graduated pricing model to reproduce Segment’s pricing, including 10,000 free units (i.e. 10,000 unique users).

Following this example, for a customer on the ‘Team’ plan with 30,000 MTUs, at the end of the month, their invoice will amount to:

  • $120 (first 10,000 MTUs)
  • $180 (next 15,000 MTUs)
  • $55 (last 5,000 MTUs)

Our pricing plan is now ready!

Step 3: Ingest usage for unique users in real-time

For every user accessing Segment’s platform, an event is dispatched containing the user_id property. Lago seamlessly handles deduplication to ensure accurate tracking of unique users.

Wrap-up

Hybrid pricing plans are very popular among SaaS, API, fintech and data companies like Segment.

With Lago, you can easily adapt this template to create your own hybrid pricing plan, using some of our most popular features:

  • Plan models, including monthly/yearly plans that can be paid in advance or in arrears;
  • Billable metrics, including multiple aggregation types; and
  • Charges, including our graduated pricing model (and more).

Give it a try, click here to get started!