본문으로 건너뛰기
Skillpedia
테스트41k · #6987

simulate-returning-user

하는 일

이 스킬은 한 브라우저 세션에서 여러 페이지를 방문하는 시뮬레이션을 보내고, 각 페이지의 PostHog 이벤트를 확인합니다. 방문자의 활동이 올바르게 이어지는지 확인하려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓여러 페이지뷰에 걸쳐 같은 사용자 ID가 유지되는지 확인하고 싶을 때.
  • ✓첫 페이지뿐 아니라 모든 페이지에서 페이지뷰가 기록되는지 점검하고 싶을 때.
  • ✓한 방문자의 활동이 여러 사용자로 나뉘어 보인다는 보고가 있을 때.

스킬 링크

https://github.com/PostHog/posthog/blob/master/tools/traffic-sim/skills/simulate-returning-user/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/PostHog/posthog/blob/master/tools/traffic-sim/skills/simulate-returning-user/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“방문자가 우리 사이트의 페이지 세 개를 둘러보는 것을 시뮬레이션하고, PostHog가 세 페이지뷰를 모두 한 사용자에게 연결하는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 쿠키와 저장소를 페이지뷰 사이에 유지하는 하나의 브라우저 세션을 실행해, 사람이 둘러보는 것처럼 방문을 만듭니다. 이벤트와 사용자 ID를 보고하고, 각 페이지뷰가 캡처되었는지 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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.
자주 묻는 질문

신규 사용자 테스트와 무엇이 다른가요?

이 테스트는 페이지뷰 사이에 쿠키를 유지하므로, 첫 방문 동작보다 방문이 어떻게 연결되는지를 확인합니다.

한 세션에서 여러 페이지를 방문할 수 있나요?

각 호출은 하나의 페이지 주소를 사용하므로, 여러 페이지를 방문하려면 도구에 전달하는 URL 목록을 바꿔야 합니다.

검증됨은 여기서 무슨 뜻인가요?

요청한 페이지뷰 수 이상의 페이지뷰를 PostHog가 캡처했다는 뜻입니다.

상세 정보

작성자의 원본 설명

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.

repo: PostHog/posthog

인기도

GitHub 스타
41k
순위
#6987
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