Add Vercel Web Analytics integration#50

merged
main
vercel/vercel-web-analytics-integrati-dn38lp
opened10d agobyVvercel[bot]
View on GitHubRepository sync pausedPR last imported 8d ago

Vercel Web Analytics Integration

Successfully installed and configured Vercel Web Analytics for the Col project following the latest official documentation from https://vercel.com/docs/analytics/quickstart.

Changes Made

Modified Files:

  1. app/layout.tsx

    • Added import: import { Analytics } from "@vercel/analytics/next";
    • Added <Analytics /> component inside the <body> tag, after <SiteNotice />
    • Follows Next.js App Router best practices by placing the component at the root layout level
  2. package.json

    • Added @vercel/analytics version ^2.0.1 to dependencies
  3. pnpm-lock.yaml

    • Updated with the new dependency and its resolved version

Implementation Details

  • Framework: Next.js 16.3.5 with App Router
  • Package Manager: pnpm
  • Analytics Package Version: @vercel/analytics@2.0.1

The implementation follows Vercel's official documentation for Next.js App Router, where the <Analytics /> component is added to the root layout file (app/layout.tsx) inside the <body> tag. This ensures analytics tracking is available across all pages of the application.

Verification Steps Completed

✓ TypeScript type checking passed (pnpm run typecheck) ✓ Build completed successfully (pnpm run build) ✓ All 45 tests passed (pnpm test) ✓ No linting errors introduced ✓ Lock file properly updated with new dependency

Next Steps

To enable analytics data collection:

  1. Deploy this application to Vercel
  2. Navigate to the Vercel dashboard
  3. Select the project and go to Analytics in the sidebar
  4. Click "Enable" to activate Web Analytics
  5. After deployment, verify analytics are working by checking the browser Network tab for requests to /_vercel/insights/*

The analytics component will automatically start collecting page view data once enabled in the Vercel dashboard.


View Project · Web Analytics

Created by Screen (zaid-gd) with Vercel Agent

Checks

All checks passed
Vvercel[bot]opened·10d ago
V

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated
External image colReady ReadyPreviewOct 3, 2026 11:13pm UTC
C

[!IMPORTANT]

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5c51da38-de6b-4050-8b0b-974577d594f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.