Endpoints

Sessions

Operations around Sessions and Session data.

Endpoints


Filters#

All Endpoints marked with filters can now be filtered with the parameters below.

Parameters

ParameterTypeDescription
pathstring(optional) Name of URL.
referrerstring(optional) Name of referrer.
titlestring(optional) Name of page title.
querystring(optional) Name of query parameter.
browserstring(optional) Name of browser.
osstring(optional) Name of operating system.
devicestring(optional) Name of device (ex. Mobile).
countrystring(optional) Name of country.
regionstring(optional) Name of region/state/province.
citystring(optional) Name of city.
hostnamestring(optional) Name of hostname.
languagestring(optional) Visitor browser language (ex. en-US).
tagstring(optional) Name of tag.
eventstring(optional) Name of event.
distinctIdstring(optional) Name of distinct ID.
utmSourcestring(optional) UTM source.
utmMediumstring(optional) UTM medium.
utmCampaignstring(optional) UTM campaign name.
utmContentstring(optional) UTM content.
utmTermstring(optional) UTM term.
segmentuuid(optional) UUID of segment.
cohortuuid(optional) UUID of cohort.

GET /api/websites/:websiteId/sessions#

Gets website session details within a given time range.

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
searchstring(optional) Search text.
pagenumber(optional, default 1) Determines page.
pageSizenumber(optional, default 20) Determines how many results to return.
filters-Can accept filter parameters.

Sample response


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

Gets summarized website session statistics.

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
filters-Can accept filter parameters.

Sample response

  • pageviews: Page hits
  • visitors: Number of unique visitors
  • visits: Number of unique visits
  • countries: Number of unique countries
  • events: Number of events

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

Get collected count of sessions by hour of weekday.

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of start date.
endAtnumberTimestamp (in ms) of end date.
timezonestringTimezone (ex. America/Los_Angeles).
filters-Can accept filter parameters.

Sample response


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

Gets session details for an individual session

Sample response


GET /api/websites/:websiteId/sessions/:sessionId/activity#

Gets session activity for an individual session

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.

Sample response


GET /api/websites/:websiteId/sessions/:sessionId/properties#

Gets session properties for an individual session

Sample response

GET /api/websites/:websiteId/session-data/properties#

Gets session data counts by property name

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
propertyNamestring(optional) Filter results to a specific property name.
filters-Can accept filter parameters.

Sample response


GET /api/websites/:websiteId/session-data/values#

Gets session data counts for a given property

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
propertyNamestringProperty name.
dataTypenumber(optional) Filter by data type (1=string, 2=number, 3=date, 4=boolean).
filters-Can accept filter parameters.

Sample response


GET /api/websites/:websiteId/session-data-pivot#

Gets session data in a pivoted format, with each row representing a session and its properties as parallel arrays.

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
propertyNamestringSession property name to pivot on.
pagenumber(optional, default 1) Determines page.
pageSizenumber(optional, default 20) Determines how many results to return.
filters-Can accept filter parameters.

Sample response


GET /api/websites/:websiteId/session-data/stats#

Gets aggregated activity statistics for sessions grouped by a given property value.

Parameters

ParameterTypeDescription
startAtnumberTimestamp (in ms) of starting date.
endAtnumberTimestamp (in ms) of end date.
propertyNamestringProperty name to group by.
filters-Can accept filter parameters.

Sample response

Results are ordered by activity descending. Maximum 100 rows returned.