Langsung ke konten
Skillpedia
Testing41k ยท #6988

verify-posthog-instrumentation

Fungsinya

Skill ini menggabungkan beberapa pemeriksaan untuk memastikan penyiapan PostHog di situs web berfungsi dari awal hingga akhir. Skill ini untuk pemilik situs dan pengembang yang menginginkan jawaban jelas setelah memasang atau mengubah pelacakan.

Kapan dipakai

  • โœ“Saat Anda baru saja memasang PostHog dan ingin memastikan fungsinya.
  • โœ“Saat sebuah deploy mengubah kode analitik dan Anda ingin memastikan event masih masuk.
  • โœ“Saat seorang pelanggan mengatakan mereka tidak melihat event di PostHog.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/PostHog/posthog/blob/master/tools/traffic-sim/skills/verify-posthog-instrumentation/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œSaya baru saja memasang PostHog di situs web saya. Bisakah Anda memeriksa apakah sudah terpasang di setiap halaman dan event-nya masuk?โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent lebih dulu memeriksa setiap halaman utama untuk cuplikan PostHog dan pengaturannya. Setelah itu agent mengirim kunjungan simulasi pengguna baru dan kembali untuk memastikan event diterima, lalu melaporkan ringkasan lulus atau gagal.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.
Pertanyaan umum

Apa yang diperiksa pertama kali?

Apakah PostHog dimuat di setiap halaman, dan apakah kunci serta host proyek cocok di semua halaman.

Apakah ini menggantikan dasbor PostHog?

Tidak. Pemeriksaan ini memastikan event dikirim, dan Anda tetap melihat hasilnya di PostHog.

Mengapa event bisa hilang?

Penyebab umum adalah cuplikan yang hilang, masalah jaringan, atau filter yang menyembunyikan event.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
41k
Peringkat
#6988
Lisensi
โ€”
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa