DEV Community

Cover image for Analytics
Gereltuya Munkhzaya
Gereltuya Munkhzaya

Posted on • Updated on

Analytics

Next.js Speed Insights allows you to analyze and measure the performance of pages using different metrics.

You can start collecting your Real Experience Score with zero-configuration on Vercel deployments.

The rest of this documentation describes the built-in relayer Next.js Speed Insights uses.

This function is fired when the final values for any of the metrics have finished calculating on the page. You can use to log any of the results to the console or send to a particular endpoint.

The metric object returned to the function consists of a number of properties:

  • id: Unique identifier for the metric in the context of the current page load
  • name: Metric name
  • startTime: First recorded timestamp of the performance entry in milliseconds (if applicable)
  • value: Value, or duration in milliseconds, of the performance entry
  • label: Type of metric (web-vital or custom)

There are two types of metrics that are tracked:

  • Web Vitals
  • Custom metrics

Top comments (0)