Skip to content

Commit

Permalink
Update naming for Next.js Analytics (#48618)
Browse files Browse the repository at this point in the history
Updates the name of Next.js Analytics to Next.js Speed Insights

closes ALY-579

---------

Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
  • Loading branch information
3 people committed Apr 24, 2023
1 parent 7fdcb17 commit 2679ab6
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions docs/advanced-features/measuring-performance.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
description: Measure and track page performance using Next.js Analytics
description: Measure and track page performance using Next.js Speed Insights
---

# 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.

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

Expand Down Expand Up @@ -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).

## 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:

```js
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ When deploying to Vercel, the platform [automatically detects Next.js](https://v

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 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)
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2947,7 +2947,7 @@ export default async function build(

if (config.analyticsId) {
console.log(
chalk.bold.green('Next.js Analytics') +
chalk.bold.green('Next.js Speed Insights') +
' is enabled for this production build. ' +
"You'll receive a Real Experience Score computed by all of your visitors."
)
Expand Down
6 changes: 3 additions & 3 deletions packages/next/src/server/config-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,11 @@ export interface NextConfig extends Record<string, any> {
compress?: boolean

/**
* The field should only be used when a Next.js project is not hosted on Vercel while using Vercel Analytics.
* Vercel provides zero-configuration analytics for Next.js projects hosted on Vercel.
* 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 insights for Next.js projects hosted on Vercel.
*
* @default ''
* @see [Next.js Analytics](https://nextjs.org/analytics)
* @see [Next.js Speed Insights](https://nextjs.org/analytics)
*/
analyticsId?: string

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createNext } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { check } from 'next-test-utils'

describe('vercel analytics', () => {
describe('vercel speed insights', () => {
const isDev = (global as any).isNextDev

if ((global as any).isNextDeploy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('Analytics relayer (disabled)', () => {

expect(beacons.length).toBe(0)

expect(stdout).not.toMatch('Next.js Analytics')
expect(stdout).not.toMatch('Next.js Speed Insights')

await browser.close()
})
Expand Down
2 changes: 1 addition & 1 deletion test/integration/relay-analytics/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function runTest() {
expect(isNaN(parseFloat(beacon.value))).toBe(false)
}

expect(stdout).toMatch('Next.js Analytics')
expect(stdout).toMatch('Next.js Speed Insights')
await browser.close()
})

Expand Down

0 comments on commit 2679ab6

Please sign in to comment.