This Next.js application has been configured with Vercel Speed Insights to track and monitor real-user performance metrics.
The @vercel/speed-insights package has been installed:
"@vercel/speed-insights": "^1.3.1"The SpeedInsights component has been added to the root layout (src/app/layout.tsx):
import { SpeedInsights } from "@vercel/speed-insights/next";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<SpeedInsights />
</body>
</html>
);
}The SpeedInsights component automatically:
- Tracks Core Web Vitals (LCP, FID, CLS, FCP, TTFB, INP)
- Collects real user performance data
- Sends metrics to Vercel's analytics platform
When deployed to Vercel:
- Enable Speed Insights in your project dashboard
- Deploy your application
- The tracking script will be automatically served at
/_vercel/speed-insights/script.js - View metrics in the Speed Insights tab of your Vercel dashboard
Speed Insights is designed to work in production. In development mode, the component is present but won't send data to Vercel's analytics.