@moirei/nuxt-analytics
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

npm version npm downloads License Nuxt

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

  1. 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
  1. Add nuxt-analytics to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: ["@moirei/nuxt-analytics"],
});

💻 Development

  • Clone repository
  • Install dependencies using yarn install
  • Prepare using yarn prepare

Readme

Keywords

none

Package Sidebar

Install

npm i @moirei/nuxt-analytics

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

137 kB

Total Files

73

Last publish

Collaborators

  • augustusnaz