一键导入
integration-nextjs-app-router
PostHog integration for Next.js App Router applications
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
PostHog integration for Next.js App Router applications
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | integration-nextjs-app-router |
| description | PostHog integration for Next.js App Router applications |
| metadata | {"author":"PostHog","version":"1.23.9"} |
This skill helps you add PostHog analytics to Next.js App Router applications.
Follow these steps in order to complete the integration:
references/1-begin.md - PostHog Setup - Begin ← Start herereferences/2-edit.md - PostHog Setup - Editreferences/3-revise.md - PostHog Setup - Revisereferences/4-conclude.md - PostHog Setup - Conclusionreferences/EXAMPLE.md - Next.js App Router example project codereferences/1-begin.md - Start the event tracking setup process by analyzing the project and creating an event tracking planreferences/2-edit.md - Implement PostHog event tracking in the identified files, following best practices and the example projectreferences/3-revise.md - Review and fix any errors in the PostHog integration implementationreferences/4-conclude.md - Review and fix any errors in the PostHog integration implementationreferences/next-js.md - Next.js - docsreferences/identify-users.md - Identify users - docsThe example project shows the target implementation pattern. Consult the documentation for API details.
Identify users during login and signup events. Refer to the example code and documentation for the correct identify pattern for this framework. If both frontend and backend code exist, pass the client-side session and distinct ID using X-POSTHOG-DISTINCT-ID and X-POSTHOG-SESSION-ID headers to maintain correlation.
Add PostHog error tracking to relevant files, particularly around critical user flows and API boundaries.