integration-django

Official

PostHog analytics integrated for Django apps.

AuthorPostHog
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Django integration enables PostHog analytics within Django apps by configuring server-side tracking, context enrichment, and reliable event capture without modifying existing business logic.

Core Features & Use Cases

  • Automatic context-aware event tracking via PostHogContextMiddleware that attaches session and user context to events.
  • Server-side initialization and configuration of PostHog in AppConfig using environment variables, ensuring consistent access across modules.
  • User identification and property tagging on login/logout, plus event capture for key workflows such as login, dashboard access, and error scenarios.
  • Feature flags, group analytics, and error tracking to drive product decisions and reliability.
  • Lightweight reference and example files to guide integration and troubleshooting.

Quick Start

Configure POSTHOG_PROJECT_TOKEN and POSTHOG_HOST in your settings, add PosthogContextMiddleware to MIDDLEWARE, and verify a sample event captures correctly.

Dependency Matrix

Required Modules

None required

Components

references

💻 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: integration-django
Download link: https://github.com/PostHog/skills/archive/main.zip#integration-django

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.