nuxt-posthog
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

Nuxt PostHog

npm version npm downloads License Nuxt

PostHog module for Nuxt

Features

  • Nuxt 3 ready
  • Typescript support
  • Automatic configuration
  • Vue global directives for PostHog events

Quick Setup

  1. Add nuxt-posthog dependency to your project

    npx nuxi@latest module add nuxt-posthog
  2. Add nuxt-posthog to the modules section of nuxt.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

Readme

Keywords

none

Package Sidebar

Install

npm i nuxt-posthog

Weekly Downloads

267

Version

1.5.0

License

MIT

Unpacked Size

16.2 kB

Total Files

23

Last publish

Collaborators

  • cmitjans