JSPM

  • Created
  • Published
  • Downloads 507203
  • Score
    100M100P100Q201498F
  • License MIT

Package Exports

  • @amplitude/plugin-web-vitals-browser
  • @amplitude/plugin-web-vitals-browser/lib/cjs/index.js
  • @amplitude/plugin-web-vitals-browser/lib/esm/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@amplitude/plugin-web-vitals-browser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


@amplitude/plugin-web-vitals-browser (beta)

This plugin is in beta at the moment, naming and interface might change in the future.

Autocaptures web-vitals metrics (INP, LCP, FCP, CLS)

Installation

This package is published on NPM registry and is available to be installed using npm and yarn.

# npm
npm install @amplitude/plugin-web-vitals-browser@beta

# yarn
yarn add @amplitude/plugin-web-vitals-browser@beta

Usage

import * as amplitude from '@amplitude/analytics-browser';
import { webVitalsPlugin } from '@amplitude/plugin-web-vitals-browser';

2. Instantiate the plugin

const plugin = webVitalsPlugin();

3. Install plugin to Amplitude SDK

amplitude.add(plugin);

4. Initialize Amplitude SDK

amplitude.init('API_KEY');