Sites

Get site analytics

Returns traffic analytics for a site over a date range: pageview/visitor totals, new vs. returning visitors, a default conversion funnel, a per-day time series, and top pages, referrers, and dimensional breakdowns (device, browser, OS, geography, and UTM parameters). Defaults to the last 30 days; the range cannot exceed 366 days.

get/sites/{id}/analytics

Request

  • Base URL: https://api.crevio.co/v1
  • URL: https://api.crevio.co/v1/sites/{id}/analytics
  • Auth: API key in header Authorization

Path parameters

idstring required

The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")

Query parameters

start_datestring date

Start of the date range (inclusive), as an ISO-8601 date (YYYY-MM-DD). Defaults to 30 days before end_date.

end_datestring date

End of the date range (inclusive), as an ISO-8601 date (YYYY-MM-DD). Defaults to today.

Response

Site analytics for the requested period

object'site_analytics' required
site_idstring required

Prefix id of the site (e.g. site_abc123).

Example response

{
  "object": "site_analytics",
  "site_id": "site_ExD8Y6PWw0xJrfD9QKVgvnRZ",
  "period": {
    "start_date": "2026-05-05",
    "end_date": "2026-06-04"
  },
  "totals": {
    "pageviews": 1820,
    "visitors": 642
  },
  "new_vs_returning": {
    "new_visitors": 511,
    "returning_visitors": 131
  },
  "funnel": [
    {
      "label": "Landing",
      "visitors": 642
    },
    {
      "label": "Product view",
      "visitors": 188
    },
    {
      "label": "Checkout",
      "visitors": 54
    },
    {
      "label": "Purchase",
      "visitors": 21
    }
  ],
  "by_day": [
    {
      "date": "2026-06-04",
      "pageviews": 96,
      "visitors": 38
    }
  ],
  "top_pages": [
    {
      "path": "/",
      "pageviews": 820,
      "visitors": 410
    }
  ],
  "top_referrers": [
    {
      "source": "google.com",
      "pageviews": 240,
      "visitors": 180
    }
  ],
  "custom_events": [
    {
      "event_name": "purchase",
      "hits": 21,
      "visitors": 21,
      "revenue": 1049.79
    }
  ],
  "by_device": [
    {
      "value": "mobile",
      "pageviews": 1100,
      "visitors": 402
    }
  ],
  "by_country": [
    {
      "value": "US",
      "pageviews": 900,
      "visitors": 360
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.