Skip to content

Commit

Permalink
added the gtags (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
KunalLorex authored May 19, 2024
1 parent 09891db commit 12e432b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions client/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'slick-carousel/slick/slick.css'
import '@/styles/globals.css'
import '@/styles/react-slick.css'
import { NextPageWithLayout } from '@/interfaces/layout'
import Script from 'next/script'
// import 'slick-carousel/slick/slick-theme.css'

// Client-side cache, shared for the whole session of the user in the browser.
Expand All @@ -32,6 +33,20 @@ const App: FC<AppPropsWithLayout> = (props: AppPropsWithLayout) => {
<meta name="viewport" content="initial-scale=1, width=device-width" />
<title>BigOhhh - Code Your Dreams</title>
</Head>
<Script
src="https://www.googletagmanager.com/gtag/js?id=G-4P61BB8W4Y"
strategy="afterInteractive"
/>
<Script id="google-analytics" strategy="afterInteractive">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){window.dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-4P61BB8W4Y');
`}
</Script>

<MUIProvider>
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
<CssBaseline />
Expand Down

0 comments on commit 12e432b

Please sign in to comment.