From 022f20907285eded77301e536f8a6a8020481f1c Mon Sep 17 00:00:00 2001 From: Ned Cutler Date: Mon, 20 Jul 2026 12:52:28 -0400 Subject: [PATCH] Add Vercel Analytics and Speed Insights --- app/layout.tsx | 10 ++++- package-lock.json | 101 +++++++++++++++++++++++++++++++++++++--------- package.json | 2 + 3 files changed, 94 insertions(+), 19 deletions(-) diff --git a/app/layout.tsx b/app/layout.tsx index 5b656d8..c442d72 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,5 +1,7 @@ import type { Metadata, Viewport } from "next"; import type { ReactNode } from "react"; +import { Analytics } from "@vercel/analytics/next"; +import { SpeedInsights } from "@vercel/speed-insights/next"; import { siteUrl } from "@/lib/site-url"; import "./globals.css"; @@ -46,7 +48,13 @@ export default function RootLayout({ children }: Readonly<{ children: ReactNode ) : null} - {children} + + {children} + {/* Vercel page-view analytics and Core Web Vitals reporting. Both are + no-ops off Vercel, so local dev and the E2E build stay untouched. */} + + + ); } diff --git a/package-lock.json b/package-lock.json index 09e429c..31a6924 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,8 @@ "dependencies": { "@supabase/supabase-js": "^2.107.0", "@turf/turf": "^7.3.5", + "@vercel/analytics": "^2.0.1", + "@vercel/speed-insights": "^2.0.0", "clsx": "^2.1.1", "exifreader": "^4.40.5", "lucide-react": "^1.17.0", @@ -1425,9 +1427,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1445,9 +1444,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1465,9 +1461,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1485,9 +1478,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1505,9 +1495,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1525,9 +1512,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -4794,6 +4778,86 @@ "win32" ] }, + "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 + } + } + }, + "node_modules/@vercel/speed-insights": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@vercel/speed-insights/-/speed-insights-2.0.0.tgz", + "integrity": "sha512-jwkNcrTeafWxjmWq4AHBaptSqZiJkYU5adLC9QBSqeim0GcqDMgN5Ievh8OG1rJ6W3A4l1oiP7qr9CWxGuzu3w==", + "license": "Apache-2.0", + "peerDependencies": { + "@sveltejs/kit": "^1 || ^2", + "next": ">= 13", + "nuxt": ">= 3", + "react": "^18 || ^19 || ^19.0.0-rc", + "svelte": ">= 4", + "vue": "^3", + "vue-router": "^4" + }, + "peerDependenciesMeta": { + "@sveltejs/kit": { + "optional": true + }, + "next": { + "optional": true + }, + "nuxt": { + "optional": true + }, + "react": { + "optional": true + }, + "svelte": { + "optional": true + }, + "vue": { + "optional": true + }, + "vue-router": { + "optional": true + } + } + }, "node_modules/@vitest/coverage-v8": { "version": "4.1.8", "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.8.tgz", @@ -8678,6 +8742,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, diff --git a/package.json b/package.json index 35ed4ea..307c719 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,8 @@ "dependencies": { "@supabase/supabase-js": "^2.107.0", "@turf/turf": "^7.3.5", + "@vercel/analytics": "^2.0.1", + "@vercel/speed-insights": "^2.0.0", "clsx": "^2.1.1", "exifreader": "^4.40.5", "lucide-react": "^1.17.0",