Returns aggregated visit and e-commerce statistics for the current Makaira instance. The response includes data for the last 7 days and a comparison period of the 7 days before that.
If tracking is not configured for the instance, the response indicates that statistics are unavailable.
Requires authentication.
Request
GET /statistics
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Response
Returns a JSON object with visit and e-commerce statistics for the current period and a comparison period.
Response Body
| Field | Type | Description |
|---|---|---|
tracking_available | boolean | Whether tracking data is available. false if tracking is not configured or no data has been recorded yet. |
current | object | Statistics for the most recent 7-day period (ending yesterday). |
comparison_period | object | Statistics for the 7-day period immediately before the current period. |
currency | string | The default currency code for this instance (e.g. EUR, USD). |
Each statistics object (current and comparison_period) contains:
| Field | Type | Description |
|---|---|---|
visits | integer | Total number of site visits in the period. |
orders | integer | Total number of completed orders. |
revenue | number | Total revenue for the period. |
start_date | string | Start of the statistics period (ISO 8601). |
end_date | string | End of the statistics period (ISO 8601). |
Example Response (tracking available)
{
"tracking_available": true,
"current": {
"visits": 12430,
"orders": 320,
"revenue": 18540.00,
"start_date": "2026-06-06T00:00:00+00:00",
"end_date": "2026-06-12T00:00:00+00:00"
},
"comparison_period": {
"visits": 10980,
"orders": 295,
"revenue": 16320.00,
"start_date": "2026-05-30T00:00:00+00:00",
"end_date": "2026-06-05T00:00:00+00:00"
},
"currency": "EUR"
}Example Response (tracking not available)
{
"tracking_available": false
}
