From aeefe2afbe38ba17be03f7837b1a50a00f87e88f Mon Sep 17 00:00:00 2001 From: Vercel Date: Sat, 11 Apr 2026 16:09:55 +0000 Subject: [PATCH] Install Vercel Web Analytics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Vercel Web Analytics Installation Successfully installed and configured Vercel Web Analytics for the KillNode project. ### Changes Made **1. Package Installation** - Installed `@vercel/analytics` version 2.0.1 - Updated `package.json` with the new dependency - Updated `package-lock.json` with dependency resolution **2. Code Changes** - Modified `website/src/app/layout.tsx`: - Added import: `import { Analytics } from "@vercel/analytics/next";` - Added `` component as a child of the `` tag ### Implementation Details The project uses Next.js 15 with the App Router architecture. Following the official Vercel documentation (fetched from https://vercel.com/docs/analytics/quickstart), I: 1. Fetched the latest installation instructions from Vercel's documentation 2. Identified that this project uses the Next.js App Router (src/app directory) 3. Added the Analytics import to the root layout file 4. Placed the Analytics component at the end of the body tag, after the children This placement ensures the Analytics script loads on every page without affecting the existing application structure. ### Verification - ✅ Next.js build completed successfully (tested with `npx next build`) - ✅ ESLint passed with no warnings or errors - ✅ No existing functionality was modified or broken - ✅ Package lock file updated correctly ### Next Steps To enable analytics tracking: 1. Deploy the application to Vercel 2. Enable Web Analytics in the Vercel dashboard (Analytics section) 3. After deployment, analytics data will automatically start being collected The Analytics component will automatically detect the Vercel environment and begin tracking page views and web vitals once deployed. Co-authored-by: Vercel --- package-lock.json | 69 ++++++++++++++++++++++ website/package.json | 1 + website/src/app/layout.tsx | 114 +++++++++++++++++++------------------ 3 files changed, 128 insertions(+), 56 deletions(-) diff --git a/package-lock.json b/package-lock.json index 429ffb4..cb17b65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1007,6 +1007,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1040,6 +1041,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1073,6 +1075,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13615,6 +13618,7 @@ "cpu": [ "ppc64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13631,6 +13635,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13647,6 +13652,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13663,6 +13669,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13679,6 +13686,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13695,6 +13703,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13711,6 +13720,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13727,6 +13737,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13743,6 +13754,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13759,6 +13771,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13775,6 +13788,7 @@ "cpu": [ "ia32" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13791,6 +13805,7 @@ "cpu": [ "loong64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13807,6 +13822,7 @@ "cpu": [ "mips64el" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13823,6 +13839,7 @@ "cpu": [ "ppc64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13839,6 +13856,7 @@ "cpu": [ "riscv64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13855,6 +13873,7 @@ "cpu": [ "s390x" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13871,6 +13890,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13887,6 +13907,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13903,6 +13924,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13919,6 +13941,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13935,6 +13958,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13951,6 +13975,7 @@ "cpu": [ "ia32" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -13967,6 +13992,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -14943,6 +14969,7 @@ "@prisma/client": "^6.3.0", "@radix-ui/react-label": "^2.1.0", "@radix-ui/react-slot": "^1.1.0", + "@vercel/analytics": "^2.0.1", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "jose": "^5.9.6", @@ -14967,6 +14994,48 @@ "tsx": "^4.19.2", "typescript": "^5.6.3" } + }, + "website/node_modules/@vercel/analytics": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-2.0.1.tgz", + "integrity": "sha512-MTQG6V9qQrt1tsDeF+2Uoo5aPjqbVPys1xvnIftXSJYG2SrwXRHnqEvVoYID7BTruDz4lCd2Z7rM1BdkUehk2g==", + "license": "MIT", + "peerDependencies": { + "@remix-run/react": "^2", + "@sveltejs/kit": "^1 || ^2", + "next": ">= 13", + "nuxt": ">= 3", + "react": "^18 || ^19 || ^19.0.0-rc", + "svelte": ">= 4", + "vue": "^3", + "vue-router": "^4" + }, + "peerDependenciesMeta": { + "@remix-run/react": { + "optional": true + }, + "@sveltejs/kit": { + "optional": true + }, + "next": { + "optional": true + }, + "nuxt": { + "optional": true + }, + "react": { + "optional": true + }, + "svelte": { + "optional": true + }, + "vue": { + "optional": true + }, + "vue-router": { + "optional": true + } + } } } } diff --git a/website/package.json b/website/package.json index f9ebe83..eff2f9d 100644 --- a/website/package.json +++ b/website/package.json @@ -17,6 +17,7 @@ "@prisma/client": "^6.3.0", "@radix-ui/react-label": "^2.1.0", "@radix-ui/react-slot": "^1.1.0", + "@vercel/analytics": "^2.0.1", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "jose": "^5.9.6", diff --git a/website/src/app/layout.tsx b/website/src/app/layout.tsx index ffafe6f..70c01a2 100644 --- a/website/src/app/layout.tsx +++ b/website/src/app/layout.tsx @@ -1,56 +1,58 @@ -import type { Metadata } from "next"; -import { Geist, Geist_Mono, Orbitron } from "next/font/google"; -import "./globals.css"; - -const geistSans = Geist({ - variable: "--font-geist-sans", - subsets: ["latin"], -}); - -const geistMono = Geist_Mono({ - variable: "--font-geist-mono", - subsets: ["latin"], -}); - -const orbitron = Orbitron({ - variable: "--font-orbitron", - subsets: ["latin"], - weight: ["400", "700", "900"], -}); - -function siteUrl() { - if (process.env.NEXT_PUBLIC_SITE_URL) return process.env.NEXT_PUBLIC_SITE_URL; - if (process.env.VERCEL_PROJECT_PRODUCTION_URL) return `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`; - if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`; - return "http://localhost:3000"; -} - -export const metadata: Metadata = { - title: { - default: "KillNode", - template: "%s · KillNode", - }, - description: - "KillNode — Tor orchestration, proxy mesh, and neural killswitch. Privacy tooling for authorized operators.", - metadataBase: new URL(siteUrl()), - openGraph: { - siteName: "KillNode", - type: "website", - }, -}; - -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - - {children} - - - ); -} +import type { Metadata } from "next"; +import { Geist, Geist_Mono, Orbitron } from "next/font/google"; +import { Analytics } from "@vercel/analytics/next"; +import "./globals.css"; + +const geistSans = Geist({ + variable: "--font-geist-sans", + subsets: ["latin"], +}); + +const geistMono = Geist_Mono({ + variable: "--font-geist-mono", + subsets: ["latin"], +}); + +const orbitron = Orbitron({ + variable: "--font-orbitron", + subsets: ["latin"], + weight: ["400", "700", "900"], +}); + +function siteUrl() { + if (process.env.NEXT_PUBLIC_SITE_URL) return process.env.NEXT_PUBLIC_SITE_URL; + if (process.env.VERCEL_PROJECT_PRODUCTION_URL) return `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`; + if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`; + return "http://localhost:3000"; +} + +export const metadata: Metadata = { + title: { + default: "KillNode", + template: "%s · KillNode", + }, + description: + "KillNode — Tor orchestration, proxy mesh, and neural killswitch. Privacy tooling for authorized operators.", + metadataBase: new URL(siteUrl()), + openGraph: { + siteName: "KillNode", + type: "website", + }, +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + + {children} + + + + ); +}