Skip to content

Commit

Permalink
docs: update with-google-analytics example path (#70547)
Browse files Browse the repository at this point in the history
## 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 <[email protected]>
  • Loading branch information
Marukome0743 and ijjk authored Oct 1, 2024
1 parent 35a053a commit 43a8a7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 43a8a7b

Please sign in to comment.