Integrate google analytics
This commit is contained in:
@ -1,9 +1,15 @@
|
||||
import { useEffect } from 'react';
|
||||
import type { AppProps } from 'next/app';
|
||||
import { ChakraProvider } from '@chakra-ui/react';
|
||||
import { roadmapTheme } from '../lib/theme';
|
||||
import 'prism-themes/themes/prism-shades-of-purple.css';
|
||||
import { roadmapTheme } from '../lib/theme';
|
||||
import { firePageView } from '../lib/gtag';
|
||||
|
||||
function MyApp({ Component, pageProps }: AppProps) {
|
||||
useEffect(() => {
|
||||
firePageView(window.location.pathname);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<ChakraProvider theme={roadmapTheme}>
|
||||
<Component {...pageProps} />
|
||||
|
Reference in New Issue
Block a user