← Back to Guides

Learn how to send a sample of your data to Speed insights.

By default, all events are sent to Speed Insights.

To send only a sample of your data, you can add the Speed Insights component with the sampleRate prop to your app's root layout. The sampleRate prop accepts a number between 0 and 1, where 0 is 0% and 1 is 100%:

import { SpeedInsights } from '@vercel/speed-insights/next';
export default function RootLayout({ children, }: {children: React.ReactNode;}) {
  return (
    <html lang="en">
        <SpeedInsights sampleRate={0.5} />

Last updated on June 21, 2024