nuxt-posthog
nuxt-posthog
Integrate PostHog into your application with minimal configuration
Nuxt PostHog
Features
- Nuxt 3 ready
- Typescript support
- Automatic configuration
- Vue global directives for PostHog events
Quick Setup
- Add
nuxt-posthog
dependency to your project# Using pnpm pnpm add -D nuxt-posthog # Using yarn yarn add --dev nuxt-posthog # Using npm npm install --save-dev nuxt-posthog
- Add
nuxt-posthog
to themodules
section ofnuxt.config.ts
export default defineNuxtConfig({ modules: ['nuxt-posthog'], });
That's it! You can now use PostHog in your Nuxt app ✨
Development
# Install dependencies
pnpm install
# Generate type stubs
pnpm run dev:prepare
# Develop with the playground
pnpm run dev
# Build the playground
pnpm run dev:build
# Run ESLint
pnpm run lint
# Run Vitest
pnpm run test
pnpm run test:watch
# Release new version
pnpm run release