How to monitor performance with speed insights on Vercel
Vercel Speed Insights provides real-time performance monitoring for your deployed applications using Core Web Vitals metrics. Enable it through your Vercel dashboard, install the analytics package, and monitor key performance indicators like LCP, FID, and CLS.
Prerequisites
- A Vercel account
- A deployed project on Vercel
- Basic understanding of web performance metrics
- Project with at least some traffic
Step-by-Step Instructions
Access your Vercel project dashboard
Enable Speed Insights
Install the Vercel Analytics package
npm install @vercel/analyticsFor Next.js projects, also install the specific Next.js package:
npm install @vercel/speed-insightsConfigure Speed Insights in your application
_app.js or _app.tsx file:import { SpeedInsights } from '@vercel/speed-insights/next';
export default function MyApp({ Component, pageProps }) {
return (
<>
>
);
}Deploy your updated application
vercel --prodWait for the deployment to complete successfully.
Access Speed Insights dashboard
Analyze performance metrics
Set up performance alerts
Common Issues & Troubleshooting
Speed Insights not showing any data after 24 hours
Verify that the @vercel/speed-insights package is properly installed and the SpeedInsights component is correctly imported in your app. Check that your site is receiving real user traffic, as Speed Insights only collects data from actual visitors.
Performance metrics seem inaccurate or inconsistent
Ensure you're using the latest version of the Speed Insights package with npm update @vercel/speed-insights. Remember that metrics reflect real user experiences, which can vary based on device performance, network conditions, and geographic location.
Speed Insights feature not available in project settings
Speed Insights requires a Vercel Pro plan or higher. Upgrade your account plan or contact Vercel support if you believe you should have access. Some legacy projects may need to be migrated to newer Vercel infrastructure.
High Cumulative Layout Shift (CLS) scores reported
Check for images without explicit width and height attributes, dynamically injected content, or web fonts causing layout shifts. Use the Page Details view in Speed Insights to identify specific elements causing layout shifts and optimize them accordingly.