Repository navigation
[CI] (b6c5097) next-js/15-app-router-saas - #4073
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. It adds client-side initialization via
Confidence score: 5/5 🧙
File changes
App sanity check ✅
IssuesNo issues.
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js@^1.434.5 added to package.json |
| PostHog client initialized | Yes | instrumentation-client.ts with posthog.init(), env var validation, and capture_exceptions: true |
| capture() | Yes | 10 custom event captures across login, dashboard, team, checkout, and terminal flows |
| identify() | Yes | posthog.identify(user.id.toString(), { email, name, role }) with useRef guard and reset() on sign-out/user-switch |
| Error tracking | Yes | global-error.tsx with posthog.captureException(error) + capture_exceptions: true in init config |
| Reverse proxy | No | No rewrites in next.config.ts, no middleware proxy configured |
Issues
- No reverse proxy configured: The
next.config.tshas no rewrites to proxy PostHog requests through a first-party domain. For a production SaaS app, this means ad blockers will silently drop events. Add Next.js rewrites or use PostHog's managed reverse proxy. [MEDIUM] - Older
defaultsdate:instrumentation-client.tsusesdefaults: '2026-01-30'instead of the current'2026-05-30'. This is functional but misses newer default configuration improvements. [LOW]
Other completed criteria
- API key loaded from
NEXT_PUBLIC_POSTHOG_KEYenvironment variable (not hardcoded) - Host loaded from
NEXT_PUBLIC_POSTHOG_HOSTenvironment variable - Identify uses stable database ID (
user.id.toString()), not email as distinct_id - PII (email, name) correctly placed in person properties via
identify(), not incapture()properties posthog.reset()called on logout and on user switch — excellent handling
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
login.tsx |
sign_in_submitted, sign_up_submitted |
Tracks authentication funnel entry points |
dashboard/page.tsx |
subscription_management_opened, team_member_removal_submitted, team_member_invitation_submitted |
Tracks subscription and team management actions |
dashboard/general/page.tsx |
account_update_submitted |
Tracks account profile updates |
dashboard/security/page.tsx |
password_update_submitted, account_deletion_submitted |
Tracks security-sensitive actions |
pricing/submit-button.tsx |
checkout_started |
Tracks checkout funnel entry |
terminal.tsx |
setup_commands_copied |
Tracks onboarding engagement |
global-error.tsx |
captureException |
Captures unhandled React errors |
layout.tsx |
identify, reset |
User identification and session management |
Issues
- All capture() calls lack event properties: None of the 10 custom events include contextual properties. For example,
checkout_startedshould includeplan_nameorprice_id;team_member_invitation_submittedshould includeteam_id;account_deletion_submittedcould includeaccount_age_days. Without properties, funnels and breakdowns lose significant analytical value. [MEDIUM]
Other completed criteria
- Events represent real user actions across the SaaS product lifecycle (auth → onboarding → team management → billing)
- Events enable product insights: can build sign-up → checkout funnel, team engagement trends, retention analysis
- Event names are descriptive, consistently snake_case, and action-oriented
- No PII in capture() 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:
b6c5097App:
next-js/15-app-router-saasApp directory:
apps/next-js/15-app-router-saasWorkbench branch:
wizard-ci-b6c5097-next-js-15-app-router-saasWizard branch:
posthog/functional-a1-minContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-09-22T01:21:45.199Z
Duration: 352.8s
YARA Scanner