simulate-returning-user
यह क्या करती है
यह स्किल एक ही ब्राउज़र सेशन में कई पेजों की नकली विज़िट भेजती है और हर पेज पर PostHog इवेंट जाँचती है। यह उन डेवलपर के लिए है जो पक्का करना चाहते हैं कि विज़िटर की गतिविधि सही तरह जुड़ी हो।
कब इस्तेमाल करें
- ✓जब आप पक्का करना चाहें कि कई पेजव्यू में एक ही यूज़र ID बनी रहती है।
- ✓जब आप जाँचना चाहें कि पहले पेज के अलावा हर पेज पर पेजव्यू दर्ज हो रहा है।
- ✓जब लोग बताएँ कि एक विज़िटर की गतिविधि कई यूज़र में बँट गई है।
Skill का लिंक
https://github.com/PostHog/posthog/blob/master/tools/traffic-sim/skills/simulate-returning-user/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“कृपया एक विज़िटर की हमारी साइट पर तीन पेजों पर ब्राउज़िंग सिमुलेट कीजिए और जाँचिए कि PostHog तीनों पेजव्यू एक ही यूज़र से जोड़ता है।”
हर हफ़्ते 5 नई skills, 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_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.
अक्सर पूछे जाने वाले सवाल
यह नए यूज़र वाली जाँच से कैसे अलग है?
यह जाँच पेजों के बीच कुकी रखती है, इसलिए यह देखती है कि विज़िट कैसे जुड़ती हैं, न कि पहली विज़िट का व्यवहार।
क्या यह एक सेशन में कई पेज देख सकती है?
हर कॉल एक पेज पता इस्तेमाल करती है, इसलिए कई पेज के लिए टूल को दिए गए 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
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
depot-ci
41kयह आपके एजेंट को Depot CI वर्कफ़्लो सेट अप करने, चलाने और माइग्रेट करने में मदद करती है, साथ ही रन के लॉग पढ़ने में।
depot-container-builds
41kयह आपके एजेंट को Depot के रिमोट बिल्डर पर Docker इमेज बनाने में मदद करती है, जिसमें मल्टी-प्लेटफ़ॉर्म इमेज और बिल्ड सुधार शामिल हैं।
depot-github-runners
41kयह आपके एजेंट को GitHub Actions जॉब Depot के मैनेज्ड रनर पर ले जाने, रनर का साइज़ और लेबल चुनने, और रनर सेटअप की समस्याएँ ठीक करने में मदद करती है।
editing-agents-md
41kयह आपके एजेंट को तय करने में मदद करती है कि कोई नियम AGENTS.md या CLAUDE.md में जाए या नहीं, और उसे ऐसे लिखे कि फ़ाइल भारी न हो।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।