From ac80cb692e741263f2ced0bad3cd59f936e623c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AB=E3=82=B3=E3=83=A1?= Date: Fri, 27 Sep 2024 13:34:13 +0900 Subject: [PATCH 1/2] docs: update with-google-analytics example path --- .../01-building-your-application/06-optimizing/08-analytics.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 751a7add1b478f6afb2255c1a93dfed419a23f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AB=E3=82=B3=E3=83=A1?= Date: Fri, 27 Sep 2024 13:37:42 +0900 Subject: [PATCH 2/2] docs: update with-google-analytics example path --- .../02-api-reference/04-functions/use-report-web-vitals.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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