Autocapture now stays off on projects that opted out, even when the remote config request fails — previously a network error would enable autocapture and persist that state across page loads.
PostHog JS
Initial publish of the @posthog/browser-common package.
Prompts.get() now accepts a label option to fetch the prompt version a label currently points to. Labeled fetches are cached separately, and a warning is logged when the server does not resolve the requested label.
Dead clicks autocapture now captures touch swipe gestures that produce no observable screen change as $dead_swipe events, surfacing failed navigations on touch devices. Also fixed a synchronous throw from a monkey-patched window.fetch that could leak as an unhandled exception.
Dead clicks autocapture now captures touch swipe gestures that produce no observable screen change as $dead_swipe events, surfacing failed navigations on touch devices. Configurable via capture_dead_swipes, swipe_threshold_px, and max_dead_swipes_per_page_load.
Next.js dynamic rendering bailouts now propagate correctly when bootstrapping flags, and Pages Router request context is required in server identity resolver types.
Avoids Next.js Edge runtime warnings for native compression and fatal error handling.
Avoids Next.js Edge runtime warnings for native compression and fatal error handling.
Fixed the default Node.js event flush interval to 5 seconds.
$feature_flag_called events now include a $feature_flag_has_experiment boolean sourced from the server's flag metadata, indicating whether a flag is part of an experiment.
$feature_flag_called events now include a $feature_flag_has_experiment boolean sourced from the server's flag metadata, sent only when the server explicitly reports the value.
$feature_flag_called events now carry a $feature_flag_has_experiment boolean sourced from the server's has_experiment flag metadata, sent only when the server explicitly reports the value.
$feature_flag_called events now include a $feature_flag_has_experiment boolean sourced from the server's flag metadata, sent only when the server explicitly reports has_experiment.
$feature_flag_called events now include a $feature_flag_has_experiment boolean sourced from the server's flag metadata when available.
The Pages Router PostHogProvider.bootstrap prop is removed; its value moves to clientOptions.bootstrap. App Router server-evaluated bootstrap now uses fresh evaluated flags and payloads while preserving configured identity and session fields.
Declares $ai_cache_reporting_exclusive: false on OpenAI wrapper events so ingestion no longer double-bills cached input tokens for Claude models served through OpenAI-compatible hosts. The flag stays unset when callers pass their own token counts through posthogProperties.
Fixed Pages Router server-side rendering feature flag hooks when Node loads the CommonJS posthog-js entrypoint.
Raised the default maxQueueSize from 1000 to 10000 for backend workloads that burst-enqueue events synchronously, reducing the risk of silently dropping events under load. The maxQueueSize option still overrides the default.
Session recording now catches NotAllowedError from host pages that assign cross-document CSSStyleSheet to adoptedStyleSheets, and TypeError: Converting circular structure to JSON when replay event data contains a circular reference.
Logs a warn (previously info) level message when the local event queue is full and drops the oldest event, aligning with the severity used by PostHog Python and Rust SDKs.
