nuxt-chiffre

Chiffre Analytics for Nuxt.js

Usage no npm install needed!

<script type="module">
  import nuxtChiffre from 'https://cdn.skypack.dev/nuxt-chiffre';
</script>

README

Chiffre Analytics for Nuxt.js

Add Chiffre Analytics to your nuxt.js application

NPM Version GitHub Action CI/CD Coverage Status

This Nuxt.js module automatically sends first page and route change events to Chiffre Analytics

Setup

Install with:

npm install nuxt-chiffre
// or
yarn add nuxt-chiffre

Add nuxt-chiffre to modules section of nuxt.config.js:

export default {
  modules: [
    ['nuxt-chiffre'],
  ],
  chiffre: {
    projectId: '<chiffre-project-id>',
    publicKey: '<chiffre-public-key>',
    debug: false
  }
}

Module Options

projectId (required)

The Chiffre project identifier.

publicKey (required)

The Chiffre project public key.

debug

  • Default: false

By default, the module is only enabled if:

  • projectId is defined
  • publicKey is defined
  • Nuxt.js is not in development mode
  • process.env.NODE_ENV is set to production

If debug is true, the module will always be enabled.

License

MIT - Made by Romain Clement.