web_analytics
web_analytics

Summarize web analytics

Summarizes a project's web analytics over a lookback window (default 7 days): unique visitors, pageviews, sessions, bounce rate, and average session duration with period-over-period comparisons, plus the top 5 pages, top 5 traffic sources, and goal conversions.

get/api/projects/{project_id}/web_analytics/weekly_digest/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/web_analytics/weekly_digest/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Query parameters

compareboolean

When true (default), include period-over-period change for each metric comparing against the prior equal-length period. Set to false to skip the comparison query (faster).

daysinteger

Lookback window in days (1–90). Defaults to 7.

Response

dashboard_urlstring uri required

Link to the Web analytics dashboard for this project.

Changes

No recorded changes to this operation across all 1 revision of this API.