summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2024-09-21 15:05:06 +0200
committerYuval Adam <_@yuv.al>2024-09-21 15:13:25 +0200
commit552c0dd15d8e780913b44ffb57e8e877783c7f31 (patch)
tree8d0c25465685a0263782b3ee70ae711cb7daca45
parent49466668c36715e56215bfdd6900584a75806832 (diff)
Add google analytics component
-rw-r--r--app/layout.tsx7
-rw-r--r--package-lock.json20
-rw-r--r--package.json1
3 files changed, 25 insertions, 3 deletions
diff --git a/app/layout.tsx b/app/layout.tsx
index b41b50f..f693908 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,4 +1,6 @@
import type { Metadata } from "next";
+import { GoogleAnalytics } from '@next/third-parties/google'
+
import localFont from "next/font/local";
import "./globals.css";
@@ -25,11 +27,10 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
- <body
- className={`${geistSans.variable} ${geistMono.variable} antialiased`}
- >
+ <body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
{children}
</body>
+ <GoogleAnalytics gaId="G-31LHNP2G97" />
</html>
);
}
diff --git a/package-lock.json b/package-lock.json
index 90f5e7f..28db3ed 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"name": "cidr.xyz",
"version": "2.0.0",
"dependencies": {
+ "@next/third-parties": "^14.2.13",
"next": "14.2.13",
"react": "^18",
"react-dom": "^18"
@@ -396,6 +397,19 @@
"node": ">= 10"
}
},
+ "node_modules/@next/third-parties": {
+ "version": "14.2.13",
+ "resolved": "https://registry.npmjs.org/@next/third-parties/-/third-parties-14.2.13.tgz",
+ "integrity": "sha512-OSqD2E9JO0/GE8HT5QAUsYVXwjWtPLScAX70kO2xopwDAdRzakrsQS55Cihd862X/4bUB37ApVZ9DlHcExzeOg==",
+ "license": "MIT",
+ "dependencies": {
+ "third-party-capital": "1.0.20"
+ },
+ "peerDependencies": {
+ "next": "^13.0.0 || ^14.0.0",
+ "react": "^18.2.0"
+ }
+ },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -4871,6 +4885,12 @@
"node": ">=0.8"
}
},
+ "node_modules/third-party-capital": {
+ "version": "1.0.20",
+ "resolved": "https://registry.npmjs.org/third-party-capital/-/third-party-capital-1.0.20.tgz",
+ "integrity": "sha512-oB7yIimd8SuGptespDAZnNkzIz+NWaJCu2RMsbs4Wmp9zSDUM8Nhi3s2OOcqYuv3mN4hitXc8DVx+LyUmbUDiA==",
+ "license": "ISC"
+ },
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
diff --git a/package.json b/package.json
index 2e4f1de..4ea56df 100644
--- a/package.json
+++ b/package.json
@@ -9,6 +9,7 @@
"lint": "next lint"
},
"dependencies": {
+ "@next/third-parties": "^14.2.13",
"next": "14.2.13",
"react": "^18",
"react-dom": "^18"