Get dashboard statistics

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

HeaderValue
AuthorizationBearer <token>

Response

Returns a JSON object with visit and e-commerce statistics for the current period and a comparison period.

Response Body

FieldTypeDescription
tracking_availablebooleanWhether tracking data is available. false if tracking is not configured or no data has been recorded yet.
currentobjectStatistics for the most recent 7-day period (ending yesterday).
comparison_periodobjectStatistics for the 7-day period immediately before the current period.
currencystringThe default currency code for this instance (e.g. EUR, USD).

Each statistics object (current and comparison_period) contains:

FieldTypeDescription
visitsintegerTotal number of site visits in the period.
ordersintegerTotal number of completed orders.
revenuenumberTotal revenue for the period.
start_datestringStart of the statistics period (ISO 8601).
end_datestringEnd 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
}