Funnel chart
The funnel chart widget visualizes how users progress through a sequence of steps, showing the drop-off between each stage. Each row returned by your query becomes one segment of the funnel, ordered from the widest (top) to the narrowest (bottom).
Use it for:
- Onboarding completion (install → tutorial → first level → purchase)
- Checkout / purchase conversion
- Any multi-step user journey where you care about where people drop off
Query requirements
Section titled “Query requirements”Return one row per step, with a label column for the step name and a value column for the user/event count. Steps render in the order returned, so prefix labels with a number (e.g. 1_, 2_) and sort on them to guarantee the funnel order.
Each step is typically a uniqExact(identity) filtered to a different event. The cleanest way to express this is a single-pass query using uniqExactIf.
Select
uniqExactIf(identity, name = 'app_started') AS "1. Started",uniqExactIf(identity, name = 'tutorial_done') AS "2. Tutorial",uniqExactIf(identity, name = 'level_1_complete') AS "3. Level 1",uniqExactIf(identity, name = 'purchase') AS "4. Purchase"Filters
WHERE name IN ('app_started', 'tutorial_done', 'level_1_complete', 'purchase')SELECT step, count() AS count FROM ( SELECT '1. Started' AS step, identity FROM {table} WHERE name = 'app_started' UNION ALL SELECT '2. Tutorial' AS step, identity FROM {table} WHERE name = 'tutorial_done' UNION ALL SELECT '3. Level 1' AS step, identity FROM {table} WHERE name = 'level_1_complete')GROUP BY stepORDER BY step ASCResult shape (one row per step):
| step | count |
|---|---|
| 1. Started | 4 210 |
| 2. Tutorial | 2 980 |
| 3. Level 1 | 1 640 |
| 4. Purchase | 410 |
Display format
Section titled “Display format”Set Display format to percent to show each step relative to the total. The first (widest) step is usually treated as 100%, with each subsequent step shown as its share.
Common examples
Section titled “Common examples”Onboarding funnel
Select:
uniqExactIf(identity, name = 'app_started') AS "1. Install",uniqExactIf(identity, name = 'signup') AS "2. Sign up",uniqExactIf(identity, name = 'tutorial_done') AS "3. Tutorial"Filters: WHERE name IN ('app_started', 'signup', 'tutorial_done')
Purchase conversion
Select:
uniqExactIf(identity, name = 'cart_opened') AS "1. Cart",uniqExactIf(identity, name = 'checkout') AS "2. Checkout",uniqExactIf(identity, name = 'purchase') AS "3. Purchase"Filters: WHERE name IN ('cart_opened', 'checkout', 'purchase')