Speed Insights Intake API
This API is deprecated. Use the @vercel/speed-insights framework agnostic package instead.
Vercel Speed Insights supports Next.js, Nuxt, and Gatsby with zero configuration through build plugins. You can use Speed Insights with any frontend framework or project through the Speed Insights API as shown below.
POST /v1/vitals
Send web vitals data to the Vercel Speed Insights API.
To use the Speed Insights API, you'll need to retrieve the analytics ID for your Vercel project. This value is exposed during the build and can be accessed by inside Node.js.
Inside your framework or Node.js script, you can then use this value in the of your request to the Vercel Speed Insights API.
vercel pull does not pull
VERCEL_ANALYTICS_ID as the Vercel Analytics ID
environment variable is inlined during the build process. It is not part of your
project Environment Variables, which can be pulled locally using Vercel CLI.
You can view an example of the following code implemented inside our Create React App and SvelteKit starters.
Was this helpful?