Skip to content

Commit

Permalink
Merge pull request #29 from cs3216-a3-group-4/seeleng/set-up-ga
Browse files Browse the repository at this point in the history
feat: init google analytics
  • Loading branch information
seelengxd authored Sep 23, 2024
2 parents 74aed58 + aadac1a commit e9ceae0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Metadata } from "next";
import { Inter as FontSans } from "next/font/google";
import { GoogleAnalytics } from "@next/third-parties/google";

import AppLayout from "@/components/layout/app-layout";
import { cn } from "@/lib/utils";
Expand All @@ -23,6 +24,7 @@ export default function RootLayout({
}: Readonly<{ children: React.ReactNode }>) {
return (
<html lang="en">
<GoogleAnalytics gaId={process.env.NEXT_PUBLIC_GA_ID!} />
<body
className={cn(
"min-h-screen bg-background font-sans antialiased",
Expand Down
24 changes: 24 additions & 0 deletions frontend/package-lock.json

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

2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@hookform/resolvers": "^3.9.0",
"@next/third-parties": "^14.2.13",
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-checkbox": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1",
Expand All @@ -27,6 +28,7 @@
"next": "14.2.12",
"react": "^18",
"react-dom": "^18",
"react-ga4": "^2.1.0",
"react-hook-form": "^7.53.0",
"tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7",
Expand Down

0 comments on commit e9ceae0

Please sign in to comment.