Skillpedia
الاختبار41k · #6988

verify-posthog-instrumentation

ما الذي تفعله

تجمع هذه المهارة عدة فحوص للتأكد من أن إعداد PostHog في موقع يعمل من البداية إلى النهاية. وهي موجهة إلى أصحاب المواقع والمطورين الذين يريدون جواباً واضحاً بعد تثبيت التتبع أو تغييره.

متى تستخدمها

  • ✓عندما تكون قد ثبّت PostHog للتو وتريد التأكد من أنه يعمل.
  • ✓عندما يغيّر نشر جديد كود التحليلات وتريد التحقق من أن الأحداث ما زالت تصل.
  • ✓عندما يقول عميل إنه لا يرى الأحداث في PostHog.

رابط المهارة

https://github.com/PostHog/posthog/blob/master/tools/traffic-sim/skills/verify-posthog-instrumentation/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/PostHog/posthog/blob/master/tools/traffic-sim/skills/verify-posthog-instrumentation/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أضفت PostHog إلى موقعي للتو. هل يمكنك التحقق من أنه مثبت في كل صفحة وأن الأحداث تصل؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يفحص الوكيل أولاً كل صفحة أساسية بحثاً عن كود PostHog وإعداداته. ثم يرسل زيارات محاكاة جديدة وعائدة للتأكد من استلام الأحداث، ويعرض ملخصاً بالنجاح أو الفشل.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Verify PostHog instrumentation

End-to-end check that the PostHog SDK is loaded and emitting events as expected. This skill orchestrates the three traffic-sim tools to give a complete picture of a site's instrumentation health.

When to use

  • After running npx @posthog/wizard to confirm the install actually works.
  • After a deploy that touches analytics, tracking, or layout code.
  • When a customer reports "I'm not seeing events in PostHog" — to disambiguate between snippet issues, network issues, or filtering issues.
  • As a smoke test before launching a new site or marketing page.

Workflow

Step 1 — Confirm the snippet is loaded everywhere

Run the check_posthog_loading MCP tool against the URLs you care about (homepage, key product pages, login, checkout, marketing pages). It returns which pages have PostHog initialized, the load method (head_snippet / snippet / array_js_only), and the init config.

Look for:

  • Pages where loaded: false — PostHog is missing from those pages.
  • Inconsistent api_key values across pages — multiple projects in use.
  • Inconsistent api_host values across pages — events going to different ingestion endpoints.

Step 2 — Send synthetic traffic and confirm events arrive

Pick one URL where Step 1 confirmed PostHog is loaded. Call:

  • simulate_new_user — a few fresh-browser visits. Confirms $pageview fires for first-time visitors and that an anonymous distinct_id is assigned.
  • simulate_returning_user — a few page views in a single session. Confirms cookies persist and $pageview keeps firing across navigations.

The tools return verified: true when at least one $pageview was captured and there were no errors.

Step 3 — Cross-check in PostHog

If Steps 1 and 2 pass but events don't show up in the PostHog UI, the issue is downstream of the snippet:

  • Check for ingestion lag (events can take ~30s to appear).
  • Check that the api_host matches the project's ingestion host.
  • Check feature flag and ingestion warnings in the PostHog UI.

What "verified" means in this skill

A site is verified when:

  1. check_posthog_loading reports loaded: true on every URL we expect.
  2. simulate_new_user and simulate_returning_user both return at least one $pageview event per visit, with no errors.
  3. (Optional) The events appear in the PostHog UI within 1-2 minutes.

What this skill does not check

  • Whether your custom events (e.g. signup_completed) are being sent — the tool watches for any PostHog event, but you'd need to drive the actual user flow to see custom events fire. Use it as a starting point, then add user-flow simulation on top.
  • Server-side ingestion. The tool only sees what the browser SDK sends.
  • Session recording quality. The tool reports whether recording is enabled in the init config but doesn't validate the recording itself.
الأسئلة الشائعة

ماذا يفحص الفحص أولاً؟

هل PostHog محمّل في كل صفحة، وهل مفتاح المشروع والمضيف متطابقان عبر الصفحات.

هل يحل هذا محل لوحة PostHog؟

لا. يتحقق من أن الأحداث تُرسل، وما زلت تعرض النتائج في PostHog.

لماذا قد تختفي الأحداث؟

الأسباب الشائعة هي غياب كود التتبع، أو مشكلة في الشبكة، أو فلتر يخفي الأحداث.

التفاصيل

الوصف الأصلي من المؤلف

Use this skill to verify that PostHog instrumentation is firing correctly on a website. Drives a real browser at one or more URLs, observes which PostHog events actually arrive, and reports a pass/fail summary. Use after installing the PostHog SDK on a site, after a deploy that touches tracking code, or when events appear missing in the PostHog dashboard.

repo: PostHog/posthog

الشعبية

نجوم GitHub
41k
الترتيب
#6988
الترخيص
—
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة