Actually Tracking

Funnels

Save conversion funnels of pages and events, change them, and run them through the API.

Authentication

Requires a root client or a key with the funnels:write permission. A key for one project can only manage that project's funnels. Running a funnel needs analytics:read.

Base URL

https://api.actuallytracking.com/manage/projects/{projectId}/funnels

Endpoints

MethodPathDescription
GET/manage/projects/{projectId}/funnelsList the project's saved funnels
GET/manage/projects/{projectId}/funnels/{funnelId}Get one funnel
POST/manage/projects/{projectId}/funnelsSave a funnel
PATCH/manage/projects/{projectId}/funnels/{funnelId}Change a funnel
DELETE/manage/projects/{projectId}/funnels/{funnelId}Delete a funnel
GET/insights/{projectId}/funnels/{funnelId}Run a funnel: visitors and conversion at each step

A funnel is a funnel chart on a dashboard, so every funnel you save through the API also shows up in the dashboard, and every funnel chart made in the dashboard is listed here.

Saving a funnel

curl -X POST https://api.actuallytracking.com/manage/projects/YOUR_PROJECT_ID/funnels \
  -H "actuallytracking-client-id: YOUR_CLIENT_ID" \
  -H "actuallytracking-client-secret: YOUR_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pricing to signup",
    "steps": [
      { "path": "/pricing" },
      { "event": "signup", "displayName": "Signed up" }
    ],
    "windowHours": 24,
    "countBy": "visitor"
  }'
FieldRequiredDescription
nameYesThe funnel's name
stepsYes2 to 10 steps, in order. Each is either event (an event name, such as signup) or path (a page, such as /pricing)
steps[].matchNoHow path is compared: is (default), contains, startsWith, endsWith or regex
steps[].displayNameNoThe step's label
steps[].filtersNoProperty filters on the step, such as { "name": "properties.plan", "operator": "is", "value": ["pro"] }
windowHoursNoHours to go from the first step to the last, 1 to 720. Default 24
countByNosession (default): a session has to complete the steps. visitor: a visitor can complete them over several visits
rangeNoThe period the funnel covers, such as 7d, 30d (default) or 6m
dashboardIdNoThe dashboard to put it on. Without one it goes on a "Funnels" dashboard, made the first time

A page step is saved as a pageview (screen_view) with a path filter, and is listed back that way.

PATCH takes the same fields, all optional. steps, when given, replaces every step.

Running a funnel

curl "https://api.actuallytracking.com/insights/YOUR_PROJECT_ID/funnels/FUNNEL_ID?range=7d" \
  -H "actuallytracking-client-id: YOUR_CLIENT_ID" \
  -H "actuallytracking-client-secret: YOUR_CLIENT_SECRET"

Without range or startDate and endDate, it runs over the funnel's own range. data[0].steps holds each step's count, its percent of the first step, dropoffCount and dropoffPercent to the next step, and the revenue (in cents) of the visitors who reached it. totalSessions is how many started.

For full request and response schemas, see the API Reference.

On this page