Files
vercel__next.js/errors/deprecated-analyticsid.mdx
Jam Balaya e5ce54de0b docs: use relative urls (#72941)
## Description
Follow up #52038.
Remove `https://nextjs.org` from URL in [error
pages](https://github.com/vercel/next.js/tree/canary/errors).

### Improving Documentation

- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2024-11-19 08:58:29 +00:00

21 lines
875 B
Plaintext

---
title: config.analytics is deprecated
---
## Why This Error Occurred
The Core Web Vitals of your Next.js application could be tracked and sent to any backend of your choice.
Earlier version of Next.js enable tracking by specifying `analyticsId` into your `next.config.js` file.
This configuration mechanism will be removed in nextjs@15, as it could be elegantly replaced with `useReportWebVitals` built-in hook.
## Possible Ways to Fix It
To remove this warning, you must remove `analyticsId` from your `next.config.js` file.
To keep tracking your Core Web Vitals, you could:
- use `useReportWebVitals` hook as explained [here](/docs/app/api-reference/functions/use-report-web-vitals) and send the metrics to any backend of your choice.
- [install and use](https://vercel.com/docs/speed-insights/quickstart) `@vercel/speed-insights` package into your application