Skip to content

Commit

Permalink
chore: replace gtag implementation w/ next.js (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 authored Apr 3, 2024
1 parent a219378 commit 9a4037d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 43 deletions.
5 changes: 3 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { GoogleAnalytics } from "@next/third-parties/google";

import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import Header from "@/components/Header";
import Footer from "@/components/Footer";
import GoogleAnalytics from "@/components/GoogleAnalytics";
import { Toaster } from "@/components/ui/toaster";

const inter = Inter({ subsets: ["latin"], fallback: ["sans-serif"] });
Expand Down Expand Up @@ -41,7 +42,7 @@ export default function RootLayout({
<body className={inter.className}>
<div className="flex flex-col place-content-center bg-background text-text">
<Header />
<GoogleAnalytics />
<GoogleAnalytics gaId="G-PMNW29ZB3Y" />
{children}
<Footer />
<Toaster />
Expand Down
31 changes: 0 additions & 31 deletions components/GoogleAnalytics.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions lib/gtag.ts

This file was deleted.

18 changes: 18 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@next/third-parties": "^14.1.4",
"@radix-ui/react-popover": "^1.0.7",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
Expand Down

0 comments on commit 9a4037d

Please sign in to comment.