Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daliborgogic/vite-vitals
Extend Vite with ability to send Core Web Vitals to Google Analytics.
https://github.com/daliborgogic/vite-vitals
Last synced: 9 days ago
JSON representation
Extend Vite with ability to send Core Web Vitals to Google Analytics.
- Host: GitHub
- URL: https://github.com/daliborgogic/vite-vitals
- Owner: daliborgogic
- License: mit
- Created: 2020-11-07T11:15:06.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-08T08:54:23.000Z (about 4 years ago)
- Last Synced: 2024-10-17T19:19:02.749Z (27 days ago)
- Language: JavaScript
- Homepage:
- Size: 61.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vite-vitals
> Extend Vite with ability to send Core Web Vitals to Google Analytics.
## Install
```bash
$ npm i -D vite-vitals
```## Setup
```javascript
// 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