You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/basic-features/eslint.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,7 @@ Next.js provides an ESLint plugin, [`eslint-plugin-next`](https://www.npmjs.com/
95
95
| ✔️ |[next/no-title-in-document-head](https://nextjs.org/docs/messages/no-title-in-document-head)| Disallow using <title> with Head from next/document |
96
96
| ✔️ |[next/no-unwanted-polyfillio](https://nextjs.org/docs/messages/no-unwanted-polyfillio)| Prevent duplicate polyfills from Polyfill.io |
97
97
| ✔️ | next/no-typos | Ensure no typos were made declaring [Next.js's data fetching function](https://nextjs.org/docs/basic-features/data-fetching)|
98
+
| ✔️ |[next/next-script-for-ga](https://nextjs.org/docs/messages/next-script-for-ga)| Use the Script component to defer loading of the script until necessary. |
Copy file name to clipboardExpand all lines: docs/testing.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Cypress is a test runner used for **End-to-End (E2E)** and **Integration Testing
16
16
17
17
### Quickstart
18
18
19
-
You can use `create-next-app` with the [with-cypress example](https://github.com/vercel/next.js/tree/canary/examples/with-jest) to quickly get started.
19
+
You can use `create-next-app` with the [with-cypress example](https://github.com/vercel/next.js/tree/canary/examples/with-cypress) to quickly get started.
An inline script was used for Google analytics which might impact your webpage's performance.
6
+
7
+
### Possible Ways to Fix It
8
+
9
+
#### Using gtag.js
10
+
11
+
If you are using the [gtag.js](https://developers.google.com/analytics/devguides/collection/gtagjs) script to add analytics, use the `next/script` component with the right loading strategy to defer loading of the script until necessary.
12
+
13
+
```jsx
14
+
importScriptfrom'next/script'
15
+
16
+
constHome= () => {
17
+
return (
18
+
<div class="container">
19
+
<!-- Global site tag (gtag.js) - Google Analytics -->
0 commit comments