Reports
Report a conversion funnel over events
POST/v1/reports/funnel
Requires an API key with the reports:read scope. About keys and scopes
How many contacts did each event in order. A contact enters with the first step's earliest event in the window (calendar days in the workspace timezone, default the last 30), and reaches a later step with an event after the previous step's, within withinDays of entering. Each contact counts once per step, however many times they repeat it. Events past retention are no longer held.
Request body
startDatestringoptionalFirst day, inclusive, in the workspace timezone. Give with
endDate.date
endDatestringoptionalLast day, inclusive, no later than today. Give with
startDate; a window is at most 366 days. Omit both for the last 30 days.date
stepsobject[]requiredThe events, in order.
at least 2 items · at most 5 items
2 child attributes
eventNamestringrequiredThe event that completes the step.
1–128 characters
whereobject[]optionalEvery condition must hold for an event to count as this step.
at least 1 item · at most 5 items
3 child attributes
propertystringrequiredThe event property key.
1–64 characters
operatorstringrequiredone of
equals,notEquals,gt,gte,lt,ltevaluestring | number | booleanrequired
withinDaysintegeroptionalHow long after the first step a contact has to finish the rest.
min 1 · max 90 · default
7
Returns
Returns 200 OK with a FunnelReport in data. Otherwise returns an error; Errors lists every code and which to retry.
timezonestringrequiredThe workspace timezone the dates are calendar days in.
startDatestringrequiredFirst day of the window (inclusive).
date
endDatestringrequiredLast day of the window (inclusive).
date
withinDaysintegerrequiredThe window each contact had to finish in.
min -9007199254740991 · max 9007199254740991
stepsobject[]required5 child attributes
eventNamestringrequiredcontactsintegerrequiredContacts who reached this step, in order, within
withinDaysof the first.min 0 · max 9007199254740991
conversionRatenumber | nullrequiredFraction of those who started; null when nobody did.
min 0
stepRatenumber | nullrequiredFraction of those who reached the step before; null for the first, or when nobody did.
min 0
dropOffintegerrequiredContacts who reached the step before but not this one; 0 for the first.
min 0 · max 9007199254740991