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
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
Related Packages
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 | |
| 0.0.12 | ^3.0 | MIT | |
| 0.0.11 | ^3.0 | MIT | |
| 0.0.10 | ^3.0 | MIT | |
| 0.0.9 | ^3.0 | MIT | |
| 0.0.8 | ^3.0 | MIT | |
| 0.0.7 | ^3.0 | MIT | |
| 0.0.6 | ^3.0 | MIT | |
| 0.0.5 | ^3.0 | MIT | |
| 0.0.4 | ^3.0 | MIT | |
| 0.0.3 | ^3.0 | MIT | |
| 0.0.2 | ^3.0 | MIT | |
| 0.0.1 | ^3.0 | MIT |