Funnels
BetaA saved funnel, step by step: how many visitors reached each step, where visits dropped off and what they viewed next, and who started and finished, as the Funnels report counts them.
Parameters
rp_b244ywihrp. Find a funnel’s IDtoday, yesterday, 7d, 30d, 90d, 52w, or a range of days or hours. The last 30 days if left out. Periodsprevious, month, or year. Adds compared to the response.America/New_York. The site’s own if left out.country=SE. They combine. FiltersFind a funnel’s ID
The API reads funnels you’ve saved in the app. Their steps come from the saved funnel; the period, comparison, and filters come from your request.
Open the site’s Reports › Funnels. Its saved funnels are listed first.
Open a saved funnel, or select New funnel, pick 2 to 6 steps, and use Save report… in the header. Any member of the workspace can save one.
Copy the ID from the address, after report=: app.lyli.io/sites/<site>/reports/funnel?report=<funnel>.
Renaming a funnel or saving changes to it keeps its ID. Changes you haven’t saved aren’t read: the API reads the steps as saved.
Request
An example site’s saved funnel, Pricing to trial, over the last 30 days, compared with the 30 days before.
curl -G https://app.lyli.io/api/v1/sites/s_k3m9x2p7qa/funnels/rp_b244ywihrp \
-H "Authorization: Bearer $LYLI_API_KEY" \
-d period=30d \
-d against=previous \
-d timezone=Europe/Stockholm// Node 18 or later, on your server
const url = "https://app.lyli.io/api/v1/sites/s_k3m9x2p7qa/funnels/rp_b244ywihrp";
const params = new URLSearchParams({
period: "30d",
against: "previous",
timezone: "Europe/Stockholm",
});
const res = await fetch(`${url}?${params}`, {
headers: { Authorization: `Bearer ${process.env.LYLI_API_KEY}` },
});
if (!res.ok) throw new Error(`Lyli API: ${res.status}`);
const { steps, totals } = await res.json();import os
import requests
res = requests.get(
"https://app.lyli.io/api/v1/sites/s_k3m9x2p7qa/funnels/rp_b244ywihrp",
params={"period": "30d", "against": "previous", "timezone": "Europe/Stockholm"},
headers={"Authorization": f"Bearer {os.environ['LYLI_API_KEY']}"},
timeout=10,
)
res.raise_for_status()
steps = res.json()["steps"]Response
{
"site": "s_k3m9x2p7qa",
"period": {
"key": "30d",
"from": "2026-10-24",
"to": "2026-11-22",
"timezone": "Europe/Stockholm",
"interval": "day"
},
"funnel": { "id": "rp_b244ywihrp", "name": "Pricing to trial" },
"steps": [
{ "kind": "page", "match": "/pricing", "visitors": 108 },
{ "kind": "page", "match": "/signup", "visitors": 33 },
{ "kind": "event", "match": "signup_completed", "visitors": 22 },
{ "kind": "event", "match": "trial_started", "visitors": 10 }
],
"totals": {
"started": 108,
"finished": 10,
"conversion": 9.3,
"median_seconds": 96
},
"drops": [
{
"after_step": 1,
"visits": 75,
"next": [
{ "page": null, "visits": 59 },
{ "page": "/features", "visits": 9 },
{ "page": "/", "visits": 7 }
]
},
{
"after_step": 2,
"visits": 11,
"next": [
{ "page": null, "visits": 10 },
{ "page": "/docs/getting-started", "visits": 1 }
]
},
{
"after_step": 3,
"visits": 12,
"next": [
{ "page": null, "visits": 9 },
{ "page": "/docs/getting-started", "visits": 3 }
]
}
],
"who": {
"channel": [
{ "value": "direct", "started": 45, "finished": 5 },
{ "value": "search", "started": 45, "finished": 5 },
{ "value": "social", "started": 9, "finished": 0 },
{ "value": "ai", "started": 6, "finished": 0 },
{ "value": "email", "started": 3, "finished": 0 }
],
"device": [
{ "value": "desktop", "started": 53, "finished": 8 },
{ "value": "mobile", "started": 40, "finished": 2 },
{ "value": "tablet", "started": 15, "finished": 0 }
],
"country": [
{ "value": "SE", "started": 30, "finished": 0 },
{ "value": "DE", "started": 29, "finished": 4 },
{ "value": "US", "started": 23, "finished": 3 },
{ "value": "GB", "started": 11, "finished": 1 },
{ "value": "FR", "started": 8, "finished": 1 },
{ "value": "NL", "started": 7, "finished": 1 }
]
},
"compared": {
"from": "2026-09-24",
"to": "2026-10-23",
"totals": {
"started": 96,
"finished": 12,
"conversion": 12.5,
"median_seconds": 90
}
}
}An example site’s numbers.
kind, page or event; match, the path (which may end in *) or the event’s name; and visitors, the visitors who did this step and every one before it, in order, in one visit.null when nobody started.null when none did.after_step names the step, and visits counts the visits that did it but not the next one.page is null for visits that left the site.channel, device, and country: each value as its filter takes it, with started, the visitors who did step 1, and finished, those who did every step. Most started first, at most 50 each.null, or with against: the other period’s from, to, and totals. Also null when that period starts before the site’s data does.How it’s counted
- Steps in order, in one visit. Each visit that starts in the period and matches your filters, segment, and cohort goes through its page views and custom events in the order they happened. Other pages in between are fine.
- A visitor counts at a step when any of their visits got that far.
- Steps count visitors; drops count visits. Someone whose two visits stopped at step 1 is one visitor at step 1 and two visits in its drop, so the drops don’t have to match the differences between steps.
- Only the period counts. What a visit does after the period ends isn’t counted.
Errors
against=month for a period longer than 5 weeks.Every endpoint can also return 401 (missing, revoked, or expired key) and 429 (rate limit reached). All errors
Start from a report
On a saved funnel, Copy as API request in the Share menu gives this request as curl, with the funnel’s ID and the period, comparison, filters, segment, cohort, and time zone you’re looking at. It reads your API key from the LYLI_API_KEY environment variable, so a copied request never contains a key.
On a funnel that isn’t saved, the item asks you to save it first, and on one with unsaved changes, to save your changes first.