Analytics

Get an analytics time series

Returns one traffic time series bucketed by unit (year, month, day, hour, or minute). series selects which: pageviews returns parallel pageviews and sessions arrays with one point per time bucket (and accepts compare — prev or yoy — to request comparison data for the previous period or year), while events returns tracked custom-event counts as one events point per event name per time bucket. Only the requested series' fields are present in the response. startAt and endAt are Unix epoch milliseconds; timezone is an IANA name (e.g. America/New_York) that controls bucket boundaries; optional filter parameters narrow the data. The series is capped to the most recent maxPoints time buckets (default 30, max 500); a truncated field reports when the cap was applied. Requires a plan that includes analytics (403 otherwise); empty until the website is published and has traffic.

get/websites/{websiteId}/analytics/timeseries

Request

  • Base URL: https://api.cactal.ai/v1
  • URL: https://api.cactal.ai/v1/websites/{websiteId}/analytics/timeseries
  • Auth: HTTP bearer

Path parameters

websiteIdstring required

Query parameters

startAtinteger required
endAtinteger required
pathstring
referrerstring
titlestring
querystring
browserstring
osstring
devicestring
countrystring
regionstring
citystring
languagestring
hostnamestring
tagstring
eventstring
distinctIdstring
utmSourcestring
utmMediumstring
utmCampaignstring
utmContentstring
utmTermstring
segmentstring uuid
cohortstring uuid
unit'year' | 'month' | 'day' | 'hour' | 'minute' required
timezonestring
maxPointsinteger
series'pageviews' | 'events' required

Which time series to return: pageviews for page views and sessions per bucket, events for tracked custom-event counts per event name per bucket.

compare'prev' | 'yoy'

Request comparison data alongside the primary series: prev for the previous period, yoy for the same range one year earlier. Only valid when series is pageviews.

Response

The requested time series: pageviews and sessions per bucket, or events per event name per bucket.

Changes

No recorded changes to this operation across all 1 revision of this API.