provider web_analyticsweb_analytics GET /api/projects/{project_id}/web_analytics/recap/
@utdk/posthog /api/projects/{project_id}/web_analytics/recap/
Weekly web analytics recap
The 'Wrapped'-style weekly recap: everything in the weekly digest (visitors, pageviews, sessions, bounce rate, average session duration with period-over-period comparisons, top pages, top sources, and goals) plus a single derived weekly persona and a short list of screenshot-worthy highlights for the period.
compare query
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.
boolean
days query
Lookback window in days (1–90). Defaults to 7.
integer
project_id path required
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
string

Try it

Authentication
Configure credentials for PostHog API
webAnalyticsRecap
GET/api/projects/{project_id}/web_analytics/recap/
The 'Wrapped'-style weekly recap: everything in the weekly digest (visitors, pageviews, sessions, bounce rate, average session duration with period-over-period comparisons, top pages, top sources, and goals) plus a single derived weekly persona and a short list of screenshot-worthy highlights for the period.

Parameters

required

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

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.

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

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.webAnalyticsRecap({
  "compare": true,
  "days": 7
})