Skip to content

Commit

Permalink
Merge pull request #14 from luminr-co/rojen
Browse files Browse the repository at this point in the history
feat: google analytics
  • Loading branch information
rojen11 authored Jul 18, 2023
2 parents 9768d50 + 66f888b commit e4bb2c6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Script from "next/script";
import "./globals.css";
import { Montserrat, Kanit } from "next/font/google";

Expand Down Expand Up @@ -60,7 +61,19 @@ export default function RootLayout({
}) {
return (
<html lang="en" className={`${montserrat.variable} ${kanit.variable}`}>
<body className={`noise relative`}>{children}</body>
<body className={`noise relative`}>
{children}
<Script src="https://www.googletagmanager.com/gtag/js?id=G-595J3VH2R3" />
<Script id="google-analytics">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-595J3VH2R3');
`}
</Script>
</body>
</html>
);
}

0 comments on commit e4bb2c6

Please sign in to comment.