1.0.0 • Published 3 years ago

@buraksaraloglu/trace-vitals v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

trace-vitals

trace-vitals is a small script that traces the web-vitals and sends the reports to the given endpoint. The following metrics are collected:

Installation

To use trace-vitals in your app, install it via npm as production dependencies:

npm install trace-vitals --save

Basic usage

The simplest usage of trace-vitals looks something like this:

import traceVitals from 'trace-vitals';

window.addEventListener("load", () => {
  traceVitals.then(({ traceVitals }) => {
    traceVitals("http://localhost:3000/analytics");
  });
});