Appearance
Funnels, paths and retention
Ad-hoc funnel
POST /properties/{pid}/funnels/run
json
{
"date_range": "last_28_days",
"steps": [
{ "type": "page", "label": "Product page", "path": "/p/*" },
{ "type": "element", "label": "Add to cart", "el_name": "add-to-cart" },
{ "type": "page", "label": "Shipping", "path": "/checkout/shipping" },
{ "type": "element", "label": "Pick a delivery slot", "el_name": "delivery-slot-picker" },
{ "type": "event", "label": "Purchase", "name": "purchase" }
],
"window_seconds": 3600,
"breakdown": "actor_family"
}Step types (2 to 12 steps):
type | Fields |
|---|---|
page | path (exact or glob such as /checkout/*; a regex with regex: true), optional hostname |
event | name, optional props filters [{key, op, value}] |
element | At least one of el_name (the element's data-ah-name), selector (CSS selector) or text; optional path |
Options:
| Field | Values |
|---|---|
window_seconds | Conversion window in seconds (default 1,800). window is an alias. |
unit | Count session (default) or visitor |
mode | closed (default: visitors must enter at step 1) or open |
strict_order | true: no other event between steps |
breakdown | none (default), actor_family (agents vs humans vs bots), actor_type, navigation_mode, device_type, channel_group, country |
The response has one entry per breakdown value with, for each step, the visitors or sessions that reached it, the conversion from the previous and the first step, and the median time between steps.
Saved funnels
GET /properties/{pid}/funnels lists saved funnels; POST /properties/{pid}/funnels/{id}/run runs one with {date_range, actor?, compare?}. Creating and editing them: Configuration objects.
Paths
POST /properties/{pid}/paths/run
json
{ "date_range": "last_7_days", "node": "page_and_element", "start": "/", "direction": "next", "depth": 4, "split_by_actor": true }| Field | Values |
|---|---|
node | page (default), element, event, page_and_element |
start | Starting page, element label or event; empty = session start |
direction | next (default) or previous |
depth | 1 to 8 (default 4) |
split_by_actor | Separate agent and human flows |
collapse_repeats | Merge repeated identical steps (default true) |
limit | Maximum flows (default 200) |
Returns the flows between nodes, ready for a sankey or sunburst chart.
Retention
POST /properties/{pid}/retention/run with {date_range, granularity: "day" | "week" | "month", actor?} returns cohorts of first visits and the share of each cohort coming back in the following periods. Available on Pro and Scale.