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