Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR introduces a new Analytics app documentation guide and enhances the Payments documentation with expanded sections. It updates the documentation navigation to include Analytics and modifies event tracking initialization to operate in browser environments for any projectId. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR enables client-side analytics event tracking for all projects (previously restricted to the internal project only) and adds/updates documentation for the Analytics and Payments apps.
Changes:
- Removes the
projectId === "internal"guard so all projects get client-side event tracking - Adds a new Analytics documentation page and registers it in the docs navigation
- Expands the Payments documentation with setup guides, concept explanations, and dashboard management details
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/template/src/lib/stack-app/apps/implementations/client-app-impl.ts |
Removes internal-only restriction for event tracking |
docs/content/docs/(guides)/apps/analytics.mdx |
New Analytics app documentation page |
docs/content/docs/(guides)/apps/payments.mdx |
Expanded Payments documentation with setup, concepts, and dashboard sections |
docs/content/docs/(guides)/meta.json |
Adds analytics entry to docs navigation |
docs/content/docs/(guides)/overview.mdx |
Adds analytics to the AppGrid on the overview page |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile SummaryThis PR adds a new analytics documentation page, enriches the payments docs with Quick Setup and Core Concepts sections, and removes the Key changes:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser as Browser (all projects)
participant ET as EventTracker
participant Server as Stack Auth Server
Browser->>ET: start() — attach click/popstate/pagehide listeners,<br/>monkey-patch history.pushState/replaceState
loop Every 10s (_tick)
ET->>Server: getAccessToken()
Server-->>ET: token (or null)
alt User is authenticated AND events buffered
ET->>Server: POST /analytics/events/batch
alt Analytics app enabled
Server-->>ET: 200 OK — events stored
else Analytics app disabled
Server-->>ET: 400 ANALYTICS_NOT_ENABLED
ET-->>Browser: console.warn("EventTracker flush failed")
end
end
end
|
Summary of Changes
Updating docs for analytics and payments to be descriptive. Also enabling analytics client side events for non-internal projects.
Summary by CodeRabbit
Release Notes