CDPGuidesSupport

Web Analytics

Query privacy-first website traffic metrics, timeseries, and page, source, location, device, and journey breakdowns through the REST API.

Query privacy-first website traffic reports for an inclusive calendar-day range. Scope results to one web source or aggregate across the account, and use the JSON-encoded filters query parameter to narrow reports by supported dimensions.

GET/rest/v1/web-analytics/overview

GET
/rest/v1/web-analytics/overview
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

from*string

Inclusive lower bound of the analysis window as YYYY-MM-DD.

Match^\d{4}-\d{2}-\d{2}$
Formatdate
to*string

Inclusive upper bound of the analysis window as YYYY-MM-DD.

Match^\d{4}-\d{2}-\d{2}$
Formatdate
webSourceId?string

Optional web source UUID. Omit to aggregate all web sources in the account.

Formatuuid
excludeBots?boolean

Exclude detected bot sessions. Defaults to true.

filters?string

JSON-encoded query input.

interval*string

Timeseries bucket interval. Minute queries are capped to the most recent 24 hours.

Value in

  • "minute"
  • "day"
  • "week"
  • "month"
metric*string

Value in

  • "unique_visitors"
  • "total_visits"
  • "pageviews"
  • "views_per_visit"
  • "bounce_rate"
  • "visit_duration"
realtimeFrom?string

Optional ISO timestamp used as the lower bound for realtime queries.

Formatdate-time

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/web-analytics/overview?from=2026-07-01&to=2026-07-31&interval=minute&metric=unique_visitors"
{  "metrics": {    "uniqueVisitors": 0,    "totalVisits": 0,    "pageviews": 0,    "viewsPerVisit": 0,    "bounceRate": 0,    "visitDuration": 0  },  "timeseries": [    {      "date": "string",      "value": 0    }  ],  "dataUpdatedAt": "string"}

GET/rest/v1/web-analytics/overview-insight

GET
/rest/v1/web-analytics/overview-insight
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

preset*string

Built-in traffic or click-behavior report.

Value in

  • "TRAFFIC"
  • "BEHAVIOR"
from*string

First included UTC calendar day (YYYY-MM-DD).

Formatdate
to*string

Last included UTC calendar day, at most 60 days including from.

Formatdate

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/web-analytics/overview-insight?preset=TRAFFIC&from=2019-08-24&to=2019-08-24"
{  "semanticVersion": 1,  "engine": "clickhouse",  "sourcePolicy": "string",  "sourceRevision": "string",  "sourceLimitations": [    "string"  ],  "scope": {    "from": "string",    "to": "string",    "interval": "day",    "timeZone": "UTC",    "sourceCompleteness": "unknown",    "executedAt": "2019-08-24T14:15:22Z",    "cumulative": true,    "comparison": {      "kind": "previous_period",      "from": "string",      "to": "string"    }  },  "series": [    {      "key": "string",      "metricId": "c2cc9ad9-a69d-40a3-8e01-a95e09e71978",      "label": "string",      "breakdownValues": [        {          "property": "string",          "value": "string"        }      ],      "comparison": "previous_period",      "aggregation": "event_count",      "points": [        {          "bucketStart": "2019-08-24T14:15:22Z",          "bucketEnd": "2019-08-24T14:15:22Z",          "isPartial": true,          "raw": 0,          "smoothed": 0,          "cumulative": 0        }      ],      "rangeValue": 0    }  ],  "reportId": "836df459-dc40-4aa1-972a-6eb0a864dff9",  "revision": "b587a570-d9a5-40c2-87da-edba28b3005f"}

GET/rest/v1/web-analytics/sources

GET
/rest/v1/web-analytics/sources
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

from*string

Inclusive lower bound of the analysis window as YYYY-MM-DD.

Match^\d{4}-\d{2}-\d{2}$
Formatdate
to*string

Inclusive upper bound of the analysis window as YYYY-MM-DD.

Match^\d{4}-\d{2}-\d{2}$
Formatdate
webSourceId?string

Optional web source UUID. Omit to aggregate all web sources in the account.

Formatuuid
excludeBots?boolean

Exclude detected bot sessions. Defaults to true.

filters?string

JSON-encoded query input.

dimension*string

Value in

  • "referrer"
  • "campaign"
  • "source"
  • "medium"
  • "content"
  • "term"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/web-analytics/sources?from=2026-07-01&to=2026-07-31&dimension=referrer"
{  "rows": [    {      "name": "string",      "visitors": 0    }  ],  "totalCount": 0,  "dataUpdatedAt": "string"}

GET/rest/v1/web-analytics/pages

GET
/rest/v1/web-analytics/pages
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

from*string

Inclusive lower bound of the analysis window as YYYY-MM-DD.

Match^\d{4}-\d{2}-\d{2}$
Formatdate
to*string

Inclusive upper bound of the analysis window as YYYY-MM-DD.

Match^\d{4}-\d{2}-\d{2}$
Formatdate
webSourceId?string

Optional web source UUID. Omit to aggregate all web sources in the account.

