Repository navigation
[CI] (9da603e) next-js/15-app-router-saas - #4396
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
|
Now I have all the context needed. Let me produce the evaluation. PR Evaluation ReportSummaryThis PR integrates PostHog into a Next.js 15 App Router SaaS application. It adds
Confidence score: 5/5 🧙
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | No syntax errors, valid imports, dependencies added |
| Preserves existing env vars & configs | Yes | Existing env vars preserved, only PostHog additions made |
| No syntax or type errors | Yes | All TypeScript is valid |
| Correct imports/exports | Yes | posthog-js imported correctly in client components, OTel imports are valid |
| Minimal, focused changes | Yes | All changes relate to PostHog integration |
| Pre-existing issues | None | — |
Issues
- OTel log dependencies may have version issues: The
@opentelemetrypackages use^0.223.0and^2.12.0— these are very high version numbers that may not exist yet. This could cause install failures. [LOW]
Other completed criteria
- Environment variables documented in
.env.example .gitignoreupdated to exclude.env- Build configuration is valid
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js added to package.json |
| PostHog client initialized | Yes | Correctly initialized in instrumentation-client.ts using posthog.init() with env vars — the recommended Next.js pattern |
| capture() | Yes | Multiple meaningful posthog.capture() calls across dashboard pages |
| identify() | Yes | posthog.identify() called with user.id.toString() and person properties (email, name, role). posthog.reset() called on sign-out. Uses a stable ID from the database. |
| Error tracking | Yes | capture_exceptions: true in init config, plus global-error.tsx with posthog.captureException() |
| Reverse proxy | No | No Next.js rewrites or middleware proxy configured. PostHog docs recommend setting up a reverse proxy for Next.js apps. |
Issues
- No reverse proxy configured: The
next.config.tshas no rewrites for PostHog. Client-side requests go directly tous.i.posthog.com, making them susceptible to ad blockers. Add Next.js rewrites or use the managed reverse proxy. [MEDIUM] - No
posthog-nodefor server-side capture: The checkout route uses OTel logs instead ofposthog-nodecapture(). These logs won't generate PostHog events for funnels/insights. For a full-stack Next.js app,posthog-nodeshould be used for server-side event capture. [MEDIUM]
Other completed criteria
- API key loaded from
NEXT_PUBLIC_POSTHOG_PROJECT_TOKENenvironment variable - API host loaded from
NEXT_PUBLIC_POSTHOG_HOSTenvironment variable - PostHog initialized before any capture calls via
instrumentation-client.ts posthog.reset()correctly called on logout
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
instrumentation-client.ts |
autocapture, `` | Client SDK initialized with autocapture and exception tracking |
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_management_opened, team_member_removal_submitted, team_invitation_submitted |
Tracks subscription and team management actions |
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 initiation |
app/global-error.tsx |
captureException |
Captures unhandled errors |
app/api/stripe/checkout/route.ts |
OTel logs only | checkout_return_processing_started, checkout_subscription_activated, checkout_return_processing_failed — these are OTel logs, not PostHog events |
Issues
- Server-side "events" are OTel logs, not PostHog captures: The checkout route emits OpenTelemetry log records, not
posthog.capture()events. While these may appear in PostHog's logs feature, they won't be usable in funnels, trends, or retention analysis. A checkout completion funnel (checkout_started → subscription activated) cannot be built with the current setup sincecheckout_startedis a client event andcheckout_subscription_activatedis an OTel log. [MEDIUM]
Other completed criteria
- Events represent real user actions (account updates, team management, checkout, security actions)
- Events enable product insights (can build funnels for checkout, team management, security flows)
- Event names are descriptive and use consistent
snake_caseconvention - No PII in event properties — email/name correctly placed in
identify()person properties - Events are captured in form
onSubmitand buttononClickhandlers, not in useEffect
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:
9da603eApp:
next-js/15-app-router-saasApp directory:
apps/next-js/15-app-router-saasWorkbench branch:
wizard-ci-9da603e-next-js-15-app-router-saasWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-10-06T15:48:58.737Z
Duration: 416.3s
YARA Scanner