Funnel

Analyze a conversion funnel through multiple steps. Each step can be a page view, an entry page (first pageview in a session), or a custom event. The endpoint returns the number of visitors who reached each step in order, plus the conversion-rate trend compared to the previous period.

POST
https://api.seline.com/api/v1/funnel
Click anywhere to copy

Pathnames always start with a slash, e.g. /blog/*. Use type entry-page to match only the first pageview in a session. Custom event step names must match the exact event name as you track it.

Parameters

projectId
stringRequired for account API keys
Project id to query. Required when using an account-wide API key. Ignored for project API keys.
steps
arrayRequired
Funnel steps in order. Must have at least 2 steps. Each step is an object with name (page pathname like /blog/* or custom event name) and type (page-view, entry-page, or custom).

Example - [{ name: "/", type: "entry-page" }, { name: "user: signed up", type: "custom" }]
period
stringRequired if no range is provided
Predefined time period today, 1h, 24h, 7d, 30d, 6m, 12m, all_time, month_to_date, week_to_date, year_to_date. Either period or range is required.
range
objectRequired if no period is provided
Custom date range object with from and to ISO 8601 datetime strings, e.g. 2025-09-10T00:00:00Z, both required.

Example - { from: "2025-09-10T00:00:00Z", to: "2025-09-11T00:00:00Z" }
filters
array
Optional filters for the funnel. Array of objects with field and value. Supported fields are hostname, country, browser, device, referrer, campaign, source, medium, content, term, os.
Example request
curl -X POST 'https://api.seline.com/api/v1/funnel' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"range": {
"from": "2025-06-10T00:00:00Z",
"to": "2025-09-10T00:00:00Z"
},
"steps": [
{ "name": "/", "type": "entry-page" },
{ "name": "/pricing", "type": "page-view" },
{ "name": "user: signed up", "type": "custom" }
],
"filters": [
{ "field": "country", "value": "US" }
]
}'
Click anywhere to copy
Response
{
"steps": [
{ "name": "/", "type": "entry-page", "count": 1820 },
{ "name": "/pricing", "type": "page-view", "count": 612 },
{ "name": "user: signed up", "type": "custom", "count": 124 }
],
"trend": 8
}
Click anywhere to copy