Formatuuid
excludeBots?boolean

Exclude detected bot sessions. Defaults to true.

filters?string

JSON-encoded query input.

view*string

Value in

  • "top"
  • "entry"
  • "exit"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/web-analytics/pages?from=2026-07-01&to=2026-07-31&view=top"
{  "rows": [    {      "pageHostname": "string",      "pagePath": "string",      "pageviews": 0,      "bounceRate": 0,      "timeOnPage": 0,      "entries": 0,      "visitors": 0,      "exits": 0,      "exitRate": 0    }  ],  "totalCount": 0,  "dataUpdatedAt": "string"}

GET/rest/v1/web-analytics/locations

GET
/rest/v1/web-analytics/locations
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

from*string

Inclusive lower bound of the analysis window as YYYY-MM-DD.

Match^\d{4}-\d{2}-\d{2}$
Formatdate
to*string

Inclusive upper bound of the analysis window as YYYY-MM-DD.

Match^\d{4}-\d{2}-\d{2}$
Formatdate
webSourceId?string

Optional web source UUID. Omit to aggregate all web sources in the account.

Formatuuid
excludeBots?boolean

Exclude detected bot sessions. Defaults to true.

filters?string

JSON-encoded query input.

dimension*string

Value in

  • "country"
  • "region"
  • "city"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/web-analytics/locations?from=2026-07-01&to=2026-07-31&dimension=country"
{  "rows": [    {      "name": "string",      "code": "string",      "visitors": 0    }  ],  "totalCount": 0,  "dataUpdatedAt": "string"}

GET/rest/v1/web-analytics/devices

GET
/rest/v1/web-analytics/devices
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

from*string

Inclusive lower bound of the analysis window as YYYY-MM-DD.

Match^\d{4}-\d{2}-\d{2}$
Formatdate
to*string

Inclusive upper bound of the analysis window as YYYY-MM-DD.

Match^\d{4}-\d{2}-\d{2}$
Formatdate
webSourceId?string

Optional web source UUID. Omit to aggregate all web sources in the account.

Formatuuid
excludeBots?boolean

Exclude detected bot sessions. Defaults to true.

filters?string

JSON-encoded query input.

dimension*string

Value in

  • "device"
  • "browser"
  • "os"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/web-analytics/devices?from=2026-07-01&to=2026-07-31&dimension=device"
{  "rows": [    {      "name": "string",      "visitors": 0    }  ],  "totalCount": 0,  "dataUpdatedAt": "string"}

GET/rest/v1/web-analytics/current-visitors

GET
/rest/v1/web-analytics/current-visitors
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

webSourceId?string

Optional web source UUID. Omit to count visitors across all account web sources.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/web-analytics/current-visitors"
{  "count": 0}

GET/rest/v1/web-analytics/path-explorer

GET
/rest/v1/web-analytics/path-explorer
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

from*string

Inclusive lower bound of the analysis window as YYYY-MM-DD.

Match^\d{4}-\d{2}-\d{2}$
Formatdate
to*string

Inclusive upper bound of the analysis window as YYYY-MM-DD.

Match^\d{4}-\d{2}-\d{2}$
Formatdate
webSourceId?string

Optional web source UUID. Omit to aggregate all web sources in the account.

Formatuuid
excludeBots?boolean

Exclude detected bot sessions. Defaults to true.

filters?string

JSON-encoded query input.

path*string

JSON-encoded query input.

direction?string

Value in

  • "forward"
  • "reverse"
stepKind?string

Value in

  • "PAGE"
  • "EVENT"
search?string
Lengthlength <= 200
limit?integer
Range1 <= value <= 1000

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/web-analytics/path-explorer?from=2026-07-01&to=2026-07-31&path=string"
{  "anchorSessions": 0,  "steps": [    {      "key": "string",      "kind": "PAGE",      "label": "string",      "isTerminal": true,      "isOther": true,      "sessions": 0    }  ],  "hasMore": true}

GET/rest/v1/analytics/query-catalog

GET
/rest/v1/analytics/query-catalog
AuthorizationBearer <token>

Ours Privacy API key

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/analytics/query-catalog"
{  "version": 1,  "entries": [    {      "id": "string",      "label": "string",      "type": "string",      "operators": [        "string"      ],      "scope": "string",      "provider": "string",      "missingBehavior": "string",      "requiresPath": true,      "allowedTypes": [        "string"      ]    }  ],  "limitations": [    "string"  ]}

GET/rest/v1/analytics/property-suggestions

GET
/rest/v1/analytics/property-suggestions
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

eventName?string

Optional exact event name to scope the suggestions.

Length1 <= length <= 1000
sourceId?string

Optional exact source identifier to scope the suggestions.

Length1 <= length <= 200

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/rest/v1/analytics/property-suggestions"
{  "entities": [    {      "property": "event.properties",      "path": [        "string"      ],      "type": "string"    }  ],  "sampled": true,  "from": "2019-08-24T14:15:22Z",  "to": "2019-08-24T14:15:22Z"}

How is this guide?