📈 Add google analytics

This commit is contained in:
LittleSheep 2025-01-24 17:39:52 +08:00
parent 102e14f643
commit 5f07990ff2
3 changed files with 3 additions and 0 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -19,6 +19,7 @@
"@mui/material": "^6.3.1", "@mui/material": "^6.3.1",
"@mui/material-nextjs": "^6.3.1", "@mui/material-nextjs": "^6.3.1",
"@mui/x-charts": "^7.23.6", "@mui/x-charts": "^7.23.6",
"@next/third-parties": "^15.1.6",
"@tailwindcss/typography": "^0.5.16", "@tailwindcss/typography": "^0.5.16",
"@toolpad/core": "^0.11.0", "@toolpad/core": "^0.11.0",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",

View File

@ -5,6 +5,7 @@ import {
documentGetInitialProps, documentGetInitialProps,
} from '@mui/material-nextjs/v15-pagesRouter' } from '@mui/material-nextjs/v15-pagesRouter'
import { Html, Head, Main, NextScript, DocumentContext, DocumentProps } from 'next/document' import { Html, Head, Main, NextScript, DocumentContext, DocumentProps } from 'next/document'
import { GoogleAnalytics } from '@next/third-parties/google'
export default function Document(props: DocumentProps & DocumentHeadTagsProps) { export default function Document(props: DocumentProps & DocumentHeadTagsProps) {
return ( return (
@ -16,6 +17,7 @@ export default function Document(props: DocumentProps & DocumentHeadTagsProps) {
<body className="antialiased"> <body className="antialiased">
<Main /> <Main />
<NextScript /> <NextScript />
<GoogleAnalytics gaId="G-ZFJ7RX0JXF" />
</body> </body>
</Html> </Html>
</AppCacheProvider> </AppCacheProvider>