Sub topic 6
Filtering and breaking down a funnel
A funnel gives you one conversion rate for everyone. That number rarely helps by itself, because it mixes users who behave differently. Filters and breakdowns let you narrow the funnel to a group or split it into groups. This chapter covers how each one works, where it is applied, and how to compare the resulting segments fairly.
This chapter assumes you can already build a basic funnel with a conversion window, and that you know the difference between an event property and a user property. If not, review the earlier chapters on events and funnel basics first.
Filter versus breakdown
A filter removes users or events before the funnel is calculated. A breakdown keeps everyone and splits the result into one funnel per value of a property.
| Row | Filter | Breakdown (group by) |
|---|---|---|
| What it does | Restricts which users or events are counted | Splits the counted users into groups |
| Number of results | One funnel | One funnel per property value |
| Question it answers | "What happens for users who are X?" | "How does X compare across values?" |
| Typical risk | Hiding the users you excluded | Too many tiny groups |
Both use the same raw material: properties attached to events or to users. In the SQL view, a filter is a WHERE clause and a breakdown is a GROUP BY.
Where a filter is applied
A filter can sit at different levels, and the level changes the meaning of the result.
- Report-level (global) filter. It applies to the whole funnel. Example: only users on a mobile platform. In Amplitude this is usually a segment definition. In Mixpanel it is a filter on the report.
- Step-level filter. It applies to one event in the funnel. Example: the step "Sign Up Started" counts only when
source = pricing_page.
The difference matters. Suppose you filter step 1 to source = pricing_page but leave step 2 unfiltered. A user who started sign-up from an ad, then later completed from the pricing page, is not in step 1. A user who started from the pricing page and completed from anywhere is counted as converted. You are measuring "users who began on the pricing page", not "completions on the pricing page".
Check which of these your tool is doing before you trust the number. If the same property is on both steps, decide whether you want it applied to both.
Event properties and user properties
Properties come in two kinds, and they behave differently in funnels.
- Event properties describe one occurrence, such as
planorsourceon "Sign Up Started". They are fixed at the moment the event was sent. - User properties describe the person, such as country or account type. They can change over time.
For user properties, the key question is which value is used. Amplitude records user property values as they were when each event was sent, so a user who upgraded can show up with the old value on earlier events. Mixpanel uses profile properties that reflect the latest value in the user profile for some views, while properties sent with an event stay as they were at event time. Behavior depends on the tool and the report, so confirm it in the tool's documentation for the version you use.
This produces a common surprise. If you break down by plan using a user property, a user who started on free and finished on pro may be counted under either value. Event properties are more predictable because each one is stamped on a specific step.
Which step supplies the breakdown value
Each user passes through several steps, and a breakdown property may exist on more than one of them. The report must pick one value per user. Most tools let you choose which step the property is read from, and the default is often the first step.
Consider the two events from the earlier setup:
import * as amplitude from '@amplitude/analytics-browser';
amplitude.init('YOUR_AMPLITUDE_API_KEY');
amplitude.setUserId('user_123');
amplitude.track('Sign Up Started', { plan: 'pro', source: 'pricing_page' });
amplitude.track('Sign Up Completed', { plan: 'pro', source: 'pricing_page' });Both events carry plan. If the user changes the plan selector between the two events, the step 1 value and the step 2 value differ. A breakdown by plan read from step 1 shows the plan they started with. Read from step 2, it shows the plan they finished with. Users who abandon at step 1 have no step 2 event at all, so a breakdown read from step 2 can only describe converters. That makes every group look better than it is, and it hides the drop-off.
Reading the breakdown from the first step is the safest default for comparing conversion. Every user who entered the funnel has a value there.
What the breakdown looks like in SQL
The query below is the funnel from the earlier chapter, extended with a breakdown on the plan value of the first step. It uses Postgres syntax and assumes an events table with user_id, event_name, event_time, and a plan column.
WITH started AS (
SELECT DISTINCT ON (user_id)
user_id,
event_time AS t1,
plan
FROM events
WHERE event_name = 'Sign Up Started'
ORDER BY user_id, event_time
),
completed AS (
SELECT DISTINCT s.user_id
FROM started s
JOIN events e
ON e.user_id = s.user_id
AND e.event_name = 'Sign Up Completed'
AND e.event_time >= s.t1
AND e.event_time < s.t1 + INTERVAL '7 days'
)
SELECT
s.plan,
COUNT(*) AS started_users,
COUNT(c.user_id) AS completed_users,
ROUND(100.0 * COUNT(c.user_id) / COUNT(*), 1) AS conversion_pct
FROM started s
LEFT JOIN completed c USING (user_id)
GROUP BY s.plan
ORDER BY started_users DESC;Three details explain the behavior of a report:
DISTINCT ON (user_id) ... ORDER BY user_id, event_timekeeps one row per user, the earliest "Sign Up Started". Each user lands in exactly one group.- The
LEFT JOINkeeps users who never completed. With an inner join, only converters would remain, and every group would show 100%. - To add a filter, put it in the
WHEREclause ofstarted, for exampleAND source = 'pricing_page'. That is a step-level filter on step 1.
Cardinality: too many groups
Cardinality is the number of distinct values a property has. A plan property might have three values. A page_url property might have thousands.
Breaking down by a high-cardinality property causes two problems:
- The report shows only the top values, often the top 10 or so, and groups the rest as "Other" or drops them. The top values are chosen by volume, so rare but important groups can vanish.
- Each remaining group is small, so its conversion rate is noisy.
Handle this by cleaning the property first. Group URLs into page types, round numeric values into ranges, or build a derived property with a few clear values. Also watch for inconsistent values such as Pro, pro, and PRO. They show up as three separate groups.
Missing values are another case. Users with no value for the property usually appear as (none) or a similar label. A large (none) group often signals an instrumentation gap, not a real segment.
Comparing segments fairly
Seeing two different conversion rates does not mean the property causes the difference. Before you act on a gap, check four things.
- Sample size. A group of 40 users that converts at 50% could plausibly be anywhere from about 35% to 65%. A group of 4,000 at 50% is much more certain. Look at the user counts beside every percentage.
- Same window and same period. Segments must use the same conversion window and date range. A segment made mostly of users who entered in the last few days has not had time to convert.
- Mix effects. One segment may contain more users from a high-converting channel. The gap then comes from the channel and not from the property you chose. Break down by the second property or add a filter to see whether the gap persists inside each channel.
- Group definition. Confirm that every user belongs to exactly one group. A multi-valued property, such as a list of features, can place one user in several groups, so the group totals add up to more than the funnel total.
A worked reading
Suppose the breakdown by plan returns this:
| plan | started_users | completed_users | conversion_pct |
|---|---|---|---|
| free | 5200 | 1040 | 20.0 |
| pro | 780 | 273 | 35.0 |
| team | 36 | 18 | 50.0 |
The team row looks best, but 36 users is too few to rank it above pro. The pro gap against free is large and rests on hundreds of users, so it is worth investigating. The next step is to check the mix: do pro users come mostly from a channel that converts well anyway? A second breakdown by source, or a filter on one source, answers that.
Common errors
- Filtering step 1 only, then describing the result as if all steps were filtered.
- Breaking down by a property read from the last step, which excludes everyone who dropped off.
- Treating
Otheror(none)as a real segment. - Comparing percentages without the user counts.
- Using a changing user property and assuming it was fixed during the funnel.
Exercise
A funnel has two steps, "Sign Up Started" and "Sign Up Completed". You break it down by plan, read from the "Sign Up Completed" step. Every plan shows a conversion rate of 100%. Why, and how do you fix it?
Show answer
Users who dropped off never sent "Sign Up Completed", so they have no plan value on that step and are not assigned to any group. Only converters remain, so every group converts at 100%. Read the breakdown property from the first step ("Sign Up Started"), where every user who entered the funnel has a value.
Exercise
Segment A has 30 users and converts at 60%. Segment B has 3,000 users and converts at 45%. A teammate says A is the better segment. What would you check before agreeing?
Show answer
Check the sample size first: 30 users gives a wide uncertainty range, so 60% could be well below or near 45%. Then check that both segments use the same conversion window and date range, and whether a second property (such as source) explains the difference. Without that, the data does not support ranking A above B.