## Context
posthog-js in Next.js (App Dir) throws `RangeError: Maximum call stack size exceeded` from `posthog.capture` and other internals; in one case Sentry reported thousands of error events. Also seen with Vue and in staging environments.

## Verified resolution
Root cause identified by reporters and confirmed by maintainers (pauldambra, lucasheriques): PostHog was initialized twice, once via the JS snippet (possibly through Google Tag Manager with an `All Pages` trigger that fires on every SPA navigation) and once via `posthog.init()` in code, creating an infinite re-init loop. Maintainer lucasheriques merged a guard against snippet double-install (Sept 2025) and marandaneto closed it as fixed. Agent rule: initialize exactly one way, snippet OR init(), never both, and for SPAs don't use GTM triggers that fire per client-side navigation.