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

ParameterTypeDefaultDescription
stepslist[str][]Ordered list of event names defining the funnel steps. Can also be configured interactively in the widget sidebar.
difflist | NoneNoneDiff mode: [segment_col, value1, value2]. Use "<OUTER>" as value2 to compare against all other users.
path_id_colstr | NoneNoneOverride the path ID column.
heightint420Widget height in pixels.
sidebar_openboolTrueWhether the settings sidebar starts open.

Headless mode

es.funnel_data() returns funnel metrics as a dictwithout rendering a widget.

KeyDescription
stepsList of step dicts with step, unique_paths, conversion_rate
total_pathsTotal number of paths (standard mode)
group1_label, group2_labelSegment value labels (diff mode)
group1_total, group2_totalPath 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}, ...]