Skip to content

perf: load web analytics from the vercel observability path - #3440

Merged
danielroe merged 1 commit into
mainfrom
perf/proxy
Nov 13, 2026
Merged

danielroe merged 1 commit into
mainfrom
perf/proxy

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 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 🤷

@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
npmx.dev Ready Ready Preview Nov 12, 2026 10:43pm UTC
2 Skipped Deployments
Project Deployment Actions Updated
docs.npmx.dev Ignored Ignored Nov 12, 2026 10:43pm UTC
npmx-lunaria Ignored Ignored Nov 12, 2026 10:43pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

Share

Recent review info

Run configuration

Commits

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.

@codecov

codecov Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@danielroe
danielroe enabled auto-merge November 12, 2026 23:59
@danielroe
danielroe added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit f4188b3 Nov 13, 2026
28 checks passed
@danielroe
danielroe deleted the perf/proxy branch November 13, 2026 07:47
@github-actions github-actions Bot mentioned this pull request Nov 13, 2026

This branch was successfully deployed

1 active deployment
Preview – npmx.dev — 8e38f8c4 Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants