Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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