[CI] (7f79337) next-js/15-app-router-saas#333
Closed
wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
Closed
[CI] (7f79337) next-js/15-app-router-saas#333wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
Conversation
Author
|
Now I have all the information I need to complete my evaluation. Let me write the PR evaluation report: PR Evaluation ReportSummaryThis PR integrates PostHog analytics into a Next.js 15 App Router SaaS application. It adds both client-side (
Confidence score: 3/5 🤔
File changes
App sanity check: 4/5 ✅
Issues
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js@^1.347.0 and posthog-node@^5.24.15 in package.json |
| PostHog client initialized | Yes | Client via instrumentation-client.ts (Next.js 15.3+ pattern), server via singleton in lib/posthog-server.ts |
| capture() | Yes | 11 events captured across client and server |
| identify() | Yes | posthog.identify(email, { email }) called on login/signup |
| Error tracking | Yes | capture_exceptions: true in client config |
| Reverse proxy | Yes | Rewrites configured in next.config.ts for /ingest/* paths |
Issues
- Events captured before action completion: In
login.tsx,security/page.tsx, andgeneral/page.tsx, events are captured beforeformAction(formData)is called. If the action fails, the event still fires, leading to inaccurate analytics (e.g., tracking "user_signed_in" for failed login attempts). [CRITICAL] - Server PostHog host configuration:
posthog-server.tsusesNEXT_PUBLIC_POSTHOG_HOSTwhich points tohttps://us.i.posthog.com. Server-side requests should go directly to PostHog, which they do, but the variable naming is confusing. Consider using a separatePOSTHOG_HOSTvariable. [LOW] - No await for posthog.capture on server: Server-side capture calls are not awaited, and
posthog.shutdown()is never called in API routes, which could lead to lost events in serverless environments. [MEDIUM]
Other completed criteria
- API key via environment variable (not hardcoded)
- Correct API host configuration using reverse proxy
posthog.reset()called on sign-out and account deletion- Debug mode enabled in development
- UI host correctly configured for feature flags
PostHog insights and events: 4/5 ✅
| Filename | PostHog events | Description |
|---|---|---|
login.tsx |
user_signed_in, user_signed_up |
Core authentication funnel events with user identification |
layout.tsx |
user_signed_out |
Session end tracking with identity reset |
general/page.tsx |
account_updated |
Profile update tracking |
security/page.tsx |
password_updated, account_deleted |
Security-related actions |
dashboard/page.tsx |
team_member_invited, team_member_removed |
Team collaboration events with role context |
submit-button.tsx |
checkout_started |
Subscription funnel entry point |
stripe/checkout/route.ts |
checkout_completed |
Server-side purchase confirmation with rich properties |
stripe/webhook/route.ts |
subscription_updated, subscription_cancelled |
Subscription lifecycle events |
Issues
- PII in event properties: Several events include email addresses (
email,invited_email) as properties. Consider using hashed identifiers or removing email from properties while keeping it only inidentify(). [MEDIUM] - Missing failure events: No events capture failed actions (failed logins, failed invites, etc.), limiting friction analysis. [LOW]
Other completed criteria
- Events represent real user actions and product flows
- Subscription funnel fully tracked:
checkout_started→checkout_completed→subscription_updated→subscription_cancelled - Team collaboration events enable growth analysis
- Events enriched with relevant properties (plan_name, subscription_id, role, etc.)
- Server-side events ensure billing data is captured reliably
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: context-mill-pr
Trigger ID:
7f79337App:
next-js/15-app-router-saasApp directory:
apps/next-js/15-app-router-saasWorkbench branch:
wizard-ci-7f79337-next-js-15-app-router-saasWizard branch:
mainContext Mill branch:
clarify-next-providerPostHog (MCP) branch:
masterTimestamp: 2026-02-12T21:06:15.169Z
Duration: 758.7s