Analytics API
Access dashboard metrics, performance data, and marketing analytics.
Dashboard Metrics
Get the main dashboard metrics for a site.
GET /api/v1/analytics/dashboard
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
site_id | string | Required | Site ID |
period | string | 30d | Time period (7d, 30d, 90d, 12m) |
Example Response
{
"organic_traffic": {
"current": 12500,
"previous": 10200,
"change_percent": 22.5
},
"keyword_rankings": {
"top_3": 12,
"top_10": 45,
"total_tracked": 150
},
"tasks_completed": {
"current_period": 28,
"total": 156
},
"health_score": 85,
"period": "30d"
}Performance Trends
Get performance data over time.
GET /api/v1/analytics/trends
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
site_id | string | Required | Site ID |
metric | string | Required | Metric name (organic_traffic, keyword_positions, conversions) |
period | string | 30d | Time period |
Example Response
{
"metric": "organic_traffic",
"period": "30d",
"data_points": [
{ "date": "2026-01-26", "value": 380 },
{ "date": "2026-01-27", "value": 412 },
{ "date": "2026-01-28", "value": 395 }
]
}Available Metrics
| Metric | Description |
|---|---|
organic_traffic | Daily organic search visits |
keyword_positions | Average keyword ranking position |
conversions | Tracked conversion events |
page_views | Total page views |
bounce_rate | Site-wide bounce rate |