Getting Started

Installation

Install the `nuxt-posthog` module using your preferred package manager.

Installation

  1. Install the nuxt-posthog module using your preferred package manager:
npx nuxi@latest module add nuxt-posthog
  1. Add nuxt-posthog to your nuxt-config.ts file:
nuxt.config.ts
export default defineNuxtConfig({
  modules: ['nuxt-posthog'],
});
  1. Add POSTHOG_API_KEY and POSTHOG_API_HOST environment variables:
.env
POSTHOG_API_KEY=<your_key>
POSTHOG_API_HOST=https://example.posthog.com
Refer to PostHog's documentation to learn more about API Key and API Host

Copyright © 2024