vercel / speed-insights

Vercel Speed Insights package
https://vercel.com/docs/speed-insights
Apache License 2.0
62 stars 9 forks source link

fix: utm parameters takes precedence over route params #82

Closed feugy closed 2 weeks ago

feugy commented 2 weeks ago

πŸ““ What's in there?

We've been reported that compute route could be using some search parameter names instead of path parameter names. This PR fixes it.

πŸ§ͺ How to test?

It has been tested locally with various version of Next.js, both pages and app router, and a special version of the debug script (soon released) which prints collected metrics to console.

In the following snapshots, the page has a single [slug] parameter, and a utm_content search parameter.

Version Pages App
next@13.5.7 image image
next@14 image image
next@15 image image

❗ Notes to reviewers

Please note that I've updated our example next.js app to latest router, which includes a change how the Page component can access its path params. The Node.js version is required by Next@15. Finally, @jest/globals is needed because of biome (which we should consider migrating to, as well as vitest).

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
speed-insights-astro βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Nov 6, 2024 0:07am
speed-insights-nextjs βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Nov 6, 2024 0:07am
speed-insights-nuxt βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Nov 6, 2024 0:07am
speed-insights-remix βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Nov 6, 2024 0:07am
speed-insights-sveltekit βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Nov 6, 2024 0:07am
speed-insights-vue βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Nov 6, 2024 0:07am
socket-security[bot] commented 2 weeks ago

New and removed dependencies detected. Learn more about Socket for GitHub β†—οΈŽ

Package New capabilities Transitives Size Publisher
npm/next@15.0.1 environment, filesystem, network, shell, unsafe +70 118 MB vercel-release-bot
npm/react-dom@19.0.0-rc-69d4b800-20241021 environment +1 6.45 MB fb, gnoff, react-bot, ...2 more
npm/react@19.0.0-rc-69d4b800-20241021 environment 0 239 kB react-bot

View full reportβ†—οΈŽ