Get experience timeseries
Retrieve per-variant time series data for an experience (A/B test).
POST /analytics/experience/{experienceId}/timeseries
Returns metric values over time for each variation in the experiment, segmented by variation name. Use this data to compare variant performance over time and compute signals like "win-day count" (how many periods a variant beat control).
Parameters
- experienceId (path) — required. UUID of the experience.
- granularity — optional time bucketing: hour, day (default), week, or month.
- mode — cumulative (default, running totals) or noncumulative (per-bucket values).
- metrics — optional array of metric enum values to include (see table below). Defaults to conversion_rate, net_revenue_per_visitor, gross_profit_per_visitor.
- startTs — optional 10-digit epoch timestamp in seconds. Defaults to experience start date.
- endTs — optional 10-digit epoch timestamp in seconds. Defaults to now or experience end date.
- filters — optional analytics filters object. See below and the Filters Reference for available fields.
Available Metrics
Pass one or more of these enum values in the metrics array:
| Value | Description |
|---|---|
| conversion_rate | Conversion rate |
| net_revenue_per_visitor | Revenue per visitor (RPV) |
| gross_profit_per_visitor | Profit per visitor (PPV) |
| aov | Average order value |
| n_visitors | Visitor count |
| n_orders | Order count |
| net_revenue | Total net revenue |
Filters
This endpoint accepts the same filters as POST /analytics/resource/{experienceId}. Key filters include:
| Field | Type | Description |
|---|---|---|
| deviceType | string | "any", "mobile", or "desktop" |
| visitorType | string | "any", "new", or "returning" |
| countryCodes | string[] | ISO 3166-1 alpha-2 codes, e.g. ["US", "GB"] |
| sourceSitesOrChannels | string[] | Traffic channel names (see Filters Reference) |
| userBehavior | object | Visitor behavior filter (see sub-fields below) |
| experimentProductsOnly | boolean | Only include products in the experiment (target products) |
| onlyProductIds | string[] | Shopify product IDs to include |
| onlyProductHandles | string[] | Shopify product handles to include |
userBehavior sub-fields
All fields are optional booleans. Set to true to filter to only visitors who performed that action.
| Field | Description |
|---|---|
| viewedProductPage | Visitor viewed a product page |
| viewedCollectionPage | Visitor viewed a collection page |
| addedToCart | Visitor added an item to cart |
| viewedCheckout | Visitor reached checkout |
See the Filters Reference section for the full list of available filter fields.
Response Structure
The response contains a segments object keyed by variation name. Each segment has a data array of time-bucketed metric values. A variations array provides metadata including which variation is the control.
Each data point includes a dt field as a formatted date string (not Unix epoch). Format depends on granularity:
- hour / day: "YYYY-MM-DD HH:mm:ss"
- week / month: "YYYY-MM-DD"
Date Range Behavior
- When startTs and endTs are omitted, the date range defaults to the experience's full lifetime (start date through end/pause date or now).
- If the experience is paused or ended, the response is automatically truncated at the pause/end date — no data points are returned after that point.
- If the provided startTs is before the experience start date, it is clamped to the experience start. Similarly, endTs is clamped to the experience end/pause date.
- Clamping only applies to a window that overlaps the experience lifetime. A window that falls entirely outside it is rejected rather than clamped: HTTP 400 with { "error": "Requested time range falls outside the experience lifetime" }.
- startTs must be strictly before endTs. An inverted range returns HTTP 400 with { "error": "Start time must be before end time" }.
Rate Limit: 50 requests per 30s window, refilling 25 tokens every 30s.
Request
- Base URLhttps://api.intelligems.io
- AuthAPI key in header intelligems-access-token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Request body
Response
OK
Example response
{
"currency": "USD",
"granularity": "day",
"mode": "cumulative",
"experienceId": "a1a1a1a1-a1a1-1111-aaaa-aa1111111111",
"experienceName": "Homepage Hero CTA Test",
"variations": [
{
"id": "b2b2b2b2-b2b2-2222-bbbb-bb2222222222",
"name": "Control",
"isControl": true
},
{
"id": "c3c3c3c3-c3c3-3333-cccc-cc3333333333",
"name": "Variant B",
"isControl": false
}
],
"cogsConfigured": false,
"cogsCoveragePct": 0,
"segments": {
"Control": {
"data": [
{
"dt": "2025-01-01T00:00:00",
"conversion_rate": 0.0312,
"net_revenue_per_visitor": 1.84,
"gross_profit_per_visitor": null
},
{
"dt": "2025-01-02T00:00:00",
"conversion_rate": 0.0328,
"net_revenue_per_visitor": 1.91,
"gross_profit_per_visitor": null
}
]
},
"Variant B": {
"data": [
{
"dt": "2025-01-01T00:00:00",
"conversion_rate": 0.0345,
"net_revenue_per_visitor": 1.97,
"gross_profit_per_visitor": null
},
{
"dt": "2025-01-02T00:00:00",
"conversion_rate": 0.0361,
"net_revenue_per_visitor": 2.05,
"gross_profit_per_visitor": null
}
]
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.