Socket
Book a DemoInstallSign in
Socket

nuxt-vitals

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-vitals

Web Vitals for Nuxt.js

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

nuxt-vitals

Web Vitals: Essential module for a healthy Nuxt.js

Web Vitals is an initiative by Google to provide unified guidance for quality signals that are essential to delivering a great user experience on the web.

Installation

npm install --save-dev nuxt-vitals # or yarn add --dev nuxt-vitals

Setup

Add nuxt-vitals to buildModules section of nuxt.config.js

export default {
  buildModules: [
    ['nuxt-vitals', { 
      // Tracking ID (required) { string }
      // Replace UA-XXXXXXXX-X by your Google Analytics tracking ID.
      trackingID: 'UA-XXXXXXXX-X',
      // Event Category (optional) { string }, default 'Web Vitals'
      eventCategory: 'Some Category',
      // Debug (optional) { number } default 0 
      debug: 1,
      disabled: false
    }]
  ]
}

:warning: If you are using Nuxt < v2.9 you have to install the module as a dependency (No --save-dev or --dev flags) and use modules section in nuxt.config.js instead of buildModules.

Google Analitycs Event Measurement

Behavior > Events > Overview > Event Category > Event Action

Events Actions

License

MIT

Keywords

nuxt

FAQs

Package last updated on 22 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts