astro-posthog
v1.0.2
Published
Posthog integration for Astro
Maintainers
Readme
GDRP friendly tracking in your astro app / site 🚀
Installation
Installation using the Astro CLI
Using the Astro CLI is the recommended way to setup integrations in Astro.
# npm
npx astro add astro-posthog
# pnpm
pnpm dlx astro add astro-posthogManual Installation
When the automatic setup from Astro is not an option for you, feel free to install the package manually.
# npm
npm install astro-posthog
# pnpm
pnpm add astro-posthogUsage
import { defineConfig } from 'astro/config';
import posthog from "astro-posthog";
// https://astro.build/config
export default defineConfig({
integrations: [
posthog({
posthogKey: 'phc_your-posthog-key',
api_host: 'https://eu.i.posthog.com',
defaults: '2025-05-24',
person_profiles: 'identified_only',
}),
]
});
