integration-react-react-router-6

Official

Add PostHog analytics to React Router v6 apps.

AuthorPostHog
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This integration enables PostHog analytics to be easily added to React Router v6 applications, allowing you to track user navigation, events, errors, and feature flag interactions across routes.

Core Features & Use Cases

  • Seamless PostHog integration in React Router v6 apps, enabling event capture on navigation, login, and errors.
  • Centralized configuration via environment variables, with a provider wrapping the app for consistent analytics.
  • Use cases include understanding route-level funnel progress, identifying drop-offs after login, and tracing errors across routes.

Quick Start

Install posthog-js and @posthog/react, configure VITE_PUBLIC_POSTHOG_* environment variables, and wrap your app with PostHogProvider to begin capturing events.

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

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.