Skip to content

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

License

Notifications You must be signed in to change notification settings

daliborgogic/vite-vitals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  })]
}

ToDo

  • detect if router is used

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published