Repository navigation
[CI] (22322bc) next-js/15-app-router-saas - #3644
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
wizard-ci-bot[bot] wants to merge 1 commit into
Conversation
Author
PR Evaluation ReportSummaryThis PR integrates PostHog into a Next.js 15 App Router SaaS application using
Confidence score: 5/5 🧙
File changes
App sanity check ✅
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js: ^1.422.5 added to package.json |
| PostHog client initialized | Yes | instrumentation-client.ts calls posthog.init() with token and host from env — correct Next.js pattern |
| capture() | Yes | 7 custom events across dashboard, security, pricing pages |
| identify() | Yes | posthog.identify(user.id.toString(), { email, name, role }) using stable DB ID; posthog.reset() on sign-out |
| Error tracking | Yes | capture_exceptions: true in init config + global-error.tsx with posthog.captureException(error) |
| Reverse proxy | No | No reverse proxy or Next.js rewrites configured |
Issues
- No reverse proxy: No Next.js rewrites or middleware proxy configured. PostHog requests go directly to the PostHog host, making them susceptible to ad blockers. Configure a reverse proxy via Next.js rewrites or the managed reverse proxy. [MEDIUM]
Other completed criteria
- API key correctly loaded from
NEXT_PUBLIC_POSTHOG_PROJECT_TOKENenvironment variable - Host correctly loaded from
NEXT_PUBLIC_POSTHOG_HOSTenvironment variable identify()usesuser.id.toString()— a stable database ID, not email- Person properties (email, name, role) correctly passed as the second argument to
identify() posthog.reset()called before sign-out navigationdefaults: '2026-01-30'is a valid defaults snapshot (though'2026-05-30'is the latest)
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
instrumentation-client.ts |
Autocapture (pageviews, clicks) | SDK initialization enables autocapture by default |
app/(dashboard)/layout.tsx |
identify, reset |
User identification on load, reset on sign-out |
app/(dashboard)/dashboard/general/page.tsx |
account_update_submitted |
Tracks account info form submissions |
app/(dashboard)/dashboard/page.tsx |
subscription_portal_opened, team_member_removed, team_member_invited |
Tracks subscription management and team operations |
app/(dashboard)/dashboard/security/page.tsx |
password_update_submitted, account_deletion_submitted |
Tracks security-related actions |
app/(dashboard)/pricing/submit-button.tsx |
checkout_started |
Tracks checkout flow initiation |
app/global-error.tsx |
captureException |
Captures unhandled React errors via global error boundary |
Issues
- No event properties on any capture call: All 7 custom events are bare
posthog.capture('event_name')with no properties. Adding contextual properties (e.g.,team_member_invitedwith{ role },checkout_startedwith{ plan_name },team_member_removedwith{ member_role }) would enable richer breakdowns and funnel analysis. [MEDIUM]
Other completed criteria
- Events represent real user actions in the SaaS workflow (account management, team management, billing, security)
- Events enable product insights: checkout → subscription portal → team management forms a usable funnel
- Event names use consistent
snake_caseconvention with descriptive action verbs - No PII in event properties (email, name only in
identify()person properties)
Reviewed by wizard workbench PR evaluator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated wizard CI run
Source: wizard-pr
Trigger ID:
22322bcApp:
next-js/15-app-router-saasApp directory:
apps/next-js/15-app-router-saasWorkbench branch:
wizard-ci-22322bc-next-js-15-app-router-saasWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-08-28T19:21:00.889Z
Duration: 353.9s
YARA Scanner