simulate-returning-user

作成者: posthog

合成シングルセッション・マルチページトラフィックをURLに送信し、PostHogの$pageviewイベントがページビュー全体で発火することを確認します。クッキーが持続することを検証する際に使用します…

npx skills add https://github.com/posthog/posthog --skill simulate-returning-user

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_id across page views in a session (no fresh anonymous IDs per page).
  • Confirm $pageview fires 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 (default 3) — number of page views in the session.
  • interval (default 5.0) — seconds between page views.
  • posthog_host (default https://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: true and pageviews >= page_views — the session works.
  • Same distinct_id across all pageviews (visible in PostHog UI under the run_id query param) — session stitching works.
  • Different distinct_id per visit — likely a cookie domain or storage-permissions issue. Inspect the raw posthog_requests for $session_id values to diagnose.

posthogのその他のスキル

managing-experiment-lifecycle
posthog
実験の状態遷移をガイドします:起動、一時停止、再開、終了、バリアントの出荷、アーカイブ、リセット、複製。前提条件などをカバーします。
official
configuring-experiment-analytics
posthog
Configures the analytics side of a PostHog experiment — exposure criteria (default `$feature_flag_called` vs custom exposure events), primary and secondary…
official
error-tracking-hono
posthog
PostHogのHono向けエラートラッキング
official
error-tracking-react
posthog
PostHogのReact向けエラートラッキング
official
integration-android
posthog
Androidアプリケーション向けPostHogインテグレーション
official
integration-ruby
posthog
PostHog統合:Ruby SDKを使用するRubyアプリケーション向け
official
tuning-incremental-sync-config
posthog
同期の設定はExternalDataSchemaに保存され、external-data-schemas-partial-updateを使用していつでも変更できます。ほとんどの変更は非破壊的(次の同期で反映)ですが、一部(sync_typeの切り替え、プライマリキーの変更)は、同期データの破損を防ぐために慎重な対応が必要です。
official
instrument-integration
posthog
このスキルを使用して、アプリケーションにPostHog SDKを追加します。PostHogを初めてセットアップする場合や、PostHogの初期化が必要なPRをレビューする場合に使用してください。SDKのインストール、プロバイダーのセットアップ、基本設定をカバーします。任意のフレームワークや言語に対応しています。
official