Metrics
This is an clientside feature.
Metrics are the data that you want to collect from your users. You can collect any data you want. You can collect user data, or you can send them anonymously, or you can send them both. Nexys is a privacy-first analytics platform, and we don't collect any data from your users without your permission.
Metrics are currently only available on NextJS
platforms.
React and NodeJS support will come soon.
- NextJS > 13
- NextJS < 13
NextJS 13 or higher
Please read this documentation.
You just need to replace line 7 with this nexys.metric(metric)
on file app/_components/web-vitals.js|ts
NextJS 12 or lower
import { nexys } from "../nexys";
import type { NextWebVitalsMetric, AppProps } from "next/app";
// Exporting function called `reportWebVitals` is required for NextJS to collect metrics.
export function reportWebVitals(metric: NextWebVitalsMetric) {
nexys.metric(metric);
}
export default function App({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
}
This code will collect FCP (First Contentful Paint), LCP (Largest Contentful Paint), CLS (Cumulative Layout Shift), FID (First Input Delay), TTFB (Time to First Byte).
You can view your app metrics on your project's dashboard inside Metrics tab.
Also, if you dont want to collect metrics, just don't add nexys.metric
to your project.