Skip to content

Commit ce3d922

Browse files
committed
docs: ga
1 parent 82e5c32 commit ce3d922

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"autoprefixer": "^10.4.15",
1111
"next": "^13.0.6",
1212
"next-cloudinary": "^4.20.0",
13+
"nextjs-google-analytics": "^2.3.3",
1314
"nextra": "latest",
1415
"nextra-theme-docs": "latest",
1516
"postcss": "^8.4.29",

docs/src/pages/_app.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
import { GoogleAnalytics } from 'nextjs-google-analytics';
12
import '../styles/globals.css';
23

34
export default function App({ Component, pageProps }) {
4-
return <Component {...pageProps} />
5+
return (
6+
<>
7+
<GoogleAnalytics trackPageViews />
8+
<Component {...pageProps} />
9+
</>
10+
);
511
}

pnpm-lock.yaml

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)