check-posthog-loading

Inspeccionar cómo se carga el SDK de JavaScript de PostHog en una lista de URLs. Úselo para confirmar una instalación consistente en todas las páginas, encontrar páginas que falten el fragmento,…

npx skills add https://github.com/posthog/posthog --skill check-posthog-loading

Check PostHog loading

For each URL, navigates a real browser to the page, waits for PostHog to initialize, and reports:

  • Whether window.posthog is defined and __loaded.
  • Which load method was used: head_snippet, snippet, array_js_only, or none.
  • 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_host or api_key than 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 (default https://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 loaded list, full not_loaded list — 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_key values across pages — a page is pointing at the wrong PostHog project.
  • Multiple distinct api_host values — 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_only with no init config — array.js was loaded but posthog.init() was never called. Common with manual installs that miss the second half.

Más skills de posthog

error-tracking-hono
posthog
Seguimiento de errores de PostHog para Hono
tuning-incremental-sync-config
posthog
La configuración de una sincronización reside en ExternalDataSchema y puede modificarse en cualquier momento mediante external-data-schemas-partial-update. La mayoría de los cambios no son destructivos (entran en vigor en la siguiente sincronización), pero algunos (cambiar sync_type, modificar claves primarias) requieren un manejo cuidadoso para evitar corromper los datos sincronizados.
playwright-test
posthog
Escribe una prueba de Playwright, asegúrate de que se ejecute y no sea inestable.
error-tracking-ruby
posthog
Seguimiento de errores de PostHog para Ruby
authoring-log-alerts
posthog
Crea alertas de logs útiles y de bajo ruido en los servicios de un proyecto de PostHog. Úsalo cuando el usuario pida configurar alertas para sus logs, sugerir alertas que debería añadir,…
making-scenes-tab-aware
posthog
Guides converting PostHog frontend scenes to be tab aware for internal scene tabs. Use when adding or refactoring a `SceneExport` scene, fixing state leaking…
posthog-survey-creator
posthog
Crear y configurar encuestas en PostHog mediante una conversación guiada. Usa esta habilidad cuando un usuario quiera crear una encuesta, recopilar comentarios de usuarios, ejecutar…
authoring-scouts
posthog
Cómo redactar, editar y adaptar los scouts de PostHog Signals — los agentes programados que escanean un proyecto y escriben informes en la bandeja de entrada de Signals. Úselo cuando un usuario…