Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update naming for Next.js Analytics #48618

Merged
merged 7 commits into from Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/advanced-features/measuring-performance.md
@@ -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
chriswdmr marked this conversation as resolved.
Show resolved Hide resolved
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
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
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
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
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
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
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