error-tracking-nextjs

Official

Seamless PostHog error tracking for Next.js apps

AuthorPostHog
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Integrates PostHog error tracking into Next.js applications to provide visibility into runtime errors, performance issues, and user-impacting failures without heavy refactoring of existing error handling.

Core Features & Use Cases

  • Automatic error autocapture: Enables automatic capture of unhandled exceptions in Next.js apps.
  • Cross-router support: Works with both App Router and Pages Router implementations.
  • Server and client monitoring: Provides guidance and instrumentation for frontend and backend error tracking, including source maps and external integrations.
  • Config-driven security: Encourages environment-variable configuration and minimal code changes to existing error handling.

Quick Start

Install and initialize the PostHog client in your Next.js project following the App Router or Pages Router instructions, then verify errors appear in PostHog.

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: error-tracking-nextjs
Download link: https://github.com/PostHog/skills/archive/main.zip#error-tracking-nextjs

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.