Skip to content

Commit

Permalink
Added Google Analytics (#417)
Browse files Browse the repository at this point in the history
Co-authored-by: Hemu21 <[email protected]>
Co-authored-by: sanjay-kv <[email protected]>
Co-authored-by: MastanSayyad <[email protected]>
Co-authored-by: suhanipaliwal <[email protected]>
Co-authored-by: RadhikaMalpani1702 <[email protected]>
  • Loading branch information
6 people committed Sep 16, 2024
1 parent 5ba2d33 commit 8ffaead
Showing 1 changed file with 31 additions and 15 deletions.
46 changes: 31 additions & 15 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,41 @@ import "tailwindcss/tailwind.css";
import { ChakraProvider } from "@chakra-ui/react";
import Layout from "../components/Layout";
import { ThemeProvider } from "next-themes";
import Head from "next/head";

function MyApp({ Component, pageProps }) {
return (
<ThemeProvider enableSystem={false} attribute="class">
<ChakraProvider>
<Layout>
<NextNProgress
color={"#FF7A19"}
startPosition={0.3}
stopDelayMs={200}
height={3}
showOnShallow={true}
options={{ showSpinner: false }}
/>
<>
<Head>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3GZLEL6D5Z"></script>
<script
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-3GZLEL6D5Z');
`,
}}
/>
</Head>

<Component {...pageProps} />
</Layout>
</ChakraProvider>
</ThemeProvider>
<ThemeProvider enableSystem={false} attribute="class">
<ChakraProvider>
<Layout>
<NextNProgress
color={"#FF7A19"}
startPosition={0.3}
stopDelayMs={200}
height={3}
showOnShallow={true}
options={{ showSpinner: false }}
/>
<Component {...pageProps} />
</Layout>
</ChakraProvider>
</ThemeProvider>
</>
);
}

Expand Down

0 comments on commit 8ffaead

Please sign in to comment.