Repository navigation
[CI] (0ae2102) stripe/stripe-next-js-saas-starter - #1241
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 extends an existing PostHog integration in a Next.js SaaS starter app by adding three new event captures:
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | No syntax errors; new component and server-side captures are structurally valid |
| Preserves existing env vars & configs | Yes | No existing configuration modified |
| No syntax or type errors | Yes | All code is syntactically correct TypeScript/TSX |
| Correct imports/exports | Yes | posthog-js import in client component, getPostHogClient used server-side (assumed pre-existing) |
| Minimal, focused changes | Yes | Only adds PostHog event captures — no scope creep |
| Pre-existing issues | None observed | Base app PostHog setup appears correct from report context |
Issues
- No critical app sanity issues
Other completed criteria
- Environment variables are documented (pre-existing setup, no new env vars introduced)
- Build configuration unchanged and valid
- All changes relate to PostHog integration
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | Pre-existing: posthog-js and posthog-node already in dependencies (not modified by this PR) |
| PostHog client initialized | Yes | Pre-existing: instrumentation-client.ts for client, lib/posthog-server.ts for server (not modified) |
| capture() | Yes | Three new capture calls: pricing_page_viewed (client), sign_in_failed and sign_up_failed (server) |
| identify() | N/A | Pre-existing identify implementation not modified by this PR; this PR only adds captures |
| Error tracking | Yes | Pre-existing: capture_exceptions: true in client init (not modified) |
| Reverse proxy | Yes | Pre-existing: next.config.ts rewrites (not modified) |
Issues
- PII (email) in server-side capture properties: The
sign_in_failedandsign_up_failedevents include{ email, reason: '...' }as event properties. Email is PII and should be set viaperson properties, not as capture event properties. Remove `email` from the `properties` object or move it to. [CRITICAL] - Email as distinctId for unknown users: For the
user_not_foundcase insign_in_failedand forsign_up_failed, the raw email string is used asdistinctId. This creates person profiles keyed to email addresses. If the user later registers and gets a database ID, these will be separate persons. Use a hashed or anonymized identifier, or skip the capture for truly unknown users. [MEDIUM] - Direct posthog-js import:
pricing-tracker.tsximportsposthogdirectly fromposthog-jsrather than using theusePostHog()hook from@posthog/react. The React docs recommend always using the hook to ensure the client is initialized. [MEDIUM]
Other completed criteria
- API key loaded from environment variable (pre-existing)
- API host correctly configured (pre-existing)
- Reverse proxy configured via Next.js rewrites (pre-existing)
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
app/(login)/actions.ts |
sign_in_failed, sign_up_failed |
Server-side failure tracking with reason property differentiating failure types; enables sign-in/sign-up failure funnels |
app/(dashboard)/pricing/pricing-tracker.tsx |
pricing_page_viewed |
Client-side pricing page impression with plan metadata (name, price_id, unit_amount, interval); enables subscription conversion funnel |
Issues
- PII in event properties:
emailis included as an event property insign_in_failedandsign_up_failed. This violates the no-PII-in-capture rule. Email should only appear in person properties via ``. [CRITICAL] - Events enriched with good properties: The
pricing_page_viewedevent includes plan details and the failure events includereason— this is good for segmentation, but the email property must be removed. [MEDIUM]
Other completed criteria
- Events represent real user actions (failed sign-in, failed sign-up, pricing page view)
- Events enable product insights (conversion funnel: pricing_page_viewed → checkout_initiated → checkout_completed; failure rate tracking)
- Event names are descriptive and use consistent snake_case naming
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:
0ae2102App:
stripe/stripe-next-js-saas-starterApp directory:
apps/stripe/stripe-next-js-saas-starterWorkbench branch:
wizard-ci-0ae2102-stripe-stripe-next-js-saas-starterWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-04-15T19:38:01.606Z
Duration: 294.1s