Session data

Get numeric session property statistics

GET/api/websites/{websiteId}/session-data/numeric-stats

Returns the total, average, median, minimum, and maximum of the specified numeric session property for the selected date range and filters.

Headers

NameTypeDescription
AuthorizationrequiredstringAuthentication credentials, e.g. Bearer <token>.

Path parameters

NameTypeDescription
websiteIdrequiredstringID of the website.

Query parameters

NameTypeDescription
startAtrequiredintegerStart of the date range as a Unix timestamp in milliseconds.
endAtrequiredintegerEnd of the date range as a Unix timestamp in milliseconds.
propertyNamerequiredstringName of the custom event or session property.
timezonestringIANA time zone used to interpret dates and group results, for example America/New_York.
pathstringFilter by page URL path.
referrerstringFilter by referring URL.
titlestringFilter by page title.
querystringFilter by page URL query string.
osstringOperating system used by the visitor.
browserstringBrowser used by the visitor.
devicestringDevice category used by the visitor.
countrystringCountry code of the visitor.
regionstringRegion or subdivision of the visitor.
citystringCity of the visitor.
tagstringTag attached to the tracked activity.
hostnamestringHostname on which the activity occurred.
distinctIdstringCustom identifier assigned to the visitor.
languagestringPreferred language reported by the visitor browser.
eventstringFilter by custom event name.
utmSourcestringUTM campaign source.
utmMediumstringUTM campaign medium.
utmCampaignstringUTM campaign name.
utmContentstringUTM campaign content.
utmTermstringUTM campaign search term.
excludeBouncestringSet a non-empty value to exclude visits with only one pageview.
segmentstringID of a saved segment used to filter results.
cohortstringID of a saved cohort used to filter visitors.
eventTypeintegerEvent type: 1 for a pageview or 2 for a custom event.
matchenum<string>Whether records must match all filters or any filter.
Options: all, any

Responses

200The operation completed successfully.
NameTypeDescription
averagerequirednumberArithmetic mean of the numeric property values.
maxrequirednumberMaximum numeric property value.
medianrequirednumberMedian of the numeric property values.
minrequirednumberMinimum numeric property value.
totalrequirednumber
200 example
400Bad request.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
400 example
401Unauthorized.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
401 example

Code samples

cURL