Overview
The Analytics API provides access to KPI dashboards, timeseries data, funnel analysis, retention cohorts, and activity metrics. All analytics are powered by the BigQueryAnalyticsService and require Customer JWT authentication.
Endpoints
KPI Dashboard
GET /api/v1/analytics/kpis
Authentication: Customer JWT (Authorization: Bearer header)
Returns paginated KPI tiles with sparkline data for the dashboard overview.
Query parameters:
| Parameter | Type | Required | Description |
|---|
start_date | string (date) | Yes | Start of the date range (e.g., 2026-02-01) |
end_date | string (date) | Yes | End of the date range (e.g., 2026-02-19) |
compare | boolean | No | Include comparison with the previous period |
Response:
{
"data": {
"kpis": [
{
"name": "Daily Active Users",
"value": 12450,
"change": 8.3,
"sparkline": [11200, 11500, 11800, 12100, 12450]
},
{
"name": "Revenue",
"value": 45230.50,
"change": 12.1,
"sparkline": [38000, 40000, 42000, 44000, 45230]
}
]
}
}
KPI Timeseries
GET /api/v1/analytics/kpis/timeseries
Authentication: Customer JWT (Authorization: Bearer header)
Returns timeseries data for a specific metric at the requested granularity.
Query parameters:
| Parameter | Type | Required | Description |
|---|
start_date | string (date) | Yes | Start of the date range |
end_date | string (date) | Yes | End of the date range |
metric | string | Yes | Metric identifier (e.g., dau, revenue, sessions) |
granularity | string | Yes | hourly, daily, weekly, or monthly |
Response:
{
"data": {
"metric": "dau",
"granularity": "daily",
"points": [
{ "timestamp": "2026-02-01T00:00:00Z", "value": 11200 },
{ "timestamp": "2026-02-02T00:00:00Z", "value": 11500 },
{ "timestamp": "2026-02-03T00:00:00Z", "value": 11800 }
]
}
}
Funnel Analysis
GET /api/v1/analytics/funnel/{funnelName}
Authentication: Customer JWT (Authorization: Bearer header)
Returns conversion data for a named funnel.
Path parameters:
| Parameter | Type | Description |
|---|
funnelName | string | Funnel identifier (e.g., onboarding, purchase, activation) |
Query parameters:
| Parameter | Type | Required | Description |
|---|
start_date | string (date) | Yes | Start of the date range |
end_date | string (date) | Yes | End of the date range |
Response:
{
"data": {
"funnel": "onboarding",
"steps": [
{ "name": "flow_started", "count": 5000, "conversion": 100.0 },
{ "name": "step_1_completed", "count": 4200, "conversion": 84.0 },
{ "name": "step_2_completed", "count": 3500, "conversion": 70.0 },
{ "name": "flow_completed", "count": 2800, "conversion": 56.0 }
]
}
}
Retention Cohorts
GET /api/v1/analytics/retention
Authentication: Customer JWT (Authorization: Bearer header)
Returns cohort retention curves grouped by the specified interval.
Query parameters:
| Parameter | Type | Required | Description |
|---|
start_date | string (date) | Yes | Start of the date range |
end_date | string (date) | Yes | End of the date range |
cohort_interval | string | Yes | Cohort grouping: daily, weekly, or monthly |
Response:
{
"data": {
"cohort_interval": "weekly",
"cohorts": [
{
"cohort_date": "2026-02-03",
"size": 1200,
"retention": [100.0, 62.5, 48.3, 41.0]
},
{
"cohort_date": "2026-02-10",
"size": 1350,
"retention": [100.0, 65.2, 50.1]
}
]
}
}
User Activity
GET /api/v1/analytics/activity
Authentication: Customer JWT (Authorization: Bearer header)
Returns active, new, and churned user counts for the specified date range.
Query parameters:
| Parameter | Type | Required | Description |
|---|
start_date | string (date) | Yes | Start of the date range |
end_date | string (date) | Yes | End of the date range |
Response:
{
"data": {
"active_users": 12450,
"new_users": 3200,
"churned_users": 890,
"reactivated_users": 150
}
}
Async Bulk Export
For large-scale data exports, AppDNA provides an asynchronous export workflow backed by the SdkEventExport entity.
Export Lifecycle
1. Create export request --> status: "processing"
2. Server processes events in background
3. Export completes --> status: "completed", download_url available
4. Download file before expiration
Export Entity Fields
| Field | Type | Description |
|---|
status | string | processing, completed, or failed |
params.start_date | string (date) | Export date range start |
params.end_date | string (date) | Export date range end |
params.event_names | string[] | Filter by event names (empty = all events) |
download_url | string | Signed URL for downloading the export file |
event_count | number | Total events in the export |
file_size_bytes | number | Size of the export file |
completed_at | string (datetime) | When the export finished processing |
expires_at | string (datetime) | When the download URL expires |
Export download URLs are signed and time-limited. Download the file before the expires_at timestamp. After expiration, you must create a new export request.
Callback URL
You can provide a callback_url when creating an export. AppDNA will send a POST request to this URL when the export completes or fails:
{
"export_id": "exp-abc123",
"status": "completed",
"download_url": "https://storage.googleapis.com/...",
"event_count": 150000,
"file_size_bytes": 48230400
}
All analytics queries are scoped to the authenticated user’s tenant_id and app_id. There is no way to query across tenants or applications.
Analytics data has a processing delay of up to 5 minutes from event ingestion. Real-time dashboards reflect this latency.