Aller au contenu
Skillpedia
Tests41k · #6988

verify-posthog-instrumentation

Ce qu’il fait

Cette compétence combine plusieurs contrôles pour confirmer que la configuration PostHog d'un site fonctionne de bout en bout. Elle s'adresse aux propriétaires de sites et aux développeurs qui veulent une réponse claire après une installation ou une modification du suivi.

Quand l’utiliser

  • ✓Quand vous venez d'installer PostHog et voulez confirmer qu'il fonctionne.
  • ✓Quand un déploiement a modifié le code d'analyse et que vous voulez vérifier que les événements arrivent toujours.
  • ✓Quand un client dit ne pas voir les événements dans PostHog.

Lien du skill

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

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/PostHog/posthog/blob/master/tools/traffic-sim/skills/verify-posthog-instrumentation/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Je viens d'ajouter PostHog à mon site web. Peux-tu vérifier qu'il est installé sur chaque page et que les événements arrivent ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent vérifie d'abord que l'extrait PostHog est présent sur chaque page clé, ainsi que ses réglages. Il envoie ensuite des visites simulées de nouveaux visiteurs et de visiteurs de retour pour confirmer la réception des événements, puis produit un résumé de réussite ou d'échec.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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.
Questions fréquentes

Que vérifie le contrôle en premier ?

Si PostHog est chargé sur chaque page, et si la clé de projet et l'hôte sont identiques d'une page à l'autre.

Cela remplace-t-il le tableau de bord PostHog ?

Non. Il confirme que les événements sont envoyés ; vous consultez toujours les résultats dans PostHog.

Pourquoi des événements peuvent-ils manquer ?

Les causes fréquentes sont un extrait manquant, un problème réseau ou un filtre qui masque les événements.

Détails

Description originale de l’auteur

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

Popularité

Étoiles GitHub
41k
Position au classement
#6988
Licence
—
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires