Skip to content

Commit

Permalink
Match sendToAnalytics with web-vitals README
Browse files Browse the repository at this point in the history
Update sendToAnalytics example to match with GoogleChrome/web-vitals#81
  • Loading branch information
thisgeek committed Feb 3, 2021
1 parent 0f6fc2b commit 0e49b5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docusaurus/docs/measuring-performance.md
Expand Up @@ -32,7 +32,7 @@ With the `reportWebVitals` function, you can send any of results to an analytics

```js
function sendToAnalytics(metric) {
const body = JSON.stringify(metric);
const body = JSON.stringify({[metric.name]: metric.value});
const url = 'https://example.com/analytics';

// Use `navigator.sendBeacon()` if available, falling back to `fetch()`
Expand Down

0 comments on commit 0e49b5e

Please sign in to comment.