Skip to content

Commit

Permalink
Update naming for Next.js Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswdmr committed Apr 20, 2023
1 parent 189e6a3 commit 061e795
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
@@ -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 3rd party analytics

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 any of results to an 3rd party analytics 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 @@ -2935,7 +2935,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 @@ -414,11 +414,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

0 comments on commit 061e795

Please sign in to comment.