Analytics your AI agent can actually use. Track, experiment, and optimize via MCP.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Read current account plan, usage, billing estimate and spend cap, Pro pricing, and a human payment handoff when needed. Requires account:read. Read-only: cannot charge or manage billing. Call again after checkout to verify hosted entitlement, then retry the original task.
This tool takes no arguments.
Read current account plan, usage, billing estimate and spend cap, Pro pricing, and a human payment handoff when needed. Requires account:read. Read-only: cannot charge or manage billing. Call again after checkout to verify hosted entitlement, then retry the original task.
No arguments.
{
"type": "object",
"properties": {}
}Filtered automated traffic across all active projects in your account.
| Argument | Type | Description |
|---|---|---|
| limit | number | Max projects to include |
| period | string | Comparison period |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"limit": {
"type": "number",
"default": 10,
"maximum": 50,
"minimum": 1,
"description": "Max projects to include"
},
"period": {
"enum": [
"1d",
"7d",
"14d",
"30d",
"90d"
],
"type": "string",
"default": "7d",
"description": "Comparison period"
}
}
}Historical summary across all projects in your account: total events, active project count, daily trend, and top projects.
| Argument | Type | Description |
|---|---|---|
| limit | number | Max projects to include in the top-project list |
| period | string | Comparison period |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"limit": {
"type": "number",
"default": 10,
"maximum": 50,
"minimum": 1,
"description": "Max projects to include in the top-project list"
},
"period": {
"enum": [
"1d",
"7d",
"14d",
"30d",
"90d"
],
"type": "string",
"default": "7d",
"description": "Comparison period"
}
}
}Top property values ranked by count (pages, referrers, UTM sources, etc.) Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| days | number | Lookback window in days |
| event | string | Filter by event name (e.g. page_view) |
| limit | number | Max results |
| project* | string | Project name |
| property | string | Property key to group by (e.g. path, referrer, utm_source) |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"days": {
"type": "number",
"default": 7,
"maximum": 365,
"minimum": 1,
"description": "Lookback window in days"
},
"event": {
"type": "string",
"description": "Filter by event name (e.g. page_view)"
},
"limit": {
"type": "number",
"default": 20,
"maximum": 100,
"minimum": 1,
"description": "Max results"
},
"project": {
"type": "string",
"description": "Project name"
},
"property": {
"type": "string",
"default": "path",
"description": "Property key to group by (e.g. path, referrer, utm_source)"
}
}
}Funnel analysis: track where users drop off across a sequence of events (e.g. page_view → signup → purchase). Returns per-step user counts, conversion rates, and average time between steps. Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| since | string | Lookback period (e.g. '30d', '90d', or ISO date) |
| steps* | array | Funnel steps (2-8), each with an event name and optional filters |
| project* | string | Project name |
| count_by | string | Count by users or sessions |
| breakdown | string | Property key to segment by (e.g. 'variant', 'country'). Extracted from step 1 events. |
| breakdown_limit | number | Max breakdown groups (default 10, max 50) |
| conversion_window_hours | number | Max hours from step 1 to last step (default: 168 = 7 days) |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project",
"steps"
],
"properties": {
"since": {
"type": "string",
"default": "30d",
"description": "Lookback period (e.g. '30d', '90d', or ISO date)"
},
"steps": {
"type": "array",
"items": {
"type": "object",
"required": [
"event"
],
"properties": {
"event": {
"type": "string",
"description": "Event name for this step"
},
"filters": {
"type": "array",
"items": {
"type": "object",
"required": [
"property",
"op",
"value"
],
"properties": {
"op": {
"enum": [
"eq",
"neq",
"contains"
],
"type": "string",
"description": "Filter operator"
},
"value": {
"type": "string",
"description": "Filter value"
},
"property": {
"type": "string",
"description": "Property key to filter on"
}
}
},
"description": "Optional property filters for this step"
}
}
},
"maxItems": 8,
"minItems": 2,
"description": "Funnel steps (2-8), each with an event name and optional filters"
},
"project": {
"type": "string",
"description": "Project name"
},
"count_by": {
"enum": [
"user_id",
"session_id"
],
"type": "string",
"default": "user_id",
"description": "Count by users or sessions"
},
"breakdown": {
"type": "string",
"description": "Property key to segment by (e.g. 'variant', 'country'). Extracted from step 1 events."
},
"breakdown_limit": {
"type": "number",
"default": 10,
"maximum": 50,
"minimum": 1,
"description": "Max breakdown groups (default 10, max 50)"
},
"conversion_window_hours": {
"type": "number",
"default": 168,
"maximum": 8760,
"minimum": 1,
"description": "Max hours from step 1 to last step (default: 168 = 7 days)"
}
}
}Day-of-week × hour traffic grid with peak detection (times in UTC) Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| project* | string | Project name |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"project": {
"type": "string",
"description": "Project name"
}
}
}Period-over-period comparison with trend (events, users, bounce rate, session duration) Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| period | string | Comparison period |
| project* | string | Project name |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"period": {
"enum": [
"1d",
"7d",
"14d",
"30d",
"90d"
],
"type": "string",
"default": "7d",
"description": "Comparison period"
},
"project": {
"type": "string",
"description": "Project name"
}
}
}Get time series chart, KPIs (events, users), and country breakdown (events, unique users) for a project over N days Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| days | number | Lookback window in days |
| project* | string | Project name |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"days": {
"type": "number",
"default": 7,
"maximum": 365,
"minimum": 1,
"description": "Lookback window in days"
},
"project": {
"type": "string",
"description": "Project name"
}
}
}Entry/exit page stats with bounce rate, avg duration, events per session Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| type | string | Page type |
| limit | number | Max results |
| project* | string | Project name |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"type": {
"enum": [
"entry",
"exit",
"both"
],
"type": "string",
"default": "entry",
"description": "Page type"
},
"limit": {
"type": "number",
"default": 20,
"maximum": 100,
"minimum": 1,
"description": "Max results"
},
"project": {
"type": "string",
"description": "Project name"
}
}
}Use this when you want to explore an authorized project's analytics beside the conversation. Opens a compact project/view picker; accepts empty input. Analysis queries retain their existing plan and access checks. Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
No arguments.
{
"type": "object",
"properties": {}
}Bounded session path analysis from entry pages to goal, drop-off, or truncation. Useful for connecting page behavior to funnels, retention, and experiments. Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| since | string | Lookback period |
| project* | string | Project name |
| max_steps | integer | Max mixed page/event steps before truncation |
| goal_event* | string | Goal event to attribute within the same session |
| path_limit | integer | Max children kept per node |
| entry_limit | integer | Max entry pages to include |
| candidate_session_cap | integer | Bound on candidate sessions scanned |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project",
"goal_event"
],
"properties": {
"since": {
"enum": [
"7d",
"14d",
"30d",
"90d"
],
"type": "string",
"default": "30d",
"description": "Lookback period"
},
"project": {
"type": "string",
"description": "Project name"
},
"max_steps": {
"type": "integer",
"default": 5,
"maximum": 5,
"minimum": 1,
"description": "Max mixed page/event steps before truncation"
},
"goal_event": {
"type": "string",
"description": "Goal event to attribute within the same session"
},
"path_limit": {
"type": "integer",
"default": 5,
"maximum": 10,
"minimum": 1,
"description": "Max children kept per node"
},
"entry_limit": {
"type": "integer",
"default": 10,
"maximum": 20,
"minimum": 1,
"description": "Max entry pages to include"
},
"candidate_session_cap": {
"type": "integer",
"default": 5000,
"maximum": 10000,
"minimum": 100,
"description": "Bound on candidate sessions scanned"
}
}
}Cohort retention analysis — track what % of users return over time. By default uses session-based retention (any return visit counts). Pass 'event' to switch to event-based retention. Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| event | string | First-seen event filter (e.g. signup). Switches to event-based retention. |
| period | string | Cohort grouping period |
| cohorts | number | Number of cohort periods (max: day=30, week=12, month=12) |
| project* | string | Project name |
| returning_event | string | What counts as 'returned' (defaults to same as event) |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"event": {
"type": "string",
"description": "First-seen event filter (e.g. signup). Switches to event-based retention."
},
"period": {
"enum": [
"day",
"week",
"month"
],
"type": "string",
"default": "week",
"description": "Cohort grouping period"
},
"cohorts": {
"type": "number",
"default": 8,
"maximum": 30,
"minimum": 1,
"description": "Number of cohort periods (max: day=30, week=12, month=12)"
},
"project": {
"type": "string",
"description": "Project name"
},
"returning_event": {
"type": "string",
"description": "What counts as 'returned' (defaults to same as event)"
}
}
}Session duration histogram with engaged percentage and median bucket Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| project* | string | Project name |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"project": {
"type": "string",
"description": "Project name"
}
}
}Filtered automated traffic for a single project: automated requests, dropped events, categories, and top actors.
| Argument | Type | Description |
|---|---|---|
| limit | number | Max actors to include |
| period | string | Comparison period |
| project* | string | Project name |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"limit": {
"type": "number",
"default": 10,
"maximum": 50,
"minimum": 1,
"description": "Max actors to include"
},
"period": {
"enum": [
"1d",
"7d",
"14d",
"30d",
"90d"
],
"type": "string",
"default": "7d",
"description": "Comparison period"
},
"project": {
"type": "string",
"description": "Project name"
}
}
}Create an A/B experiment
| Argument | Type | Description |
|---|---|---|
| name* | string | Experiment name |
| project* | string | Project name |
| weights | array | Variant weights, e.g. [50, 50] |
| variants* | array | Variant keys, e.g. ['control', 'new_cta'] |
| goal_event* | string | Goal event name to measure conversions |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project",
"name",
"variants",
"goal_event"
],
"properties": {
"name": {
"type": "string",
"description": "Experiment name"
},
"project": {
"type": "string",
"description": "Project name"
},
"weights": {
"type": "array",
"items": {
"type": "number"
},
"description": "Variant weights, e.g. [50, 50]"
},
"variants": {
"type": "array",
"items": {
"type": "string"
},
"description": "Variant keys, e.g. ['control', 'new_cta']"
},
"goal_event": {
"type": "string",
"description": "Goal event name to measure conversions"
}
}
}Create a new Agent Analytics project. Returns the tracking snippet and API example. Idempotent — returns existing project if name already taken.
| Argument | Type | Description |
|---|---|---|
| name* | string | Project name (letters, numbers, hyphens, dots, max 64 chars) |
| allowed_origins | string | Allowed CORS origins, defaults to * |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Project name (letters, numbers, hyphens, dots, max 64 chars)"
},
"allowed_origins": {
"type": "string",
"description": "Allowed CORS origins, defaults to *"
}
}
}Delete an experiment
| Argument | Type | Description |
|---|---|---|
| id* | string | Experiment ID |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "Experiment ID"
}
}
}Get experiment details with results Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| id* | string | Experiment ID |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "Experiment ID"
}
}
}Get compact self-improving project context: goals, activation events, event-name glossary, and major date annotations used to interpret analytics results. Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| project* | string | Project name or ID |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"project": {
"type": "string",
"description": "Project name or ID"
}
}
}List A/B experiments for a project Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| project* | string | Project name |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"project": {
"type": "string",
"description": "Project name"
}
}
}List all your Agent Analytics projects Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
No arguments.
{
"type": "object",
"properties": {}
}Real-time snapshot: active visitors, sessions, events per minute, top pages, and recent events. Reads from in-memory ring buffer — no D1 query.
| Argument | Type | Description |
|---|---|---|
| window | number | Time window in seconds (10-300, default 60) |
| project* | string | Project name |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"window": {
"type": "number",
"default": 60,
"maximum": 300,
"minimum": 10,
"description": "Time window in seconds (10-300, default 60)"
},
"project": {
"type": "string",
"description": "Project name"
}
}
}Discover event names and property keys from recent events Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| days | number | Lookback window in days |
| project* | string | Project name |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"days": {
"type": "number",
"default": 30,
"maximum": 365,
"minimum": 1,
"description": "Lookback window in days"
},
"project": {
"type": "string",
"description": "Project name"
}
}
}Property keys by event name, sampled from recent events Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| since | string | Start date (ISO or shorthand like 7d) |
| sample | number | Events to sample |
| project* | string | Project name |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"since": {
"type": "string",
"description": "Start date (ISO or shorthand like 7d)"
},
"sample": {
"type": "number",
"default": 5000,
"maximum": 10000,
"minimum": 100,
"description": "Events to sample"
},
"project": {
"type": "string",
"description": "Project name"
}
}
}Run a flexible ad-hoc analytics query with custom metrics, filters, grouping, date ranges, and privacy-first customer email lookup. This is the most powerful endpoint — use it when other tools don't answer the question. Examples of questions this tool answers: - "How many signups from Germany this week?" → filters: [{field:"event",op:"eq",value:"signup"},{field:"country",op:"eq",value:"DE"}] - "Which events contain 'page' in the name?" → filters: [{field:"event",op:"contains",value:"page"}], group_by: ["event"] - "Daily unique users for the last 30 days" → metrics: ["unique_users"], group_by: ["date"], date_from: "30d" - "Events per country" → group_by: ["country"] Filter operators: eq, neq, gt, lt, gte, lte, contains Filterable fields: event, user_id, date, country, session_id, timestamp, and any properties.* field (e.g. properties.path) For customer-specific reads, use the top-level email input instead of hashing locally. Raw email is sent only in the authenticated HTTPS POST body; the server matches via a project-scoped HMAC index and does not store raw email in event rows or profile traits. Built-in fields are a closed list. Event properties such as referrer, utm_source, path, browser, and hostname must be queried as properties.referrer, properties.utm_source, properties.path, properties.browser, and properties.hostname. Invalid filter fields fail loudly and return /properties-style guidance instead of being silently ignored. Group by: event, date, user_id, session_id, country Metrics: event_count, unique_users, session_count, bounce_rate, avg_duration Count modes: raw, session_then_user. The default for event_count is session_then_user for activation-safe counting: session-backed rows count by session, no-session rows fall back to user only when that user has no session-backed row in the same group, and fully anonymous rows fall back to event id. count_mode is ignored when event_count is not requested.
| Argument | Type | Description |
|---|---|---|
| string | Filter by server-side scoped HMAC email lookup. Raw email is sent only in the authenticated HTTPS POST body and is not stored in event rows or profile traits. |
List individual session records Anonymous preview is limited to agentanalytics-demo synthetic read-only data; sign in for your own projects.
| Argument | Type | Description |
|---|---|---|
| limit | number | Max results |
| since | string | Start date |
| project* | string | Project name |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"limit": {
"type": "number",
"default": 100,
"maximum": 1000,
"minimum": 1,
"description": "Max results"
},
"since": {
"type": "string",
"description": "Start date"
},
"project": {
"type": "string",
"description": "Project name"
}
}
}Set or replace compact project context. The encoded API request body is capped at 512KB. Read existing context first, merge still-valid entries, inspect event names with properties or properties_received, and save only durable product truth tied to goals, activation events, event-name glossary entries, or date annotations for major product changes. Use annotations for meaningful landing page, pricing, onboarding, feature, release, or experiment changes; do not store git commit logs, noisy edits, PII, secrets, or long release notes.
| Argument | Type | Description |
|---|---|---|
| goals | array | Short business goals, max 5 |
| project* | string | Project name or ID |
| glossary | array | Event-name glossary entries, max 10 |
| annotations | array | Major date annotations, max 100 |
| activation_events | array | Event names that define activation, max 8 |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"goals": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"maxItems": 5,
"description": "Short business goals, max 5"
},
"project": {
"type": "string",
"description": "Project name or ID"
},
"glossary": {
"type": "array",
"items": {
"type": "object",
"required": [
"event_name",
"term",
"definition"
],
"properties": {
"term": {
"type": "string",
"description": "Human/product term for the event"
},
"definition": {
"type": "string",
"description": "Short definition that helps interpret analytics results"
},
"event_name": {
"type": "string",
"description": "Existing or intended event name this glossary entry explains"
}
}
},
"default": [],
"maxItems": 10,
"description": "Event-name glossary entries, max 10"
},
"annotations": {
"type": "array",
"items": {
"type": "object",
"required": [
"occurred_at",
"title"
],
"properties": {
"note": {
"type": "string",
"maxLength": 500,
"description": "Optional short note, max 500 characters"
},
"title": {
"type": "string",
"maxLength": 120,
"description": "Short annotation title, max 120 characters"
},
"occurred_at": {
"type": "string",
"description": "ISO-8601 datetime when the major product change happened"
}
}
},
"default": [],
"maxItems": 100,
"description": "Major date annotations, max 100"
},
"activation_events": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"maxItems": 8,
"description": "Event names that define activation, max 8"
}
}
}Update experiment status (pause, resume, complete)
| Argument | Type | Description |
|---|---|---|
| id* | string | Experiment ID |
| status* | string | New status |
| winner | string | Winning variant (for completing) |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string",
"description": "Experiment ID"
},
"status": {
"enum": [
"active",
"paused",
"completed"
],
"type": "string",
"description": "New status"
},
"winner": {
"type": "string",
"description": "Winning variant (for completing)"
}
}
}| limit | number | Max results (default 100, max 1000) |
| order | string | Sort direction |
| date_to | string | End date (ISO 8601). Defaults to today. |
| filters | array | Filters to apply |
| metrics | array | Metrics to compute |
| project* | string | Project name |
| group_by | array | Fields to group results by |
| order_by | string | Field to sort by |
| date_from | string | Start date (ISO 8601 or Nd shorthand like '30d'). Defaults to 7 days ago. |
| count_mode | string | How event_count is aggregated. Default for event_count: session_then_user. Session-backed rows count by session, no-session rows fall back to user only when that user has no session-backed row in the same group, and fully anonymous rows fall back to event id. Ignored for queries without event_count. Use raw for ingestion/debugging counts. |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"project"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "Filter by server-side scoped HMAC email lookup. Raw email is sent only in the authenticated HTTPS POST body and is not stored in event rows or profile traits."
},
"limit": {
"type": "number",
"default": 100,
"maximum": 1000,
"minimum": 1,
"description": "Max results (default 100, max 1000)"
},
"order": {
"enum": [
"asc",
"desc"
],
"type": "string",
"default": "desc",
"description": "Sort direction"
},
"date_to": {
"type": "string",
"description": "End date (ISO 8601). Defaults to today."
},
"filters": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"op",
"value"
],
"properties": {
"op": {
"enum": [
"eq",
"neq",
"gt",
"lt",
"gte",
"lte",
"contains"
],
"type": "string",
"description": "Filter operator"
},
"field": {
"type": "string",
"description": "Field to filter on (event, user_id, date, country, session_id, timestamp, or properties.*)"
},
"value": {
"type": [
"string",
"number"
],
"description": "Value to compare against"
}
}
},
"description": "Filters to apply"
},
"metrics": {
"type": "array",
"items": {
"enum": [
"event_count",
"unique_users",
"session_count",
"bounce_rate",
"avg_duration"
],
"type": "string"
},
"default": [
"event_count"
],
"description": "Metrics to compute"
},
"project": {
"type": "string",
"description": "Project name"
},
"group_by": {
"type": "array",
"items": {
"enum": [
"event",
"date",
"user_id",
"session_id",
"country"
],
"type": "string"
},
"default": [],
"description": "Fields to group results by"
},
"order_by": {
"enum": [
"event_count",
"unique_users",
"session_count",
"date",
"event"
],
"type": "string",
"description": "Field to sort by"
},
"date_from": {
"type": "string",
"description": "Start date (ISO 8601 or Nd shorthand like '30d'). Defaults to 7 days ago."
},
"count_mode": {
"enum": [
"raw",
"session_then_user"
],
"type": "string",
"description": "How event_count is aggregated. Default for event_count: session_then_user. Session-backed rows count by session, no-session rows fall back to user only when that user has no session-backed row in the same group, and fully anonymous rows fall back to event id. Ignored for queries without event_count. Use raw for ingestion/debugging counts."
}
}
}