provider web_analyticsweb_analytics GET /api/environments/{environment_id}/web_analytics/recap/
@utdk/posthog /api/environments/{environment_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
environment_id path required
Deprecated. Use /api/projects/{project_id}/ instead.
string

Try it

Authentication
Configure credentials for PostHog API
environmentsWebAnalyticsRecap
GET/api/environments/{environment_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

Deprecated. Use /api/projects/{project_id}/ instead.

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.environmentsWebAnalyticsRecap({
  "compare": true,
  "days": 7
})