0.0.13 • Published 10 months ago

mixpanel-nuxt v0.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

mixpanel-nuxt

npm version npm downloads License Nuxt

Quick Setup

  1. Add mixpanel-nuxt dependency to your project
# Using pnpm
pnpm add -D mixpanel-nuxt

# Using yarn
yarn add --dev mixpanel-nuxt

# Using npm
npm install --save-dev mixpanel-nuxt
  1. Add mixpanel-nuxt to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    'mixpanel-nuxt'
  ],
})

Basic usage

You can use the provided composable to access Mixpanel anywhere.

const mixpanel = useMixpanel()
mixpanel.track('My event')

Configuration

You just need to set your Mixpanel token in the module options and you're good to go! By default process.env.MIXPANEL_TOKEN is used.

You can also disable the module by setting disabled: true.

export default defineNuxtConfig({
  modules: [
    'mixpanel-nuxt'
  ],
  mixpanel: {
    token: 'your-token',
    disabled: false,
    config: {
      // Mixpanel config
    }
  }
})

Development

# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release
0.0.10

11 months ago

0.0.11

11 months ago

0.0.12

11 months ago

0.0.13

10 months ago

0.0.9

11 months ago

0.0.8

11 months ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago