integration-react-vite

Official

Add PostHog analytics to React + Vite apps.

AuthorPostHog
Version1.0.0
Installs0

System Documentation

What problem does it solve?

The integration enables PostHog analytics in React applications built with Vite, including setups without a router, so teams can track user interactions and performance across modern front-end stacks.

Core Features & Use Cases

  • Easy frontend integration: Initialize PostHog at the app root with the PostHogProvider and configure with environment variables.
  • Identify and capture: Link events to users via identify and capture calls, supporting anonymous and identified analytics.
  • Guided workflow: Follows a minimal-change pattern, compliant with the example project structure, and uses references for API details.

Quick Start

Install posthog-js and @posthog/react, configure environment variables, and initialize PostHog at the app root using the PostHogProvider.

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

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.