Learn the basics of segmentation

Segmentation is a powerful and flexible tool designed to visualize trends and compositions within your data. You can analyze events, cohorts, and user profiles and display the data in various chart types.

Advanced segmentation features allow you to create formulas, compare current and past data, and generate custom events and properties for deeper analysis.

Use Cases

Here are some of the sample questions you can answer in segmentation:

  • Product Analytics

    • How is my WAU changing over time? (unique users)

    • How often are my users getting value? (frequency analysis)

    • What is the distribution of my users across regions / devices etc? (property breakdown)

  • B2B (in this case, a messaging application)

    • How many messages were sent in the US in the past 30 days? (total events, filtered)

    • How many users had a mobile app session yesterday? (unique events)

    • How many messages are sent per session? (formulas)

    • How much revenue was generated on plans purchased in the past year? (property aggregation)

    • How has the power users cohort grown over the past 6 months? (cohort trends)

  • Marketing

    • Which advertising campaigns generate the most checkouts? (property breakdown)

    • Which advertising campaigns generate the most revenue (property aggregation)

Quick Start

Step 1: Choose Events

Events can be the basic building block of a Segmentation report. In this case, we want to know about users who visited our website, so within the "Events" section, add the "Page Visit" event.

After selecting the event, your segmentation chart should look like this:

Step 2: Choose Aggregation Type

Next to your selected event, you can choose how to count that event. By default, Segmentation will count the unique number of users. In this case, we want to know how many page visits happened messages, so choose "Count event totals." This aggregation type will count the number of individual events.

Step 3: Choose Filters

Filters exclude unwanted data. In this case, we only care about page visits that happened in the United States, Chine, United Kingdom (GB) and Germany countries. Therefore, add a "User country code" event property filter, and choose "is" with the value us,cn,de,gb As indicated in the following image:

Step 4: Choose Breakdowns

Breakdowns segment data into groups. In this case, we want to count page visits from different marketing campaigns. Therefore, add a "Acquisition campaign" breakdown. At this point, your query should look like this:

Step 5: Segmentation type

Choosing a different segmentation type can help you visualize data better. Trends are great for visualizing changes in your product or service usage. Measuring overall performance is easy to visualize with Overall Segmentation.

All Features

Combining Events

You can create a "Combined event" in Mitzu by clicking the combine events button.

If the "combined events" feature is applied, the breakdowns and aggregations are applied to all of the events within a combined event.

Chart Types

Segmentation features multiple visualizations to help you view the query results in the clearest chart type. By default, segmentation displays the results on the line chart, which helps you understand how metrics trend over time. However, another chart type might present the results with more clarity. In segmentation, you can get a metric calculated across the entire time period selected in the date picker (Overall segmentation) or on a time-segmented view of the metric (e.g., daily trends, weekly trends).

  • Metric calculated across the entire time period (Overall segmentation):

    • Bar chart

    • Stacked bar chart

    • Pie chart

  • Metric time-segmented:

    • Line chart

    • Bar chart

    • Stacked area chart

    • Stacked bar chart

    • Stacked percentage area chart

    • Stacked percentage bar chart


In Mitzu currently, there are two data post-processing methods applicable to charts:

  • Rolling average

  • Cumulative sum

These methods will be applied to the aggregation results after the queries are executed on the client data warehouse or datalake.


Use Formulas to make calculations using simple arithmetic operators.

Mitzu supports the following operators:

  • + : Add

  • - : Subtract

  • * : Multiply

  • / : Divide

  • () : Use parentheses to influence the order of operations

You can also use numbers as constants in a formula. Multiply a ratio by 100 to display as a percentage, for example. Divide a property value tracked in seconds by 3,600 to display the value in hours.

You can use the letters shown next to each event (or combined event) in the formula.

For example, the following formula will divide the first event calculation by the second event calculation:


Custom Property Aggregation

Besides the Count event totals and Count unique users, you can choose a custom property aggregation.

Custom property aggregations are useful in case you want to visualize different aspects of your events. In the following example, you can see the total spend based on the Checkout events in the sample e-commerce website data.

Mitzu currently supports these custom property aggregation methods:

  • Count distinct (counting of unique values for a property)

  • Sum

  • Avg

  • Min

  • Max

  • Median

  • P75

  • P90

  • P95

Some custom aggregations will not be supported. For example, sum operation on a property that is of Text type. In this case, an error message will show up.

Custom Property Aggregation on Combined Events

In the case of combined events, properties of all events within the combined events will appear as an option for aggregation. If an event doesn't contain the selected event property, the selected event property will be omitted from that event.

Table View

You can visualize the data in the table. This data you also export into a CSV file.

Code View

You can visualize and copy the executed SQL code from the Code view

Last updated