Skip to content

Commit

Permalink
Add Next.js Analytics to documentation. (#21527)
Browse files Browse the repository at this point in the history
  • Loading branch information
leerob committed Jan 25, 2021
1 parent 47cb4cf commit d82672c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/advanced-features/measuring-performance.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
---
description: Measure and track page performance using Next.js's build-in performance relayer
description: Measure and track page performance using Next.js Analytics
---

# Measuring performance

Next.js has a built-in relayer that allows you to analyze and measure the performance of
[Next.js Analytics](https://nextjs.org/analytics) allows you to analyze and measure the performance of
pages using different metrics.

To measure any of the supported metrics, you will need to create a [custom
App](/docs/advanced-features/custom-app.md) component and define a `reportWebVitals` function:
You can start collecting your [Real Experience Score](https://vercel.com/docs/analytics#metrics) with zero-configuration on [Vercel deployments](https://vercel.com/docs/analytics). There's also support for Analytics if you're [self-hosting](https://vercel.com/docs/analytics#self-hosted).

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

## Build Your Own

First, you will need to create a [custom App](/docs/advanced-features/custom-app.md) component and define a `reportWebVitals` function:

```js
// pages/_app.js
Expand Down

0 comments on commit d82672c

Please sign in to comment.