@moirei/nuxt-analytics
v0.1.3
Published
Analytics library for Nuxt 3
Downloads
4
Readme
Nuxt Analytics
A Nuxt library for tracking custom events, page views, content/component views and identify visitors. Easily enable/disable channels and adapt event names and payload formats.
Features
- For Nuxt 3
- ☑ Track custom events
- ☑ Track custom page views
- ☑ Track click or seen events on any element/component
- ☑ Auto track page views
- ☑ Per channel/event formatting with Adapters
- ☑ 9 inbuilt channels
- ☑ 2 inbuilt adapters
- ☑ Custom channels and adapters
- ☑ Queue system to avoid data loss with p-queue
- ☑ Analytics event hooks
- ☐ Typed event names and props
- ☐ Improved performance with Partytown
- ... and more
Quick Setup
- Add
nuxt-analytics
dependency to your project
# Using pnpm
pnpm add -D @moirei/nuxt-analytics
# Using yarn
yarn add --dev @moirei/nuxt-analytics
# Using npm
npm install --save-dev @moirei/nuxt-analytics
- Add
nuxt-analytics
to themodules
section ofnuxt.config.ts
export default defineNuxtConfig({
modules: ["@moirei/nuxt-analytics"],
});
💻 Development
- Clone repository
- Install dependencies using
yarn install
- Prepare using
yarn prepare