API reference / Analytics
Create a funnel
Creates a funnel of 2 to 8 steps. Each step is a page view or a goal. A page matches exactly, by its start or by a part, and can be on one hostname only. A goal step counts the visitors who completed the goal, or who did not. A workspace has 50 funnels at most.
/api/v1/analytics/funnelsOther ways to call it
troopy analytics funnels createIdempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.Body
application/jsonname*stringAt least 1 characters · At most 80 characters
steps*array<object>At most 8 items
6 properties
kind*enum<string>pagegoal
value*stringA path like /pricing, or a goal's name
At least 1 characters · At most 200 characters
matchenum<string>Pages only: how the path matches
exactstarts_withcontains
Default "exact"
hostnamestring | nullPages only: on this hostname alone
Default null
completedbooleanGoals only: false counts visitors who did not complete it after the step before
Default true
propertyobject | nullGoals only: the goal counts only when it has this property, such as plan pro
Default null
2 properties
name*stringvalue*stringAt least 1 characters · At most 255 characters
hoursinteger | nullThe visitor completes every step within this many hours of the first. Null: any time in the period
strictbooleantrue: no other page between two steps
Response
201 · application/jsondata*object6 properties
id*stringA 24-character id
name*stringsteps*array<object>6 properties
kind*enum<string>pagegoal
value*stringA path like /pricing, or a goal's name
At least 1 characters · At most 200 characters
match*enum<string>Pages only: how the path matches
exactstarts_withcontains
Default "exact"
hostname*string | nullPages only: on this hostname alone
Default null
completed*booleanGoals only: false counts visitors who did not complete it after the step before
Default true
property*object | nullGoals only: the goal counts only when it has this property, such as plan pro
Default null
2 properties
name*stringvalue*stringAt least 1 characters · At most 255 characters
hours*integer | nullThe visitor completes every step within this many hours of the first. Null: any time in the period
strict*booleantrue: no other page between two steps
createdAt*stringISO 8601 date and time