mixpanel-nuxt

Mixpanel module for Nuxt
19,992 7
Install
npm install mixpanel-nuxt
Latest Version:1.0.0
Vue:3
License:MIT
Last Updated:Oct 20, 2026
Links: GitHub  ·  npm
Maintainer: joao_pedro_as51

mixpanel-nuxt

Mixpanel integration for Nuxt.

npm version npm downloads License Nuxt

Track browser and server events with the official Mixpanel SDKs.

Highlights

  • 🖱️ Browser events. Access the browser SDK through useMixpanel().
  • 🖥️ Nitro events. Use the Node SDK in server routes, plugins and utilities.
  • 🔄 SSR support. Browser tracking stays inactive during SSR and initializes in the browser.
  • 🧭 Vue Router integration. Record pageviews automatically as users navigate.
  • 📄 Page meta. Set custom properties or disable tracking for individual pages.
  • 🪝 Runtime hooks. Enrich pageviews with async data or skip them before they are sent.

Documentation

The full documentation includes setup, integrations and API references.

Install

pnpm add -D mixpanel-nuxt
npm / yarn / bun
npm install --save-dev mixpanel-nuxt
yarn add --dev mixpanel-nuxt
bun add --dev mixpanel-nuxt

Requires Nuxt 4.6 or later.

Usage

Register the module and set your project token:

export default defineNuxtConfig({
  modules: ['mixpanel-nuxt'],
  mixpanel: {
    client: {
      token: 'your-project-token',
    },
  },
})

Track an event with useMixpanel():

<script setup lang="ts">
const mixpanel = useMixpanel()

function downloadReport() {
  mixpanel.track('Report downloaded', { format: 'csv' })
}
</script>

<template>
  <button @click="downloadReport">Download report</button>
</template>

License

MIT

Related Packages

@privyid/nuxt-csrf

Module CSRF for NUXT

26,088 9
nuxt-radash

radash for Nuxt

10,601 20
gsap-nuxt-module

GSAP integration for Nuxt.

8,932 37
@docus/core-edge

The Docus core.

8,638
@docus/app-edge

The Docus default app.

8,488

Version History

Version Released Vue License
1.0.0 ^3.0 MIT
0.0.17 ^3.0 MIT
0.0.16 ^3.0 MIT
0.0.15 ^3.0 MIT
0.0.13 ^3.0 MIT