Skip to main content
GET
Get an analytics time series

Authorizations

Authorization
string
header
required

Cactal API key. Create one in the dashboard or via POST /apiKeys. The plaintext key is shown once at creation.

Path Parameters

websiteId
string
required
Minimum string length: 1

Query Parameters

startAt
integer
required
Required range: 0 <= x <= 9007199254740991
endAt
integer
required
Required range: 0 <= x <= 9007199254740991
path
string
referrer
string
title
string
query
string
browser
string
os
string
device
string
country
string
region
string
city
string
language
string
hostname
string
tag
string
event
string
distinctId
string
utmSource
string
utmMedium
string
utmCampaign
string
utmContent
string
utmTerm
string
segment
string<uuid>
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
cohort
string<uuid>
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
unit
enum<string>
required
Available options:
year,
month,
day,
hour,
minute
timezone
string
Minimum string length: 1
maxPoints
integer
default:30
Required range: 1 <= x <= 500
series
enum<string>
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.

Available options:
pageviews,
events
compare
enum<string>

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.

Available options:
prev,
yoy

Response

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

pageviews
object[]

Page views per time bucket. Present only when series is pageviews.

sessions
object[]

Distinct sessions per time bucket. Present only when series is pageviews.

events
object[]

One point per event name per time bucket. Present only when series is events.

truncated
object

Present only when the series exceeded maxPoints and was capped to the most recent time buckets.