Funnel
Displays a conversion funnel showing how many paths pass through each ordered step. Steps are defined as event names, and a path is counted at step N if it contains that event after passing through all previous steps. Supports diff mode to compare conversion rates between two segments.
Usage
es.funnel()With options:
es.funnel(
steps=["page_view", "add_to_cart", "checkout", "purchase"],
diff=["plan", "pro", "free"],
)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
steps | list[str] | [] | Ordered list of event names defining the funnel steps. Can also be configured interactively in the widget sidebar. |
diff | list | None | None | Diff mode: [segment_col, value1, value2]. Use "<OUTER>" as value2 to compare against all other users. |
path_id_col | str | None | None | Override the path ID column. |
height | int | 420 | Widget height in pixels. |
sidebar_open | bool | True | Whether the settings sidebar starts open. |
Headless mode
es.funnel_data() returns funnel metrics as a dictwithout rendering a widget.
| Key | Description |
|---|---|
steps | List of step dicts with step, unique_paths, conversion_rate |
total_paths | Total number of paths (standard mode) |
group1_label, group2_label | Segment value labels (diff mode) |
group1_total, group2_total | Path counts per group (diff mode) |
result = es.funnel_data(steps=["page_view", "add_to_cart", "purchase"])
print(result["steps"])
# [{"step": "page_view", "unique_paths": 600, "conversion_rate": 1.0}, ...]