You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf: load web analytics from the vercel observability path - #3440
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
New Features
Vercel Analytics now uses the script path and separate view, event and session endpoints supplied by the client configuration. Configured paths are normalised to start with a slash.
Changes
The previous built-in Vercel Insights proxy routes have been removed. When configuration is missing or invalid, no custom analytics paths are applied.
The Nuxt module reads Vercel Analytics paths from client configuration and exposes them through an alias. The client plugin uses the configured script source and separate endpoints. The previous proxy route rules are removed.
Changes: Vercel Analytics configuration
Layer / File(s)
Summary
Parse configuration and generate alias modules/vercel-analytics.ts, test/unit/modules/vercel-analytics.spec.ts
The module extracts supported Analytics paths from the client configuration, prefixes them with /, and exposes them through a generated alias. Unit tests cover valid, missing and invalid configuration.
Use configured endpoints in client plugin app/plugins/vercel-analytics.client.ts, nuxt.config.ts
The client plugin uses the configured script source and separate view, event and session endpoints. The previous Vercel Insights proxy route rules are removed.
Suggested reviewers:gameroman
Merge Risk: Minimal · up to 8e38f
This change loads analytics from Vercel's own observability path instead of the proxy routes, and the author says analytics may be less accurate. No merge-blocking issue was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: web analytics now load from the Vercel observability path. The changeset matches this. The plugin reads the Vercel client configuration, the module exposes the analyti…
Description check
The description states the purpose of the change: it uses the official Vercel endpoint to avoid proxying costs, and the author notes analytics may be less accurate as a result. This relates directly t…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: web analytics now load from the Vercel observability path. The changeset matches this. The plugin reads the Vercel client configuration, the module exposes the analytics paths, and the proxy routes in nuxt.config.ts are removed. The title uses the 'perf:' prefix, which fits the stated goal of avoiding proxy costs.
Full details: Description check
Explanation
The description states the purpose of the change: it uses the official Vercel endpoint to avoid proxying costs, and the author notes analytics may be less accurate as a result. This relates directly to the changeset, which removes the proxy routes and points analytics at Vercel paths. The linked issue section still contains the template placeholder and names no issue, but the check is lenient and the context section is on topic.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Reviewing files that changed from the base of the PR and between 030933d and 8e38f8c.
Files selected for processing: 4
app/plugins/vercel-analytics.client.ts
modules/vercel-analytics.ts
nuxt.config.ts
test/unit/modules/vercel-analytics.spec.ts
Files with no reviewable changes: 1
nuxt.config.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
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
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.
🔗 Linked issue
🧭 Context
this uses the official vercel endpoint to avoid costs for proxying these requests.
our analytics might get a bit less accurate as a result 🤷