check-posthog-loading
यह क्या करती है
यह स्किल वेब पेजों की सूची जाँचती है कि हर पेज पर PostHog की JavaScript लाइब्रेरी सही तरह इंस्टॉल और सेट है या नहीं। यह उन साइट मालिकों के लिए है जो पक्का करना चाहते हैं कि ट्रैकिंग हर जगह काम कर रही है।
कब इस्तेमाल करें
- ✓जब आपने अभी PostHog इंस्टॉल किया हो और चाहते हैं कि वह हर पेज पर काम करे।
- ✓जब किसी पेज टेम्पलेट में बदलाव हुआ हो और आपको शक हो कि एक पेज से ट्रैकिंग स्निपेट हट गया है।
- ✓जब कुछ पेज किसी दूसरे PostHog प्रोजेक्ट या होस्ट पर डेटा भेजें।
Skill का लिंक
https://github.com/PostHog/posthog/blob/master/tools/traffic-sim/skills/check-posthog-loading/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“कृपया मेरे मुख्य पेज जाँचिए कि PostHog सही इंस्टॉल है और एक ही प्रोजेक्ट पर डेटा भेज रहा है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट हर पेज को असली ब्राउज़र में खोलता है, PostHog के शुरू होने तक इंतज़ार करता है, और रिपोर्ट करता है कि वह लोड हुआ या नहीं, उसे कैसे जोड़ा गया, और कौन-सी सेटिंग इस्तेमाल हो रही है। फिर वह बताता है कि कौन-से पेज ठीक हैं और कौन-से नहीं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Check PostHog loading
For each URL, navigates a real browser to the page, waits for PostHog to initialize, and reports:
- Whether
window.posthogis defined and__loaded. - Which load method was used:
head_snippet,snippet,array_js_only, ornone. - Where in the document the snippet lives (
head/body). - The init config:
api_key,api_host,person_profiles. - Runtime state including the assigned
distinct_id.
When to use
- Sanity-check a fresh install — does the snippet actually load on every page?
- After a page-template change — did one page lose the snippet?
- When investigating split data — are some pages pointing at a different
api_hostorapi_keythan others? - Onboarding a new customer — confirm SDK is wired up before debugging events.
How to invoke
Call the check_posthog_loading MCP tool with:
urls(required) — list of URLs to inspect.posthog_host(defaulthttps://us.i.posthog.com).
Returns a structured summary with which URLs loaded successfully, which didn't, and the load-method distribution.
Interpreting the result
Look for these red flags:
- Empty
loadedlist, fullnot_loadedlist — snippet not present anywhere. Re-run install or check that the layout includes the snippet. - Mixed
loaded/not_loaded— snippet missing from some pages. Common cause: a page rendered by a different template or layout. - Multiple distinct
api_keyvalues across pages — a page is pointing at the wrong PostHog project. - Multiple distinct
api_hostvalues — a page is pointing at the wrong ingestion endpoint (e.g. EU cloud vs US cloud, or vs a self-hosted reverse proxy). This causes events to land in different projects than expected. load_method: array_js_onlywith no init config —array.jswas loaded butposthog.init()was never called. Common with manual installs that miss the second half.
अक्सर पूछे जाने वाले सवाल
हर पेज के लिए रिपोर्ट में क्या दिखता है?
PostHog लोड हुआ या नहीं, उसे कैसे जोड़ा गया, प्रोजेक्ट की और होस्ट, और उसे दिया गया यूज़र ID।
अगर कोई पेज लोड न हो तो इसका क्या मतलब है?
शायद साइट से ट्रैकिंग स्निपेट गायब है। फिर अगला कदम है उसे दोबारा इंस्टॉल करना या पेज लेआउट जाँचना।
यह कौन-सी सेटिंग मिलाती है?
प्रोजेक्ट की और होस्ट, ताकि आप उन पेजों को पहचान सकें जो डेटा कहीं और भेजते हैं।
जानकारी
लेखक का मूल विवरण
Inspect how the PostHog JavaScript SDK is loaded across a list of URLs. Use to confirm consistent installation across pages, find pages missing the snippet, detect mismatched API keys or hosts between pages, and verify the load method (head snippet vs deferred vs array.js).
repo: PostHog/posthog
लोकप्रियता
- GitHub स्टार
- 41k
- रैंकिंग में स्थान
- #6985
- लाइसेंस
- —
- अपडेट की गई
- 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 पास कर सकें।