diff --git a/.gitignore b/.gitignore index fd3dbb5..00bba9b 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ yarn-error.log* # local env files .env*.local +.env # vercel .vercel diff --git a/app/layout.tsx b/app/layout.tsx index ed2a50d..8f3a898 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -3,6 +3,7 @@ import { Inter } from "next/font/google"; import "./globals.css"; import Header from "@/components/header"; import Footer from "@/components/footer"; +import GoogleAnalytics from "@/components/GoogleAnalytics"; const inter = Inter({ subsets: ["latin"] }); @@ -22,6 +23,7 @@ export default function RootLayout({
+ {children}
diff --git a/components/GoogleAnalytics.tsx b/components/GoogleAnalytics.tsx new file mode 100644 index 0000000..fec3093 --- /dev/null +++ b/components/GoogleAnalytics.tsx @@ -0,0 +1,31 @@ +"use client"; + +import Script from "next/script"; +import * as gtag from "@/lib/gtag"; + +const GoogleAnalytics = () => { + return ( + <> +