Repository navigation
[CI] (ba86941) stripe/stripe-next-js-saas-starter - #5152
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 adds PostHog revenue analytics metadata to an existing Next.js + Stripe SaaS starter app. The changes are minimal and focused:
Confidence score: 5/5 🧙
File changes
App sanity check ✅
Issues
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js (^1.369.0) and posthog-node (^5.29.2) already present in package.json. |
| PostHog client initialized | Yes | Pre-existing instrumentation-client.ts initializes posthog-js; lib/posthog-server.ts initializes posthog-node. |
| capture() | Yes | Pre-existing integration has autocapture enabled via posthog-js init. No new capture calls needed for revenue metadata tagging. |
| identify() | Yes | The user.id.toString() used for posthog_person_distinct_id is consistent with the client_reference_id already used in the checkout flow. |
| Error tracking | Yes | Pre-existing capture_exceptions: true in the posthog-js init config. |
| Reverse proxy | Yes | Pre-existing Next.js proxy configured at /ingest in the app. |
Issues
- Stripe Customer object not tagged: The
posthog_person_distinct_idmetadata is added to the Checkout Session and Subscription, but not to the Stripe Customer object. If PostHog's Stripe source syncs Customers, those records won't be linked to PostHog persons unless they're matched through subscription metadata. Consider addingstripe.customers.update(customerId, { metadata: { posthog_person_distinct_id: user.id.toString() } })where the customer is created or linked. [MEDIUM]
Other completed criteria
- API key loaded from
NEXT_PUBLIC_POSTHOG_PROJECT_TOKENenvironment variable, not hardcoded - Host correctly set to
https://us.i.posthog.com - Screen views: N/A (web framework, posthog-js autocaptures pageviews)
- All targets initialized: N/A (single-target project)
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
lib/payments/stripe.ts |
posthog_person_distinct_id metadata |
Stripe Checkout Session and Subscription tagged with PostHog person distinct ID, enabling PostHog revenue analytics to attribute Stripe revenue to specific PostHog persons. |
Issues
None.
Other completed criteria
- Metadata represents real user actions (checkout and subscription creation tied to authenticated users)
- Enables revenue analytics insights (links Stripe revenue data to PostHog person profiles for Top Customers, revenue trends)
- Metadata includes the authenticated user ID as the distinct identifier — no PII, no fabricated values
posthog_person_distinct_idfollows a clear, descriptive naming convention consistent with PostHog's expected metadata key
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: manual
Trigger ID:
ba86941App:
stripe/stripe-next-js-saas-starterApp directory:
apps/stripe/stripe-next-js-saas-starterWorkbench branch:
wizard-ci-ba86941-stripe-stripe-next-js-saas-starterWizard branch:
mainContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-11-12T05:22:15.900Z
Duration: 192.8s
YARA Scanner