Unverified Commit e91c0fcc authored by Sergio Xalambrí's avatar Sergio Xalambrí Committed by GitHub

Add missing parenthesis in Sending results to analytics example (#12733)

parent ec38b0f0
......@@ -155,13 +155,14 @@ export function reportWebVitals(metric) {
>
> ```js
> export function reportWebVitals({ id, name, label, value }) {
> ga('send', 'event', {
> eventCategory: label === 'web-vital' ? 'Web Vitals' : 'Next.js custom metric',
> eventAction: name,
> eventValue: Math.round(name === 'CLS' ? value * 1000 : value), // values must be integers
> eventLabel: id, // id unique to current page load
> nonInteraction: true, // avoids affecting bounce rate.
> },
> ga('send', 'event', {
> eventCategory:
> label === 'web-vital' ? 'Web Vitals' : 'Next.js custom metric',
> eventAction: name,
> eventValue: Math.round(name === 'CLS' ? value * 1000 : value), // values must be integers
> eventLabel: id, // id unique to current page load
> nonInteraction: true, // avoids affecting bounce rate.
> })
> }
> ```
>
......
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