Funnels
Use these endpoints to manage conversion funnel definitions. To query results for a funnel, use funnel analytics.
Funnels are saved configurations: a name plus ordered steps. Each step can match a pageview or a goal. Once created, the same funnel can be viewed in the dashboard, through funnel analytics, or from the CLI.
Base path:
https://datafa.st/api/v1/admin| Endpoint | Method | Path | Permission | Purpose |
|---|---|---|---|---|
| List funnels | GET | /websites/{websiteId}/funnels | funnels:read | List active funnels |
| Create funnel | POST | /websites/{websiteId}/funnels | funnels:write | Create a funnel |
| Update funnel | PUT | /websites/{websiteId}/funnels/{funnelId} | funnels:write | Update a funnel |
| Delete funnel | DELETE | /websites/{websiteId}/funnels/{funnelId} | funnels:write | Soft-delete a funnel |
Create a funnel
curl -X POST "https://datafa.st/api/v1/admin/websites/YOUR_WEBSITE_ID/funnels" \
-H "Authorization: Bearer dft_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Signup funnel",
"steps": [
{ "name": "Landing page", "type": "pageview", "url": "/" },
{ "name": "Signup page", "type": "pageview", "url": "/signup" },
{ "name": "Signed up", "type": "goal", "goalName": "signup" }
]
}'
Funnels need 2 to 8 steps. A step can be a
pageview with a url, or a goal with a goalName.