
Skill
simulate-returning-user
simulate returning user traffic for PostHog
Description
Send synthetic single-session multi-page traffic to a URL and confirm PostHog $pageview events fire across page views. Use when verifying that cookies persist correctly, that the same distinct_id is reused across navigations, or when debugging session-stitching issues.
SKILL.md
Simulate returning-user traffic
Drives a single browser context across N page views (cookies and localStorage persist), navigating between pages and reporting which PostHog events fired. This matches the behavior of a single visitor browsing multiple pages on the same site.
When to use
- Confirm that PostHog reuses the same
distinct_idacross page views in a session (no fresh anonymous IDs per page). - Confirm
$pageviewfires on every page view, not just the first. - Reproduce "session not stitching" or "events split across multiple users" reports.
How to invoke
Call the simulate_returning_user MCP tool with:
url(required) — the page to visit each iteration.page_views(default3) — number of page views in the session.interval(default5.0) — seconds between page views.posthog_host(defaulthttps://us.i.posthog.com).
To exercise multi-page navigation, call the tool once per URL — the cookies
won't carry across calls (each call is a separate Playwright context). For
true multi-page browsing within one session, edit the URL list passed to the
underlying CLI: traffic-sim returning-user --url A --url B --url C.
Interpreting the result
The structured response shape matches simulate_new_user. Key signals:
verified: trueandpageviews >= page_views— the session works.- Same
distinct_idacross all pageviews (visible in PostHog UI under the run_id query param) — session stitching works. - Different
distinct_idper visit — likely a cookie domain or storage-permissions issue. Inspect the rawposthog_requestsfor$session_idvalues to diagnose.
More skills from the posthog repository
View all 57 skillsanalyzing-expensive-users
analyze expensive users in AI observability
Jul 9AnalyticsCost OptimizationObservabilityPostHogauditing-endpoints
audit PostHog project endpoints
Jun 8AnalyticsAuditPostHogauditing-warehouse-source-health
audit PostHog data warehouse source health
Jun 18AuditData WarehouseObservabilityPostHogauditing-warehouse-view-health
audit PostHog materialized view health
Jun 18AuditData WarehousePerformancePostHogauthoring-error-tracking-alerts
author PostHog error tracking alerts
Jun 18AlertingDebuggingObservabilityPostHogauthoring-log-alerts
author log alerts in PostHog
Jul 18AnalyticsMonitoringObservabilityOperations +1
More from PostHog
View publisherbuilding-workflows
build and edit PostHog workflows
posthog
Jul 18AutomationMCPPostHogWorkflow Automationcheck-posthog-loading
inspect PostHog SDK loading across URLs
posthog
May 7AnalyticsDebuggingFrontendObservability +1consuming-endpoints-from-client-code
integrate PostHog endpoints into client applications
posthog
Jun 8API DevelopmentFrontendPostHogSDKcopying-endpoints-across-projects
copy PostHog endpoints across projects
posthog
Jul 15API DevelopmentOperationsPostHogcreating-ai-subscription
schedule recurring AI-generated PostHog reports
posthog
Jun 9AutomationEmailPostHogReporting +1creating-an-endpoint
create PostHog API endpoints
posthog
Jun 8AnalyticsAPI DevelopmentPostHog