add support for google tag manager (#62)

This commit is contained in:
Dave Horton
2023-05-07 09:16:58 -04:00
committed by GitHub
parent 8b6847b572
commit 5a98730474
3 changed files with 31 additions and 8 deletions
+9 -2
View File
@@ -1,5 +1,12 @@
import '../src/styles/global.scss';
import { useEffect } from 'react'
import TagManager from 'react-gtm-module'
const gtmId = 'G-7J55WH6BVM';
export default function App({ Component, pageProps }) {
return <Component {...pageProps} />;
}
useEffect(() => {
TagManager.initialize({ gtmId })
}, []);
return <Component {...pageProps} />
}