Added google anal

This commit is contained in:
Hieuhuy Pham 2025-01-17 19:52:56 -05:00
parent 2e876265b4
commit 9baa792111
2 changed files with 16 additions and 1 deletions

1
global.d.ts vendored
View File

@ -7,6 +7,7 @@ declare namespace NodeJS {
declare global {
interface Window {
kofiWidgetOverlay: any;
dataLayer: any[];
}
}
export {};

View File

@ -2,6 +2,8 @@
import "tailwindcss/tailwind.css";
import Script from "next/script";
import React, { useEffect, useState } from "react";
import NightModeToggle from "@/components/NightModeToggle";
import Navbar from "@/components/NavigationBar";
@ -49,8 +51,20 @@ export default function RootLayout({ children }: { children: React.ReactNode })
})();
`,
}}
/>
/>
<Script
src="https://www.googletagmanager.com/gtag/js?id=G-6SXB46RSDE"
strategy="afterInteractive"
/>
<Script id="google-analytics" strategy="afterInteractive">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-6SXB46RSDE');
`}
</Script>
</head>
<body className="bg-gray-100 dark:bg-gray-900 text-gray-900 dark:text-gray-100 min-h-screen">
<KofiWidget />