mirror of
https://github.com/jambonz/next-static-site.git
synced 2026-07-04 19:21:55 +00:00
add support for google tag manager (#62)
This commit is contained in:
+9
-2
@@ -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} />
|
||||
}
|
||||
Reference in New Issue
Block a user