# Website analytics from your code (/docs/websites/analytics/api)

Authenticated with `?privateKey=YOUR_KEY` (see [Authentication](/docs/authentication)).

<Endpoints ops={["GET /admin/website/analytics", "GET /admin/website/daily-stats", "GET /v3/websites/{websiteId}/diagnostics"]} />

<ApiPlayground
  ops={["GET /admin/website/analytics", "GET /admin/website/daily-stats", "GET /v3/websites/{websiteId}/diagnostics"]}
  method="get"
  path="/admin/website/analytics"
  tool="get_website_analytics"
  args={`{
  "websiteId": "64b7f0a1c2d3e4f5a6b7c8d9"
}`}
/>

## Use case: A weekly report [#use-case-a-weekly-report]

`GET /admin/website/daily-stats?websiteId=…` returns the last 30 days, day by day.
