vite-vitals

1.0.2 • Public • Published

vite-vitals

Extend Vite with ability to send Core Web Vitals to Google Analytics.

Install

$ npm i -D vite-vitals

Setup

// vite.config.js
import vitals from 'vite-vitals'
 
export default {
  plugins:[vitals({
    // Tracking ID (required) { string }
    trackingID: 'UA-XXXXXXXX-X',
    // // Event Category (optional) { string }
    eventCategory: 'Vite Vitals',
    // Debug (optional) { boolean }
    debug: false
  })]
}

Readme

Keywords

Package Sidebar

Install

npm i vite-vitals

Weekly Downloads

21

Version

1.0.2

License

MIT

Unpacked Size

4.13 kB

Total Files

4

Last publish

Collaborators

  • dlbr