From 43a8a7bea3d281804dfe2a9e868aab82160a88b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AB=E3=82=B3=E3=83=A1?= Date: Wed, 2 Oct 2024 03:04:37 +0900 Subject: [PATCH] docs: update with-google-analytics example path (#70547) ## Description [with-google-analytics example](https://github.com/vercel/next.js/tree/canary/examples/with-google-analytics) was updated for App Router at #66021. So remove an old pages path. ### 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: JJ Kasper --- .../01-building-your-application/06-optimizing/08-analytics.mdx | 2 +- .../02-api-reference/04-functions/use-report-web-vitals.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/02-app/01-building-your-application/06-optimizing/08-analytics.mdx b/docs/02-app/01-building-your-application/06-optimizing/08-analytics.mdx index a2a72daf8641b..1e003378fd4c1 100644 --- a/docs/02-app/01-building-your-application/06-optimizing/08-analytics.mdx +++ b/docs/02-app/01-building-your-application/06-optimizing/08-analytics.mdx @@ -206,7 +206,7 @@ useReportWebVitals((metric) => { > ```js > useReportWebVitals((metric) => { > // Use `window.gtag` if you initialized Google Analytics as this example: -> // https://github.com/vercel/next.js/blob/canary/examples/with-google-analytics/pages/_app.js +> // https://github.com/vercel/next.js/blob/canary/examples/with-google-analytics > window.gtag('event', metric.name, { > value: Math.round( > metric.name === 'CLS' ? metric.value * 1000 : metric.value diff --git a/docs/02-app/02-api-reference/04-functions/use-report-web-vitals.mdx b/docs/02-app/02-api-reference/04-functions/use-report-web-vitals.mdx index 2ed2d08f2bee6..fc511e7575ac6 100644 --- a/docs/02-app/02-api-reference/04-functions/use-report-web-vitals.mdx +++ b/docs/02-app/02-api-reference/04-functions/use-report-web-vitals.mdx @@ -223,7 +223,7 @@ useReportWebVitals((metric) => { > ```js > useReportWebVitals(metric => { > // Use `window.gtag` if you initialized Google Analytics as this example: -> // https://github.com/vercel/next.js/blob/canary/examples/with-google-analytics/pages/_app.js +> // https://github.com/vercel/next.js/blob/canary/examples/with-google-analytics > window.gtag('event', metric.name, { > value: Math.round(metric.name === 'CLS' ? metric.value * 1000 : metric.value), // values must be integers > event_label: metric.id, // id unique to current page load