@buraksaraloglu/trace-vitals

1.0.0 • Public • Published

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");
  });
});

Readme

Keywords

Package Sidebar

Install

npm i @buraksaraloglu/trace-vitals

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

14.6 kB

Total Files

16

Last publish

Collaborators

  • buraksaraloglu