A simple module for using Panelbear analytics with Nuxt.js
Panelbear has closed down, and so has this repo You can check out their new service Cronitor: https://cronitor.io/
npm i @ryntab/panel-bear
Then include the module in your config.
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
'@ryntab/panel-bear',
],
Add the configuration settings to your nuxt.config.js
, for the minimum configuration you need to pass your Panelbear site ID. Where to find your site ID
panelBear: {
id: 'YOUR-PROJECT-ID',
},
This can also be done by passing along your configuration object in the module.
modules: [
["@ryntab/panel-bear",{
id: "HYleEXITkCD",
}],
],
This module supports all Panelbear configuration options. @Configuration Docs
panelBear: {
id: 'YOUR-PROJECT-ID',
autoTrack: false,
honorDNT: true,
includeURLFragment: true,
enabled: true
},
For tracking locally, enable debugging mode in your config. @Local Development
panelBear: {
id: 'YOUR-PROJECT-ID',
debug: true,
},
To track custom events, you can use the plugins track property. Event names must not include spaces or special characters.
this.$panelBear.track("Custom-Event");