Skip to content

Commit

Permalink
Add google tag manager (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-md authored May 7, 2024
1 parent 35d9f82 commit 7744125
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.12",
"@mui/material": "^5.15.12",
"@next/third-parties": "^14.2.3",
"@svgr/webpack": "^8.1.0",
"fuse.js": "^7.0.0",
"lodash": "^4.17.21",
Expand Down
4 changes: 4 additions & 0 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type { AppProps } from 'next/app'
import { useEffect, type ReactElement } from 'react'
import Head from 'next/head'
import ReactGA from 'react-ga4'
import { GoogleTagManager } from '@next/third-parties/google'

import MetaTags from '../components/MetaTags'
import { CookieBanner } from '../components/CookieBanner'
Expand Down Expand Up @@ -73,6 +74,9 @@ const App = ({
<Head>
<MetaTags path={router.asPath} />
</Head>
<GoogleTagManager
gtmId={String(process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID)}
/>
<CacheProvider value={emotionCache}>
<CssVarsProvider theme={cssVarsTheme}>
<CookieBannerContextProvider>
Expand Down
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7744125

Please sign in to comment.