bootstrap-posthog

Installation
SKILL.md

Bootstrap PostHog Analytics

Add full PostHog analytics to a Phoenix 1.8 app — server-side event tracking, automatic page view plug, LiveView helpers, and client-side JS with user identification.

What Gets Created/Configured

  1. mix.exs — {:posthog, "~> 0.2"} dependency
  2. config/config.exs — PostHog config with enabled: true (uses env vars for API key)
  3. config/runtime.exs — Production PostHog config with System.fetch_env!
  4. lib//analytics/posthog.ex — Server-side PostHog wrapper module
  5. lib//analytics.ex — Analytics context with domain event helpers
  6. lib/_web/plugs/analytics.ex — Automatic page view tracking plug
  7. lib/_web/live/analytics_helpers.ex — LiveView tracking helpers
  8. root.html.heex — Client-side PostHog JS snippet with user identification
  9. assets/js/app.js — phx:track-analytics event listener and TrackView hook
  10. .env.sample — POSTHOG_API_KEY and POSTHOG_API_URL entries

App Name Detection

Installs
3
GitHub Stars
1
First Seen
May 21, 2026