Endpoints

Reports

Using reports through the api.

Endpoints


Filters#

All reports can now be filtered with the filters property in the request body.

ParameterTypeDescription
pathstringName of URL.
referrerstringName of referrer.
titlestringName of page title.
querystringName of query parameter.
browserstringName of browser.
osstringName of operating system.
devicestringName of device (ex. Mobile).
countrystringName of country.
regionstringName of region/state/province.
citystringName of city.
languagestringName of browser language.
hostnamestringName of hostname.
tagstringName of tag.
eventstringName of event.
distinctIdstringName of distinct ID.
utmSourcestringUTM source.
utmMediumstringUTM medium.
utmCampaignstringUTM campaign name.
utmContentstringUTM content.
utmTermstringUTM term.
segmentuuidUUID of segment.
cohortuuidUUID of cohort.

Request body


GET /api/reports#

Get all reports by website ID.

Parameters

ParameterTypeDescription
websiteIdstringYour website id.
typestringReport type (attribution | breakdown | funnel | goal | journey | retention | revenue | utm).
pagenumber(optional, default 1) Determines page.
pageSizenumber(optional) Determines how many results to return.

Sample response


POST /api/reports#

Creates a report.

Parameters

ParameterTypeDescription
websiteIdstringYour website id.
typestringReport type (attribution | breakdown | funnel | goal | journey | retention | revenue | utm).
namestringName of report.
descriptionstring(optional) Description of report.
parametersobjectParameters for report.

Request body

Sample response


GET /api/reports/:reportId#

Gets a report by ID.

Sample response


POST /api/reports/:reportId#

Updates a report.

Parameters

ParameterTypeDescription
websiteIdstringYour website id.
typestringReport type (attribution | breakdown | funnel | goal | journey | retention | revenue | utm).
namestringName of report.
descriptionstring(optional) Description of report.
parametersobjectParameters for report.

Request body

Sample response


DELETE /api/reports/:reportId#

Deletes a report.

Sample response


POST /api/reports/attribution#

See how users engage with your marketing and what drives conversions.

Parameters

ParameterTypeDescription
websiteIdstringYour website id.
typestringReport type (attribution).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
modelstringAttribution model (first-click | last-click).
typestringConversion type (path | event).
stepstringConversion step.

Request body

Sample response


POST /api/reports/breakdown#

Dive deeper into your data by using segments and filters.

Parameters

ParameterTypeDescription
websiteIdstringYour website id.
typestringReport type (breakdown).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
fieldsarrayList of column fields.

Available Fields

path | title | query | referrer | browser | os | device | country | region | city | hostname | tag | event | distinctId | utmSource | utmMedium | utmCampaign | utmContent | utmTerm |

Request body

Sample response


POST /api/reports/funnel#

Understand the conversion and drop-off rate of users.

Parameters

ParameterTypeDescription
websiteIdstringYour website id.
typestringReport type (funnel).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
stepsarrayMinimum two required. Each step has a type (path | event) and a value.
windownumberWindow of days between funnel steps to be considered a conversion.

Request body

Sample response


POST /api/reports/goal#

Track your goals for pageviews and events.

Parameters

ParameterTypeDescription
websiteIdstringYour website id.
typestringReport type (goal).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
typestringConversion type (path | event).
valuestringConversion step value.

Request body

Sample response


POST /api/reports/journey#

Understand how users navigate through your website.

Parameters

ParameterTypeDescription
websiteIdstringYour website id.
typestringReport type (journey).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
stepsnumberNumber of steps from 3 to 7.
startStepstringStarting step URL or event name.
endStepstring(optional) Ending step URL or event name.

Request body

Sample response


POST /api/reports/performance#

Get Core Web Vitals performance metrics for a given date range.

Parameters

ParameterTypeDescription
websiteIdstringYour website id.
typestringReport type (performance).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
unitstring(optional) Time unit (year | month | hour | day).
timezonestring(optional) Timezone (ex. America/Los_Angeles).
metricstring(optional) Metric to focus on (lcp | inp | cls | fcp | ttfb).

Request body

Sample response


POST /api/reports/retention#

Measure your website stickiness by tracking how often users return.

Parameters

ParameterTypeDescription
websiteIdstringYour website id.
typestringReport type (retention).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
timezonestringTimezone (ex. America/Los_Angeles).

Request body

Sample response


POST /api/reports/revenue#

Get currency for given range. Needed for Revenue and optional in Attribution reports.

Parameters

ParameterTypeDescription
websiteIdstringYour website id.
typestringReport type (revenue).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
timezonestringTimezone (ex. America/Los_Angeles).
currencystringCurrency code (ISO 4217).
comparestring(optional) Comparison period (prev | yoy).

Request body

Sample response


GET /api/websites/:websiteId/revenue/chart#

Returns revenue chart data for a given date range and currency.

Parameters

ParameterTypeDescription
startAtnumberStart date in Unix milliseconds.
endAtnumberEnd date in Unix milliseconds.
timezonestringTimezone (ex. America/Los_Angeles).
currencystringCurrency code (ISO 4217).
comparestring(optional) Comparison period (prev | yoy).

Sample response


GET /api/websites/:websiteId/revenue/stats#

Returns revenue statistics for a given date range with optional comparison period.

Parameters

ParameterTypeDescription
startAtnumberStart date in Unix milliseconds.
endAtnumberEnd date in Unix milliseconds.
timezonestringTimezone (ex. America/Los_Angeles).
currencystringCurrency code (ISO 4217).
comparestring(optional) Comparison period (prev | yoy).

Sample response


GET /api/websites/:websiteId/revenue/metrics#

Returns revenue broken down by a specified dimension.

Parameters

ParameterTypeDescription
startAtnumberStart date in Unix milliseconds.
endAtnumberEnd date in Unix milliseconds.
timezonestringTimezone (ex. America/Los_Angeles).
typestringBreakdown type (country | region | referrer | channel).
currencystringCurrency code (ISO 4217).

Sample response


GET /api/websites/:websiteId/revenue/sessions#

Returns a paginated list of sessions with revenue data.

Parameters

ParameterTypeDescription
startAtnumberStart date in Unix milliseconds.
endAtnumberEnd date in Unix milliseconds.
timezonestringTimezone (ex. America/Los_Angeles).
currencystringCurrency code (ISO 4217).
pagenumber(optional) Page number.
pageSizenumber(optional) Number of results per page.
searchstring(optional) Search term to filter sessions.

Sample response


POST /api/reports/utm#

Track your campaigns through UTM parameters.

Parameters

ParameterTypeDescription
websiteIdstringYour website id.
typestringReport type (utm).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.

Request body

Sample response