Skip to content

Commit dbb6392

Browse files
committed
feat: Google Analytics 4を導入
1 parent 17bcf14 commit dbb6392

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

app/layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Geist, Geist_Mono } from "next/font/google";
33
import "./globals.css";
44
import { ThemeProvider } from "@/components/theme/ThemeProvider";
55
import { Toaster } from "sonner";
6+
import { GoogleAnalytics } from "@next/third-parties/google";
67

78
const geistSans = Geist({
89
variable: "--font-geist-sans",
@@ -34,6 +35,7 @@ export default function RootLayout({
3435
<Toaster position="top-right" richColors />
3536
</ThemeProvider>
3637
</body>
38+
<GoogleAnalytics gaId={process.env.NEXT_PUBLIC_GA_ID!} />
3739
</html>
3840
);
3941
}

package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"@fullcalendar/interaction": "^6.1.20",
1515
"@fullcalendar/react": "^6.1.20",
1616
"@holiday-jp/holiday_jp": "^2.5.1",
17+
"@next/third-parties": "^16.2.4",
1718
"@react-pdf/renderer": "^4.3.2",
1819
"@tanstack/react-table": "^8.21.3",
1920
"axios": "^1.13.5",

0 commit comments

Comments
 (0)