PostHog module for nuxt
npm install nuxt-posthog[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]
- ✨ Release Notes
- 📖 Documentation
- Nuxt 3 ready
- Typescript support
- Automatic configuration
- Vue global directives for PostHog events
1. Add nuxt-posthog dependency to your project
``bash`
npx nuxi@latest module add nuxt-posthog
2. Add nuxt-posthog to the modules section of nuxt.config.ts
`js`
export default defineNuxtConfig({
modules: ['nuxt-posthog'],
});
That's it! You can now use PostHog in your Nuxt app ✨
`bashInstall dependencies
pnpm install
[npm-version-src]: https://img.shields.io/npm/v/nuxt-posthog/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-version-href]: https://npmjs.com/package/nuxt-posthog
[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-posthog.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-downloads-href]: https://npmjs.com/package/nuxt-posthog
[license-src]: https://img.shields.io/npm/l/nuxt-posthog.svg?style=flat&colorA=18181B&colorB=28CF8D
[license-href]: https://npmjs.com/package/nuxt-posthog
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
[nuxt-href]: https://nuxt.com