PostHog — product analytics
posthog/analytics · version 1
envs add posthog/analytics
This declares the keys below in your catalog and sets none of them. A template is a schema for keys; it never carries a value.
| Key | Needed | Kind | Notes |
|---|---|---|---|
NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN |
required | config | PostHog says the project token is public and safe to expose in client-side code, and that it grants no access to sensitive data. The NEXT_PUBLIC_ prefix is what makes it reach the browser in Next.js; another framework spells that part differently.. Shape ^phc_[A-Za-z0-9]{10,}$. where to get it |
NEXT_PUBLIC_POSTHOG_HOST |
required | config | Which PostHog region receives the events. An address, and public for the same reason as the token.. where to get it |
POSTHOG_PERSONAL_API_KEY |
optional | secret | For scripts and automations tied to your own account. PostHog says personal keys must be kept private and not used in the frontend, so this is the opposite of the token above. The name is convention; PostHog documents the key, not a variable. Rolling one invalidates the old value.. Shape ^phx_[A-Za-z0-9]{10,}$. where to get it |