bootstrap-posthog

Official

Add PostHog analytics to your Phoenix app

Authoragoodway
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Instrumenting a Phoenix app for PostHog analytics is error-prone and time-consuming, especially when you need both server-side tracking and client-side page view handling.

Core Features & Use Cases

  • Server-side event tracking: Adds a PostHog wrapper module with event capture, user identification, and page view tracking helpers.
  • Automatic page view tracking: Inserts an analytics plug into the browser pipeline to track GET requests and ignores common non-page routes like assets and admin paths.
  • LiveView analytics support: Provides LiveView helper functions to track events from server code and push client-side tracking events.
  • Client-side PostHog integration: Updates the root layout with the PostHog JS snippet, including user identification logic, and hooks LiveView events to PostHog captures.
  • Environment configuration: Adds base and production configuration, plus .env.sample entries for POSTHOG_API_KEY and POSTHOG_API_URL.

Quick Start

Tell the assistant: "Bootstrap PostHog analytics for my Phoenix 1.8 app and configure event tracking for page views and user identification."

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: bootstrap-posthog
Download link: https://github.com/agoodway/GoodSkills/archive/main.zip#bootstrap-posthog

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.