Analytics APIEndpoints

Returns the full analytics metrics for up to 2 players of an AB test

Returns, in a single response, the full set of analytics metrics for up to 2 players of an AB test: views, plays, finishes, clicks, conversions with revenue in USD/BRL/EUR, engagement, pitch audience and pitch retention, as well as the derived play rate, conversion rate and revenue per visitor (RPV). Each item's `start_date` is optional — when omitted, it falls back to the player's own `started_at` (from the comparison group's `players` list) and, if that is not set, to the comparison group's `started_at`. When `end_date` is omitted, results run through the current time.

POST
/comparison_groups/stats

Authorization

apiToken apiVersion userAgent
X-Api-Token<token>

Access the application and copy your api token, then, just set the header X-Api-Token with it.

In: header

X-Api-Version<token>

The API version to use. Currently supported versions are:

  • v1: The current stable version

A request without this header, or with any other value, is answered by the edge with 404 and {"error_msg":"404 Route Not Found"}.

In: header

User-Agent<token>

A non-empty User-Agent identifying your integration is required. Requests without it are rejected at the edge before reaching the API.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/comparison_groups/stats" \  -H "Content-Type: application/json" \  -d '{    "comparison_group_id": "699f9683dfeab82d6246e13b",    "items": [      {        "player_id": "699f92f01dd8bb9e2b6aab3a",        "start_date": "2026-02-26 00:41:00"      },      {        "player_id": "699f9363c4b02ade5c5f1881",        "start_date": "2026-02-26 00:41:00"      }    ],    "events": [      "started",      "viewed",      "finished"    ]  }'
{  "comparison_group": {    "id": "string",    "name": "string",    "player_ids": [      "string"    ],    "started_at": "string",    "finished_at": "string"  },  "stats": [    {      "player_id": "string",      "pitch_time": 0,      "video_duration": 0,      "views": {        "total": 0,        "total_uniq_sessions": 0,        "total_uniq_device": 0      },      "plays": {        "total": 0,        "total_uniq_sessions": 0,        "total_uniq_device": 0      },      "finishes": {        "total": 0,        "total_uniq_sessions": 0,        "total_uniq_device": 0      },      "clicks": {        "total": 0,        "total_uniq_sessions": 0,        "total_uniq_device": 0      },      "conversions": {        "total": 0,        "total_uniq_sessions": 0,        "total_uniq_device": 0,        "total_amount_usd": 0,        "total_amount_brl": 0,        "total_amount_eur": 0      },      "engagement": {        "average_watched_time": 0,        "engagement_rate": 0,        "grouped_timed": [          {            "timed": 0,            "total_users": 0          }        ]      },      "pitch_audience": 0,      "pitch_retention_rate": 0,      "play_rate": 0,      "conversion_rate": 0,      "rpv_usd": 0,      "rpv_brl": 0,      "rpv_eur": 0    }  ]}