diff --git a/docs/.vade-report b/docs/.vade-report new file mode 100644 index 000000000..d7c2cc708 --- /dev/null +++ b/docs/.vade-report @@ -0,0 +1,47 @@ +# Vercel Web Analytics Installation Report + +## Summary +Successfully installed and configured Vercel Web Analytics for the Headroom documentation project. + +## Changes Made + +### 1. Package Installation +- **Package**: `@vercel/analytics@^2.0.1` +- **Method**: npm install +- **Dependencies updated**: package.json and package-lock.json + +### 2. Analytics Component Integration +- **File Modified**: `docs/app/layout.tsx` +- **Changes**: + - Added import: `import { Analytics } from '@vercel/analytics/next';` + - Added `` component inside the `` element, after the `` component + +### 3. Implementation Details +- Followed official Vercel documentation from https://vercel.com/docs/analytics/quickstart +- Used Next.js App Router-specific implementation (`@vercel/analytics/next`) +- Placed Analytics component in the root layout to ensure tracking across all pages +- Component added at the end of the body element as per best practices + +## Verification Steps Completed + +✅ **Type Check**: Passed - `npm run types:check` completed successfully +✅ **Build Test**: Passed - `npm run build` completed successfully with all 158 static pages generated +✅ **Lock File**: Updated - package-lock.json reflects the new dependency +✅ **Code Structure**: Preserved - No existing functionality was modified + +## Files Changed +1. `docs/app/layout.tsx` - Added Analytics import and component +2. `docs/package.json` - Added @vercel/analytics dependency +3. `docs/package-lock.json` - Updated dependency lock file + +## Next Steps for Deployment +To enable Web Analytics in production: +1. Deploy the application to Vercel using `vercel deploy` +2. Enable Web Analytics in the Vercel project dashboard under Settings → Analytics +3. Data collection will begin automatically once deployed and enabled + +## Notes +- The Analytics component is framework-aware and optimized for Next.js App Router +- No additional configuration is required in the code +- TypeScript types are included with the package +- The component is lightweight and will not impact page performance diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx index 6850d0d6d..ec8e252d7 100644 --- a/docs/app/layout.tsx +++ b/docs/app/layout.tsx @@ -2,6 +2,7 @@ import { RootProvider } from 'fumadocs-ui/provider/next'; import './global.css'; import { Inter } from 'next/font/google'; import type { Metadata } from 'next'; +import { Analytics } from '@vercel/analytics/next'; const inter = Inter({ subsets: ['latin'], @@ -47,6 +48,7 @@ export default function Layout({ children }: LayoutProps<'/'>) { {children} + ); diff --git a/docs/package-lock.json b/docs/package-lock.json index 5dedf4e5d..bf5776c68 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -10,6 +10,7 @@ "hasInstallScript": true, "dependencies": { "@radix-ui/react-slot": "1.3.0", + "@vercel/analytics": "^2.0.1", "class-variance-authority": "0.7.1", "clsx": "2.1.1", "dotted-map": "^3.1.0", @@ -1277,9 +1278,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1296,9 +1294,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -1315,9 +1310,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -1334,9 +1326,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2426,9 +2415,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2446,9 +2432,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2466,9 +2449,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2486,9 +2466,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2833,6 +2810,48 @@ "version": "1.3.0", "license": "ISC" }, + "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/oidc": { "version": "3.1.0", "dev": true, @@ -2884,9 +2903,6 @@ "cpu": [ "arm" ], - "libc": [ - "glibc" - ], "optional": true, "os": [ "linux" @@ -2899,9 +2915,6 @@ "cpu": [ "arm" ], - "libc": [ - "musl" - ], "optional": true, "os": [ "linux" @@ -2914,9 +2927,6 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "optional": true, "os": [ "linux" @@ -2929,9 +2939,6 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "optional": true, "os": [ "linux" @@ -2944,9 +2951,6 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "optional": true, "os": [ "linux" @@ -2959,9 +2963,6 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "optional": true, "os": [ "linux" @@ -4395,9 +4396,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -4419,9 +4417,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -4443,9 +4438,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -4467,9 +4459,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ diff --git a/docs/package.json b/docs/package.json index f5d0fdc5e..440a045ed 100644 --- a/docs/package.json +++ b/docs/package.json @@ -11,10 +11,11 @@ }, "dependencies": { "@radix-ui/react-slot": "1.3.0", + "@vercel/analytics": "^2.0.1", "class-variance-authority": "0.7.1", "clsx": "2.1.1", "dotted-map": "^3.1.0", -"fumadocs-core": "16.11.5", + "fumadocs-core": "16.11.5", "fumadocs-mdx": "15.2.0", "fumadocs-twoslash": "^3.3.0", "fumadocs-typescript": "^5.3.0",