Skip to content

Commit

Permalink
chore(analytics): add ga script tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Nouaille committed Oct 20, 2024
1 parent 8980c38 commit f1c6e77
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import './globals.css';
import clsx from 'clsx';
import { ThemeProvider } from 'next-themes';
import Script from 'next/script';

export default function RootLayout({
children,
Expand All @@ -13,6 +14,19 @@ export default function RootLayout({
<ThemeProvider enableSystem={false} defaultTheme='light'>
{children}
</ThemeProvider>

<script
async
src='https://www.googletagmanager.com/gtag/js?id=G-PR0RYWYEZJ'
></script>
<Script id='ga'>
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-PR0RYWYEZJ');
`}
</Script>
</body>
</html>
);
Expand Down

0 comments on commit f1c6e77

Please sign in to comment.