0% found this document useful (0 votes)
1 views2 pages

Analytics API

The Analytics & Metrics API allows users to ingest events, query aggregated metrics, and export raw event logs with sub-second query latency for large datasets. Key endpoints include event ingestion, metric retrieval, funnel data, cohort retention analysis, and report scheduling. The API supports various parameters for event objects and metric queries, enabling detailed analytics and reporting capabilities.

Uploaded by

psx27139
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views2 pages

Analytics API

The Analytics & Metrics API allows users to ingest events, query aggregated metrics, and export raw event logs with sub-second query latency for large datasets. Key endpoints include event ingestion, metric retrieval, funnel data, cohort retention analysis, and report scheduling. The API supports various parameters for event objects and metric queries, enabling detailed analytics and reporting capabilities.

Uploaded by

psx27139
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

v1.

0
Analytics & Metrics API
[Link]

Ingest events, query aggregated metrics, and export raw event logs. Built on a column-oriented store with
sub-second query latency for datasets up to 100 billion events.

Endpoints
POST /v1/events
Ingest one or more events

GET /v1/events
Query raw events with filters

GET /v1/metrics/{metric}
Retrieve an aggregated metric

GET /v1/funnels/{funnel_id}
Get funnel conversion data

POST /v1/funnels
Define a new funnel

GET /v1/retention
Cohort retention analysis

POST /v1/reports
Schedule an async report export

GET /v1/reports/{report_id}
Poll or download a scheduled report

POST /v1/events — Ingest Events


Accepts a single event object or an array of up to 5,000 events per request. Events are processed
asynchronously; delivery is guaranteed within 60 seconds.

Event Object
Require
Parameter Type d Description

event string Yes Event name, e.g. page_view, purchase, sign_up

user_id string No Internal user identifier for cross-device stitching

anonymous_id string No Session or device ID for anonymous users

properties object No Arbitrary key-value pairs describing the event


timestamp string No ISO 8601 timestamp; defaults to server time

context object No Device, locale, IP, and campaign attribution

Example
POST /v1/events [ { "event": "purchase", "user_id": "usr_7Hk2mP9qR", "properties": {
"product_id": "prod_xZ4", "revenue": 49.99, "currency": "USD" }, "timestamp":
"2026-06-10T14:32:00Z" } ]

GET /v1/metrics/{metric} — Query Metric


Returns time-series data for a built-in or custom metric.

Require
Parameter Type d Description

metric string Yes Metric slug: dau, mau, revenue, conversion_rate, …

start string Yes Start of time range, ISO 8601 or relative (e.g. -30d)

end string Yes End of time range

interval string No Aggregation bucket: hour, day (default), week, month

segment_by string No Property name to break the metric down by

filter string No RSQL filter expression, e.g. country==US

You might also like