integration-nextjs-app-router

Integrate PostHog analytics into Next.js App Router applications.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/Cachaza/carfindr --skill integration-nextjs-app-router-cachaza
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: integration-nextjs-app-router
Source: https://github.com/Cachaza/carfindr/tree/main/carfindr/.claude/skills/posthog-integration-nextjs-app-router
Command: npx skills add https://github.com/Cachaza/carfindr --skill integration-nextjs-app-router-cachaza

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the integration of PostHog analytics into Next.js applications, enabling comprehensive tracking of user behavior and application performance.

Core Features & Use Cases

  • Event Tracking: Capture user interactions and custom events within your Next.js app.
  • User Identification: Link events to specific users for personalized analytics.
  • Error Tracking: Monitor and report application errors to PostHog for debugging.
  • Use Case: Integrate PostHog into your Next.js e-commerce site to track product views, add-to-cart actions, and checkout completions, providing insights into user journeys and conversion funnels.

Quick Start

Follow the steps outlined in basic-integration-1.0-begin.md to begin the PostHog setup process.

Frequently Asked Questions about integration-nextjs-app-router

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add PostHog analytics to a Next.js App Router project?

To add PostHog analytics to a Next.js App Router project, you configure environment variables for your PostHog keys and follow framework-specific guidelines to enable client-side and server-side event tracking.

Can I track user behavior and capture errors with PostHog in Next.js?

Yes, PostHog integration in Next.js allows you to track user behavior, identify specific users for personalized analytics, and monitor application errors to support debugging and user journey insights.

Does PostHog support both client-side and server-side event tracking in Next.js?

Yes, PostHog supports both client-side and server-side event tracking in Next.js applications, requiring environment variable configuration for PostHog keys to facilitate comprehensive data collection.

What environment variables do I need to configure for PostHog in Next.js?

You need to configure environment variables for your PostHog keys to successfully integrate PostHog analytics into your Next.js application and enable event tracking and user identification.

What is the best way to track e-commerce user journeys in a Next.js application?

Integrating PostHog analytics into your Next.js application is an effective way to track e-commerce user journeys, capturing product views, add-to-cart actions, and checkout completions for conversion funnel insights.