Skip to content

Commit

Permalink
chore: Add google analytics script (#1066)
Browse files Browse the repository at this point in the history
Co-authored-by: MD Aleem <[email protected]>
  • Loading branch information
Hemanthghs and aleem1314 authored Jan 5, 2024
1 parent 311b43c commit 36636aa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Landingpage } from '@/components/LandingPage';
import { StoreProvider } from '@/store/StoreProvider';
import SideBar from '@/components/SideBar';
import SnackBar from '@/components/SnackBar';
import Script from 'next/script';

const inter = Inter({ subsets: ['latin'] });

Expand All @@ -32,6 +33,16 @@ export default function RootLayout({
</div>
</StoreProvider>
}
<Script src="https://www.googletagmanager.com/gtag/js?id=G-RTXGXXDNNS" />
<Script id="google-analytics">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-RTXGXXDNNS');
`}
</Script>
</body>
</html>
);
Expand Down

0 comments on commit 36636aa

Please sign in to comment.