Unverified Commit 2679ab67 authored by Chris's avatar Chris Committed by GitHub

Update naming for Next.js Analytics (#48618)

Updates the name of Next.js Analytics to Next.js Speed Insights

closes ALY-579

---------
Co-authored-by: 's avatarSteven <steven@ceriously.com>
Co-authored-by: 's avatarTim Neutkens <tim@timneutkens.nl>
parent 7fdcb172
--- ---
description: Measure and track page performance using Next.js Analytics description: Measure and track page performance using Next.js Speed Insights
--- ---
# Measuring performance # Measuring performance
[Next.js Analytics](https://nextjs.org/analytics) allows you to analyze and measure the performance of [Next.js Speed Insights](https://nextjs.org/analytics) allows you to analyze and measure the performance of
pages using different metrics. pages using different metrics.
You can start collecting your [Real Experience Score](https://vercel.com/docs/concepts/analytics/web-vitals?utm_source=next-site&utm_medium=docs&utm_campaign=next-website) with zero-configuration on [Vercel deployments](https://vercel.com/docs/analytics?utm_source=next-site&utm_medium=docs&utm_campaign=next-website). There's also support for Analytics if you're [self-hosting](https://vercel.com/docs/concepts/analytics#self-hosted?utm_source=next-site&utm_medium=docs&utm_campaign=next-website). You can start collecting your [Real Experience Score](https://vercel.com/docs/concepts/speed-insights#core-web-vitals?utm_source=next-site&utm_medium=docs&utm_campaign=next-website) with zero-configuration on [Vercel deployments](https://vercel.com/docs/concepts/speed-insights?utm_source=next-site&utm_medium=docs&utm_campaign=next-website).
The rest of this documentation describes the built-in relayer Next.js Analytics uses. The rest of this documentation describes the built-in relayer Next.js Speed Insights uses.
## Build Your Own ## Build Your Own
...@@ -142,9 +142,9 @@ export function reportWebVitals(metric) { ...@@ -142,9 +142,9 @@ export function reportWebVitals(metric) {
These metrics work in all browsers that support the [User Timing API](https://caniuse.com/#feat=user-timing). These metrics work in all browsers that support the [User Timing API](https://caniuse.com/#feat=user-timing).
## Sending results to analytics ## Sending results to external systems
With the relay function, you can send any of results to an analytics endpoint to measure and track With the relay function, you can send results to any endpoint to measure and track
real user performance on your site. For example: real user performance on your site. For example:
```js ```js
......
...@@ -41,7 +41,7 @@ When deploying to Vercel, the platform [automatically detects Next.js](https://v ...@@ -41,7 +41,7 @@ When deploying to Vercel, the platform [automatically detects Next.js](https://v
In addition, Vercel provides features like: In addition, Vercel provides features like:
- Automatic performance monitoring with [Next.js Analytics](https://vercel.com/analytics?utm_source=next-site&utm_medium=docs&utm_campaign=next-website) - Automatic performance monitoring with [Next.js Speed Insights](https://vercel.com/analytics?utm_source=next-site&utm_medium=docs&utm_campaign=next-website)
- Automatic HTTPS and SSL certificates - Automatic HTTPS and SSL certificates
- Automatic CI/CD (through GitHub, GitLab, Bitbucket, etc.) - Automatic CI/CD (through GitHub, GitLab, Bitbucket, etc.)
- Support for [Environment Variables](https://vercel.com/docs/environment-variables?utm_source=next-site&utm_medium=docs&utm_campaign=next-website) - Support for [Environment Variables](https://vercel.com/docs/environment-variables?utm_source=next-site&utm_medium=docs&utm_campaign=next-website)
......
...@@ -2947,7 +2947,7 @@ export default async function build( ...@@ -2947,7 +2947,7 @@ export default async function build(
if (config.analyticsId) { if (config.analyticsId) {
console.log( console.log(
chalk.bold.green('Next.js Analytics') + chalk.bold.green('Next.js Speed Insights') +
' is enabled for this production build. ' + ' is enabled for this production build. ' +
"You'll receive a Real Experience Score computed by all of your visitors." "You'll receive a Real Experience Score computed by all of your visitors."
) )
......
...@@ -412,11 +412,11 @@ export interface NextConfig extends Record<string, any> { ...@@ -412,11 +412,11 @@ export interface NextConfig extends Record<string, any> {
compress?: boolean compress?: boolean
/** /**
* The field should only be used when a Next.js project is not hosted on Vercel while using Vercel Analytics. * The field should only be used when a Next.js project is not hosted on Vercel while using Vercel Speed Insights.
* Vercel provides zero-configuration analytics for Next.js projects hosted on Vercel. * Vercel provides zero-configuration insights for Next.js projects hosted on Vercel.
* *
* @default '' * @default ''
* @see [Next.js Analytics](https://nextjs.org/analytics) * @see [Next.js Speed Insights](https://nextjs.org/analytics)
*/ */
analyticsId?: string analyticsId?: string
......
...@@ -2,7 +2,7 @@ import { createNext } from 'e2e-utils' ...@@ -2,7 +2,7 @@ import { createNext } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base' import { NextInstance } from 'test/lib/next-modes/base'
import { check } from 'next-test-utils' import { check } from 'next-test-utils'
describe('vercel analytics', () => { describe('vercel speed insights', () => {
const isDev = (global as any).isNextDev const isDev = (global as any).isNextDev
if ((global as any).isNextDeploy) { if ((global as any).isNextDeploy) {
......
...@@ -45,7 +45,7 @@ describe('Analytics relayer (disabled)', () => { ...@@ -45,7 +45,7 @@ describe('Analytics relayer (disabled)', () => {
expect(beacons.length).toBe(0) expect(beacons.length).toBe(0)
expect(stdout).not.toMatch('Next.js Analytics') expect(stdout).not.toMatch('Next.js Speed Insights')
await browser.close() await browser.close()
}) })
......
...@@ -105,7 +105,7 @@ function runTest() { ...@@ -105,7 +105,7 @@ function runTest() {
expect(isNaN(parseFloat(beacon.value))).toBe(false) expect(isNaN(parseFloat(beacon.value))).toBe(false)
} }
expect(stdout).toMatch('Next.js Analytics') expect(stdout).toMatch('Next.js Speed Insights')
await browser.close() await browser.close()
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment