Getting Started
Installation
Install the `nuxt-posthog` module using your preferred package manager.
Installation
- Install the
nuxt-posthog
module using your preferred package manager:
npx nuxi@latest module add nuxt-posthog
- Add
nuxt-posthog
to yournuxt-config.ts
file:
nuxt.config.ts
export default defineNuxtConfig({
modules: ['nuxt-posthog'],
});
- Add
POSTHOG_API_KEY
andPOSTHOG_API_HOST
environment variables:
.env
POSTHOG_API_KEY=<your_key>
POSTHOG_API_HOST=https://example.posthog.com