[CI] (8f345fc) next-js/15-pages-router-saas#277
Closed
wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
Closed
[CI] (8f345fc) next-js/15-pages-router-saas#277wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
wizard-ci-bot[bot] wants to merge 1 commit intomainfrom
Conversation
Author
|
TypeScript compilation passes. Now I have all the information I need to write the evaluation report. PR Evaluation ReportSummaryThis PR integrates PostHog analytics into a Next.js 15 Pages Router SaaS application. It adds both client-side (
Confidence score: 4/5 👍
File changes
App sanity check: 4/5 ✅
Issues
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js@^1.335.5 and posthog-node@^5.24.3 in package.json |
| PostHog client initialized | Yes | Client-side via instrumentation-client.ts; server-side via singleton in lib/posthog-server.ts |
| capture() | Yes | 14 distinct events captured across auth, checkout, subscriptions, and team management |
| identify() | Yes | User identification on sign-up, sign-in, and account update via both client and server |
| Error tracking | Yes | capture_exceptions: true in client config; posthog.captureException() in error handlers |
| Reverse proxy | Yes | Properly configured in next.config.ts with rewrites to us.i.posthog.com and us-assets.i.posthog.com |
Issues
- Missing flush in serverless context: Server-side
posthog.capture()calls in API routes may not complete before the function terminates. Addawait posthog.flush()after captures or useawait posthog.shutdownAsync()in response cleanup. [MEDIUM]
Other completed criteria
- API key accessed via environment variable (
NEXT_PUBLIC_POSTHOG_KEY) - Correct API host configuration with reverse proxy
- Client-server distinct ID correlation via
X-PostHog-Distinct-IDheader - Proper
posthog.reset()on logout to unlink anonymous events - Debug mode enabled in development
PostHog insights and events: 5/5 ✅
| Filename | PostHog events | Description |
|---|---|---|
components/login.tsx |
user_logged_in, user_signed_up, captureException |
Client-side auth events with email identification |
components/header.tsx |
user_logged_out, captureException |
Logout tracking with session reset |
pages/pricing.tsx |
pricing_plan_selected, captureException |
Plan selection with price and interval details |
pages/api/auth/sign-up.ts |
user_signed_up |
Server-side signup with team context and invitation tracking |
pages/api/auth/sign-in.ts |
user_signed_in |
Server-side sign-in with user and team identification |
pages/api/auth/sign-out.ts |
user_signed_out |
Server-side logout tracking |
pages/api/stripe/create-checkout.ts |
checkout_started |
Checkout initiation with price and team context |
pages/api/stripe/checkout.ts |
checkout_completed |
Successful checkout with plan and subscription details |
pages/api/stripe/webhook.ts |
subscription_updated, subscription_cancelled |
Subscription lifecycle from Stripe webhooks |
pages/api/stripe/customer-portal.ts |
customer_portal_opened |
Billing portal access tracking |
pages/api/team/invite.ts |
team_member_invited |
Team growth tracking with role context |
pages/api/team/remove-member.ts |
team_member_removed |
Team churn tracking |
pages/api/account/update.ts |
account_updated |
Profile changes with person property updates |
Issues
None critical. Events are well-designed for funnel analysis and product insights.
Other completed criteria
- Events capture real user actions and business-critical flows
- Properties enriched with relevant context (user_id, team_id, plan details)
- Enables key funnels: signup → checkout → subscription
- Tracks full subscription lifecycle including cancellations
- Team collaboration events for growth analysis
- Source property (
api,webhook) distinguishes event origins
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: scheduled
Trigger ID:
8f345fcApp:
next-js/15-pages-router-saasApp directory:
apps/next-js/15-pages-router-saasWorkbench branch:
wizard-ci-8f345fc-next-js-15-pages-router-saasWizard branch:
mainContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-01-28T16:25:07.831Z
Duration: 547.4s