Analytics API
Access aggregated usage data to understand how users interact with Appilot and where they need help.
Token usage
Track AI token consumption by source:
GET /api/analytics/token-usage
Authorization: Bearer <token>
Query parameters:
| Parameter | Type | Description |
|---|---|---|
start_date | string | ISO date (e.g., 2025-01-01) |
end_date | string | ISO date |
source | string | Filter: extension, backoffice, widget |
group_by | string | Group: day, week, month |
Response:
{
"data": [
{
"date": "2025-01-15",
"source": "extension",
"model": "gemini-2.5-flash",
"input_tokens": 15420,
"output_tokens": 8230,
"total_tokens": 23650
}
],
"summary": {
"total_input_tokens": 154200,
"total_output_tokens": 82300,
"total_tokens": 236500
}
}
Activity data
Get aggregated interaction data:
GET /api/analytics/activity
Authorization: Bearer <token>
Response includes:
- Most visited domains and pages
- Most common questions
- Knowledge gaps (unanswered questions)
- User activity trends
Knowledge effectiveness
Measure how well your knowledge base covers user needs:
GET /api/analytics/knowledge-coverage
Authorization: Bearer <token>
Response includes:
- Pages with knowledge vs. without
- Request resolution rates
- Most requested topics
- Knowledge freshness metrics