# What changed in posthog-js

> 825 changes in posthog-js 1 from its official release notes, upgrade guides and advisories: 36 breaking, 13 deprecations, 20 security, 186 new APIs and options. Each one cited. Sources checked 2026-10-17. HTML: https://unstale.sh/npm/posthog-js/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## posthog-js 1

### Breaking changes

- Calls before logging setup are now dropped instead of buffered. (1.438.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.7)
- Calls before logging setup are now dropped instead of buffered. (1.438.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.7)
- The content ignorelist now suppresses false rageclicks from carousel and pager controls, with expanded keyword and control-label matching; set it to false to retain capture. (1.438.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.1)
- Default network metric attributes now use OTel HTTP client semantic conventions instead of the previous attribute names. (1.434.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.0)
- Sending and retention of group identification now depend on person processing mode and group association behavior. (1.426.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.426.0)
- identify now requires a distinct ID, matching the existing runtime validation. (1.426.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.426.0)
- Bigint attributes on logs, metrics, and spans are sent as int64 rather than strings. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- Values from the closest element now take precedence when the same property exists on multiple ancestors. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- Prefilled surveys no longer send survey sent before completion, and partial events include only auto-advanced answers. (1.419.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.419.3)
- Browser-injected user script exceptions are no longer captured by default; set this option to true to keep capturing them. (1.418.16) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.16)
- Reports without a code position no longer receive a document-URL stack frame, so these exceptions arrive without a stack trace. (1.418.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.6)
- Non-repeatable triggered survey activation is now scoped to the triggering session and cleared in a new session. (1.407.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.0)
- When remote config omits autocapture_opt_out, the SDK retains the last known server value instead of enabling autocapture. (1.406.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.406.0)
- Enum members no longer work as standalone type annotations; use the exported union types instead. Runtime values are unchanged. (1.400.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.400.1)
- Stops sending and drops log batches after 3 consecutive status 0 failures while online; the online event reopens it, while genuine offline periods still queue for reconnect. (1.396.9) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.9)
- host moves from resource attributes to record attributes in console logs; saved queries using the old location need updating. (1.392.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.392.0)
- The canonical console-log person identifier changes from distinct_id to posthogDistinctId. (1.392.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.392.0)
- Console-log session identifiers move from resource.attributes.session.id to the standard sessionId record attribute. (1.392.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.392.0)
- Console-log page URLs move from location.href to the standard url.full record attribute; saved queries using the old name need updating. (1.392.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.392.0)
- window.id moves from resource attributes to record attributes in console logs; saved queries using the old location need updating. (1.392.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.392.0)
- Event triggers no longer support arming a survey on one full page load and displaying it on a later one; use audience targeting instead. (1.390.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.390.1)
- Event-triggered survey activations remain in memory until shown, then persist across reloads; unshown activations no longer reappear after reload. (1.390.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.390.1)
- Symbol-only keywords match element text exactly, and default stepper buttons are ignored, changing suppression of controls containing symbols such as `>` or `<`. (1.382.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.382.0)
- OpenTelemetry logs dependencies are no longer installed transitively by consumers; projects importing them directly must declare their own dependencies. (1.379.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.379.1)
- Writing to a resolve ticket is no longer allowed; developers must start a new ticket instead. (1.372.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.372.0)
- Renames the public tracing-headers configuration option for linking LLM traces to session replays. (1.371.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.371.0)
- CLI and sourcemap utilities moved from @posthog/core to @posthog/plugin-utils, removing cross-spawn from React Native dependencies. (1.364.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.364.5)
- rrweb and related dependencies are no longer placed directly on window by posthog-recorder. (1.352.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.352.1)
- The legacy config loading path was removed. (1.350.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.350.0)
- The __preview_remote_config gate was removed from config loading. (1.350.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.350.0)
- Renames setTestUser to setInternalOrTestUser; update calls to the new API name. (1.341.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.341.0)
- Attribution is now opt-in by default, reducing memory usage. (1.336.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.336.2)
- The minimum supported Preact version is now 10.28.2. (1.335.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.335.4)
- Renamed evaluationEnvironments to evaluationContexts to clarify that values specify evaluation contexts such as web, mobile, or checkout. (1.331.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.331.0)
- extendUrlParams now replaces URL parameters by default unless the caller explicitly chooses otherwise. (1.280.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.280.1)
- rrweb types are no longer required as a peer dependency when using posthog-js. (1.279.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.279.0)

### Security

- Fetch requests now default to strict-origin, omitting page paths and query strings from referrers. (1.433.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.3)
- Prevents buffered session replay data from crossing projects that share a persistence name during page navigation. (1.431.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.431.6)
- Replay URL privacy settings now apply to URL values in captured JSON-LD payloads. (1.428.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.10)
- Replay redaction preserves safe JSON-LD properties and allowlisted structure while restricting IDs, types, and payloads. (1.427.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.3)
- Legacy product tour HTML is sanitized before rendering, reducing the risk of unsafe HTML being rendered. (1.423.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.2)
- Captured console records are now dropped when the user opts out. (1.421.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.421.2)
- Clipboard autocapture now records paste interactions without collecting the pasted text. (1.420.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.420.0)
- Initial navigation and performance-timing entries now use the masking callback, preserving privacy while retaining required replay timing metadata when filtered. (1.413.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.413.1)
- Masks all source DOM string attributes, including rendering attributes and synthesized form values, with reduced replay fidelity. (1.413.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.413.0)
- Configuring maskRegionsFn disables canvas pixel serialization in DOM full snapshots, preventing unmasked canvas stills from being embedded. (1.408.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.408.0)
- When ancestor checks for ph-no-capture or ph-sensitive cannot finish, the element is treated as not capturable. (1.399.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.399.5)
- Auto-captured console logs now pass through logs.beforeSend, allowing sensitive console output to be redacted or dropped before sending. (1.392.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.392.0)
- Product Tours styles now use the CSP stylesheet preparation hook, improving compatibility with Content Security Policy requirements. (1.391.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.8)
- Credential-bearing headers are redacted in both requests and responses, including custom names containing credential-shaped substrings, preventing token and cookie capture. (1.391.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.7)
- Style mutation diffing no longer causes style-src-attr CSP violations. (1.391.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.3)
- Style and script elements appended by site apps now receive CSP nonce preparation hooks. (1.388.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.388.1)
- Consumers no longer install transitive protobufjs from posthog-js, avoiding its unsafe-eval Content Security Policy issue. (1.379.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.379.1)
- Avoids cross-origin property access when calling the previous unhandled rejection handler. (1.372.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.372.5)
- An iframe leak in the untainted prototype is prevented, along with unnecessary iframe creation. (1.365.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.365.3)
- Textarea innerText mutations are now masked during recording. (1.363.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.6)

### Deprecations

- The preview cookie conflict option is deprecated in favor of cookieWinsOnConflict. (1.418.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.0)
- Deprecates the double-underscore bucket-size option while continuing to honor it as a fallback. (1.400.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.400.0)
- Deprecates the double-underscore refill-rate option while continuing to honor it as a fallback. (1.400.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.400.0)
- __preview_disable_beacon is deprecated in favor of disable_beacon. (1.384.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.384.3)
- Deprecated as a no-op because session replay lazy loading is now the default. (1.384.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.384.2)
- The no-op browser SDK config option is deprecated because the SDK already uses the /flags/?v=2 endpoint by default. (1.383.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.383.3)
- __add_tracing_headers remains available as a deprecated alias for tracing_headers. (1.380.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.380.0)
- addTracingHeaders remains available as a deprecated alias for tracing_headers. (1.380.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.380.0)
- The old tracing-headers configuration alias continues to work but is deprecated on the browser SDK. (1.371.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.371.0)
- Manual capture of $exception now produces a warning. (1.351.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.351.0)
- Element steps are deprecated as product tour steps are unified with modal steps. (1.341.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.341.2)
- The posthog.init option remains functional but logs a deprecation warning and will be removed in a future major version. (1.331.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.331.0)
- The package is deprecated, so developers should avoid adopting it for new usage. (1.298.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.298.0)

### New APIs and options

- WebMCPExtensions is now exported from the slim extension-bundles entry point, making it available to consumers of that entry point. (1.438.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.6)
- Adds a private opt-in to preserve application stacks for failed fetch requests. (1.438.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.3)
- Adds opt-in capture of WebMCP tool calls for MCP Analytics. (1.437.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.437.0)
- A new opt-in helper flags likely WebView bots for tagging or dropping events via before_send; default SDK behavior remains unchanged. (1.436.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.436.0)
- OpenAI Ads click identifier oppref is captured as a campaign parameter, included on events, and stored as $initial_oppref. (1.435.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.6)
- Adds a subscription API for survey eligibility updates with safe unsubscribe and recoverable load-error reporting. (1.435.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.0)
- Adds a config limit for feature flag request retries, defaulting to 1 and allowing 0 to disable retries. (1.434.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.3)
- The Meta browser ID is captured as a person property so backend conversions can use it later. (1.433.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.0)
- Setting this switch to false disables reading the Meta `_fbc` and `_fbp` cookies. (1.433.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.0)
- Adds a resetError callback to React error-boundary fallbacks, allowing applications to retry rendering without remounting the boundary. (1.432.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.432.0)
- Adds network metrics configuration to record fetch and XMLHttpRequest durations as histograms, with optional custom names and attributes. (1.431.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.431.0)
- Adds require-able bundle entry points for desktop apps and CSP-restricted builds, avoiding deep imports from dist/. (1.430.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.430.0)
- Segment integration accepts filterProperties to filter PostHog-generated enrichment properties before events reach destinations. (1.429.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.0)
- Adds best-effort in-app browser attribution using $webview_app and $webview_app_version while preserving existing browser values. (1.428.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.0)
- Captured replay events now expose why an epoch's recording buffer is being held. (1.427.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.3)
- Browser identify calls now support reuseAnonymousId. (1.427.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.0)
- Session replay can opt into a DOM mutation byte budget; excess mutations are dropped and recording resyncs with a full snapshot. (1.422.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.422.2)
- The DOM mutation budget refills at 25KB/s by default, controlling the sustained mutation rate before mutations are dropped. (1.422.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.422.2)
- Captured events now report discarded session-recorder attribute changes so developers can query whether recordings are affected. (1.422.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.422.0)
- Adds opt-in Schema.org JSON-LD capture to session replay, emitting sanitized JSON-LD as custom replay events and excluding script elements from snapshots. (1.420.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.420.0)
- Configure web vitals attribution with false, true, or an array naming the metrics. (1.419.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.419.0)
- Now accepts path, search, and hash options to trigger $pageview events when selected URL components change during SPA navigation. (1.418.13) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.13)
- Adds an option that keeps shared cross-subdomain identity and session state ahead of stale per-origin localStorage. (1.418.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.0)
- A new observability payload field reports focus-change delay for dead-click detection. (1.417.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.417.1)
- Adds a fallback mode for strict script versioning to support legacy asset paths when needed. (1.417.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.417.0)
- Abandoned deferred stylesheet work is now counted through a dedicated debug telemetry event. (1.416.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.416.1)
- Residual deferred stylesheet failures are now counted through a dedicated debug telemetry event. (1.416.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.416.1)
- Adds reset options that apply bootstrapped identity, feature flag, and session values after reset while preserving the legacy boolean argument. (1.416.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.416.0)
- Adds rewriteRequestPath to customize API, feature flag, and asset paths for reverse proxies. (1.416.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.416.0)
- Adds an appearance field to show an optional survey intro screen before question 1. (1.415.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.0)
- Exports a constant representing the intro screen preview page index. (1.415.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.0)
- Adds the button text setting used to dismiss the optional survey intro screen. (1.415.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.0)
- Adds the description text for the optional survey intro screen. (1.415.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.0)
- Adds the content type setting for the intro screen description. (1.415.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.0)
- Adds the header text for the optional survey intro screen. (1.415.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.0)
- Adds previewPageIndex -1 to preview the survey intro screen. (1.415.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.0)
- Exports the unavailable-reason type from package entry points so consumers can name the type. (1.414.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.414.0)
- Exposes the specific reason the conversations API is unavailable, enabling callers to record why they fall back to another channel. (1.414.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.414.0)
- Adds per-attribute control over the final serialized value in session replay. (1.413.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.413.0)
- Adds a captured-event metric reporting deferred stylesheet work. (1.412.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.412.0)
- Adds a captured-event metric reporting the CSS rule count associated with the slowest full snapshot. (1.412.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.412.0)
- Adds a captured-event metric reporting the slowest full snapshot duration. (1.412.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.412.0)
- Adds a captured-event metric reporting the node count associated with the slowest full snapshot. (1.412.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.412.0)
- Adds a captured-event metric reporting the slowest full snapshot stylesheet processing duration. (1.412.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.412.0)
- Adds a captured-event metric reporting the slowest incremental mutation batch duration. (1.412.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.412.0)
- Adds a stylesheet CSSRule budget per snapshot, defaulting to 10,000; setting 0 restores unbounded inlining. (1.412.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.412.0)
- Opting in scopes web vitals to soft navigation entries, preventing inflated measurements after SPA route changes. (1.411.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.411.0)
- Adds sampling controls to disable or throttle mousemove capture and optionally mouseInteraction in session replay. (1.410.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.0)
- Adds a browser-v1 client adapter for shared extensions with analytics, request, persistence, replayed remote-config outcomes, and synchronous best-effort cleanup. (1.409.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.409.1)
- Adds getInjectedReleaseId() to @posthog/core for reading the release ID injected by posthog-cli. (1.409.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.409.0)
- Adds an opt-in time budget for yielding during long seek rebuilds, preventing page blocking; newer seeks cancel in-flight rebuilds. Default 0 preserves synchronous behavior. (1.408.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.408.1)
- Adds a per-frame canvas masking function that paints returned CSS-pixel regions black before encoding, enabling masking of canvas-rendered content DOM masking cannot see. (1.408.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.408.0)
- Accepts defaultValue when a flag has no value and narrows the return type to boolean. (1.407.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.0)
- The pending session recording trigger buffer interval is now configurable. (1.405.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.405.2)
- Adds configurable dead swipe capture, enabled by default, for touch gestures that produce no observable screen change. (1.404.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.404.0)
- Adds a per-page-load cap of 10 dead swipe captures by default. (1.404.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.404.0)
- Adds the pixel threshold used to detect dead swipes, defaulting to 30 pixels. (1.404.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.404.0)
- Touch swipes with no observable screen change are now captured as `$dead_swipe` events. (1.404.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.404.0)
- $feature_flag_called events now include a boolean indicating whether the feature flag has an experiment when explicitly reported by the server. (1.403.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.403.0)
- Adds count, gauge, and histogram metrics recording to posthog-node, with in-memory aggregation and flushing to /i/v1/metrics. (1.402.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.402.1)
- Adds the current masked hostname to every session recorder $snapshot event, unless masking removes it or it cannot be parsed as a URL. (1.402.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.402.0)
- Adds an attribute allowlist passed to MutationObserver, reducing recording CPU from mutations to unlisted attributes. (1.401.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.401.0)
- Adds exceptionRateLimiterBucketSize as a first-class error tracking rate-limiter option. (1.400.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.400.0)
- Adds exceptionRateLimiterRefillRate as a first-class error tracking rate-limiter option. (1.400.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.400.0)
- Adds metrics configuration for service identity, flush timing, series limits, and a before-send hook. (1.399.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.399.0)
- Adds an alpha statsd-style metrics client with count, gauge, and histogram methods that pre-aggregate samples and periodically flush metrics. (1.399.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.399.0)
- Adds a survey appearance option that prevents open-text questions from stealing focus in embedded surveys; defaults to false. (1.398.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.398.0)
- Custom survey integrators can mark surveys as seen while honoring already-seen and wait-period checks. (1.396.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.6)
- Browser clients now support graceful shutdown, best-effort event flushing, and always-resolving teardown. (1.396.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.6)
- Adds a config option to provide the logical URL used for client-side URL targeting; defaults to window.location.href when unset. (1.396.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.0)
- Adds a synchronous API returning cached feature flags as structured FeatureFlagResults without sending a $feature_flag_called event. (1.395.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.395.0)
- Adds an option to opt out of capturing and sending the Android Chromium device model. (1.394.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.394.0)
- Adds opt-in streaming network body capture that bounds memory and pre-request latency for very large bodies. (1.393.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.393.1)
- Adds an option to strip URL fragments from automatically captured URLs; it is enabled automatically when config.defaults is '2026-06-25' or later. (1.393.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.393.0)
- Auto-captured console logs identify their console method through log.source, while manual logs leave it unset. (1.392.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.392.0)
- The canvas FPS-snapshot observer accepts an optional resolution scale record option for downscaling captured frames. (1.391.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.0)
- Adds a fractional canvas capture scale to reduce replay frame pixel area while preserving the canvas display dimensions and aspect ratio. (1.391.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.0)
- Adds a log hook to inspect, redact, modify, or drop records before sending, including logs from captureLog() and logger.*. (1.390.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.390.0)
- Adds CSS selector opt-outs that apply only to autocaptured web interactions. (1.388.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.388.0)
- Capture options now accept $unset and pass it through in browser capture payloads. (1.387.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.387.0)
- Adds a counterpart to setPersonProperties() for removing person properties without manually passing a $unset array in capture(). (1.387.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.387.0)
- Enables a Back button for multi-question web surveys, preserving branching navigation and prior answers while pruning abandoned-branch responses before submission. (1.386.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.0)
- Overrides the default Back button label in web surveys. (1.386.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.0)
- Adds survey-level translation support for the Back button label. (1.386.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.0)
- Adds survey-level translation support for the submit button label. (1.386.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.0)
- External dependency script versioning is now supported through the asset_host config option. (1.385.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.385.0)
- External dependency script versioning is now supported through the strict_script_versioning config option. (1.385.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.385.0)
- Adds a configuration option to detect the Google Search App as its own browser value. (1.384.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.384.0)
- Stores feature-flag configuration in a separate localStorage entry to reduce main-blob writes and cross-tab storage-event broadcasts. (1.383.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.383.0)
- Adds an opt-in config to prefer cookie values over localStorage when merging persistence state in localStorage+cookie mode, fixing cross-subdomain identify and session disconnects. (1.381.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.381.0)
- Adds the $sdk_dist_channel event property for browser SDK npm and cdn distribution channels. (1.379.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.379.0)
- Adds a config option to debounce localStorage and cookie writes while keeping in-memory props updates synchronous. (1.378.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.378.0)
- detectBrowser and detectBrowserVersion accept an optional BrowserDetectionHints argument with a brave flag for identifying Brave browsers without a user-agent marker. (1.377.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.377.0)
- Adds a boolean captured-event property showing whether starting the rrweb recorder was attempted. (1.376.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.376.4)
- Adds a config option to restrict browser feature flag remote evaluation to specific flag keys. (1.375.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.375.0)
- Adds a configuration option to exclude specific elements from dead-click detection without affecting autocapture, session replay, or heatmaps. (1.374.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.374.0)
- Adds a CSS class to exclude specific elements from dead-click detection without affecting autocapture, session replay, or heatmaps. (1.374.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.374.0)
- capture() now accepts an optional uuid on CaptureOptions. (1.373.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.373.0)
- React Native now supports translated survey rendering, with shared survey translation logic through @posthog/core. (1.372.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.372.6)
- Exposes the tracing-header fetch patch implementation from @posthog/core for reuse by non-browser SDKs. (1.371.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.371.0)
- Adds a preview flag for versioned browser lazy bundle asset paths. (1.369.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.369.2)
- Adds an API for sending structured log entries to PostHog logs. (1.368.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.368.0)
- Adds support for pre-loaded remote-config, allowing developers to use remote configuration loaded before initialization. (1.367.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.367.0)
- Adds customer side identification for developers using posthog-js. (1.366.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.366.0)
- Exposes the current survey question index on .survey-box, including link questions without input or rating elements. (1.365.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.365.4)
- Adds a tree-shakeable ESM entry point for slim builds. (1.363.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.5)
- Scopes $feature_flag_called deduplication to the current session. (1.361.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.361.0)
- Adds an internal method for wrapper SDKs to override $lib and $lib_version event properties. (1.361.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.361.0)
- Adds a serviceName option to the logs configuration. (1.361.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.361.0)
- Adds an Extension interface for authoring tree-shakable extensions. (1.358.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.358.0)
- Adds a local sampleRate configuration option for session recording. (1.357.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.357.0)
- A new recorder status was added for tracking recording state. (1.356.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.356.1)
- Adds a configuration option to prevent stale feature flag values. (1.356.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.356.0)
- Adds a configuration option to control automatic feature flag refresh frequency in long-running sessions. (1.356.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.356.0)
- Adds support for configuring a wait period for product tours. (1.355.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.355.0)
- Product tours can target users by device type. (1.354.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.354.3)
- Adds the ability to retrieve previous conversations. (1.352.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.352.0)
- Feature flag APIs can now return only values loaded from the server, excluding cached localStorage values. (1.351.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.351.4)
- Adds an animation option for tour banners, allowing developers to configure their presentation behavior. (1.351.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.351.3)
- Added support for localizing product tours. (1.349.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.349.0)
- Support for multiple tickets was added, enabling developers to work with more than one ticket. (1.348.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.348.0)
- Product tours now support customizable text for survey step buttons. (1.348.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.348.0)
- Adds a replay debug property indicating that the DOM depth limit was exceeded. (1.347.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.347.2)
- Added the OverrideFeatureFlagsOptions type to the PostHog interface. (1.345.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.345.5)
- displaySurvey now has an option to disable survey shown tracking. (1.345.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.345.1)
- Adds the $feature_flag_error property to $feature_flag_called events. (1.345.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.345.0)
- Added featureFlagsReloading to on() event types. (1.342.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.345.5), [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.342.0)
- Adds support for configuring widget position. (1.340.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.340.0)
- Adds isTestUser() for identifying test users. (1.339.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.339.0)
- Adds the test_user_hostname configuration option for identifying test users. (1.339.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.339.0)
- Product tours now support placing the banner in a custom container. (1.336.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.336.2)
- Adds the getFeatureFlagResult method for retrieving feature flag results. (1.336.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.336.0)
- Product tours now support linked flags. (1.335.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.335.0)
- Web vitals can now be used with or without attribution. (1.335.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.335.0)
- Adds a config option to control where external scripts are injected. (1.334.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.334.0)
- Popover surveys now support prefilled questions. (1.332.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.332.0)
- Adds the useThumbSurvey hook for thumb surveys. (1.332.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.332.0)
- Added URL parameters to the PostHog logo in the surveys footer. (1.331.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.331.3)
- Adds support for thumbs up/down survey rating scales. (1.326.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.326.0)
- Product tour announcements now support display frequency options. (1.324.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.324.0)
- The z-index is now configurable, allowing developers to control the stacking order of PostHog UI elements. (1.321.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.321.3)
- API survey events now allow custom properties. (1.321.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.321.0)
- Product tour steps now support button actions, enabling developers to add actionable buttons to tour steps. (1.319.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.319.1)
- Added an extension for PostHog Logs, enabling developers to use Logs functionality with posthog-js. (1.319.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.319.0)
- Adds position options to modal and survey tour steps, allowing developers to control their positioning. (1.318.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.318.1)
- Adds product tour element inference for developers using product tours. (1.317.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.317.0)
- Conversation API methods are exposed for building custom user interfaces. (1.316.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.316.0)
- The default stack parser creator is exposed for developers to use. (1.316.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.316.0)
- Conversation enabling is separated from enabling the conversations widget, allowing developers to control them independently. (1.315.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.315.0)
- A new library provides proper typing for window.posthog when using the script version of posthog-js. (1.315.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.315.0)
- Allows opting in to store selected properties in cookies when using localstorage+cookies persistence mode. (1.313.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.313.0)
- Adds updateFlags() to inject feature flag values from an external source without making a network request. (1.311.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.311.0)
- Supports merge: true to merge injected flags with existing flags instead of replacing them. (1.311.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.311.0)
- Product tours now support custom appearance and cleaned-up animations, allowing developers to customize tour presentation. (1.310.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.310.1)
- Exception autocapture can now be programmatically enabled or disabled. (1.310.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.310.0)
- Product tours now support event and action triggers. (1.310.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.310.0)
- A new survey abandoned event is emitted when users leave the page. (1.310.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.310.0)
- Text colors can now be customized for web and React Native. (1.310.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.310.0)
- Survey event property filters now support less-than and greater-than operators. (1.308.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.308.0)
- Adds support for building survey steps specific to tours. (1.308.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.308.0)
- Introduces a conversations widget for developers using posthog-js. (1.307.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.307.0)
- Survey appearance now supports hideCancelButton. (1.306.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.306.0)
- Product tours now support survey steps, allowing surveys to be included in tour flows. (1.305.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.305.0)
- Product tours support auto-show configuration, allowing tours to appear automatically. (1.304.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.304.0)
- Product tours add modal steps for presenting tour content in modals. (1.304.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.304.0)
- Product tours are introduced in a super-alpha state for developer use. (1.303.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.303.0)
- Actions now support all filter options, allowing developers to use the complete set of available action filters. (1.301.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.301.0)
- Adds evaluation timestamp properties to $feature_flag_called events. (1.300.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.300.0)
- Surveys now allow customization of text input and background. (1.300.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.300.0)
- Adds a payload entry to the EarlyAccessFeature type. (1.299.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.299.0)
- Adds support for triggering surveys from actions filtered by event properties. (1.299.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.299.0)
- Adds support for customizing the positions of the survey feedback button. (1.294.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.294.0)
- Rageclicks can now be ignored based on their content. (1.293.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.293.0)
- Rageclick detection now supports a configurable click count while preserving previous default behavior. (1.292.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.292.0)
- Rageclick detection now supports a configurable pixel threshold while preserving previous default behavior. (1.292.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.292.0)
- Rageclick detection now supports a configurable timeout while preserving previous default behavior. (1.292.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.292.0)
- Adds support for a strict minimum duration, providing more accurate measurements on full page load. (1.291.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.291.0)
- Feature flags can now be bootstrapped during server-side rendering in ReactJS. (1.289.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.289.0)
- Adds the flags_api_host configuration option for specifying the flags API host. (1.288.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.288.0)
- Adds a URL parameter that enables automatic survey submission. (1.284.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.284.0)
- Adds URL parameters for prefilling survey answers by zero-based question index. (1.284.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.284.0)
- Configures the delay before automatically submitting a completed survey. (1.284.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.284.0)
- Enables automatic submission when URL-provided answers are complete. (1.284.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.284.0)
- Enables prefilling surveys from URL parameters. (1.284.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.284.0)
- Adds bot pageview collection when the preview flag is enabled, tracking bot traffic as $bot_pageview events. (1.283.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.283.0)
- Added a component that wraps components and captures an event when they are in view in the browser. (1.282.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.282.0)

### Performance

- The replayer batches large mutation adds against a detached subtree, preventing tab freezes and reducing blocked main-thread time. (1.434.12) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.12)
- Session recording avoids per-node traversal callbacks when DOM subtrees are moved repeatedly. (1.428.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.5)
- Session recording avoids empty child-list reads for text nodes during mutation processing. (1.428.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.5)
- Session replay reduces DOM traversal overhead by reusing native-accessor cache keys for node access. (1.428.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.5)
- Session replay avoids repeatedly traversing a subtree when it moves multiple times in one mutation batch. (1.428.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.5)
- Session replay reduces per-node allocations by reusing serialization options within each emission. (1.428.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.5)
- Session recording performs fewer shadow DOM connectivity checks. (1.428.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.5)
- Requests now use the best available compression, preferring gzip when supported. (1.421.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.421.1)
- npm source maps no longer embed TypeScript sources, reducing the unpacked package size while preserving source-map chaining. (1.421.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.421.1)
- Deferred inlining now processes 200 rules per idle slice and emits each sheet atomically, avoiding long tasks and partial CSS transmission. (1.416.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.416.1)
- Stylesheets beyond the snapshot budget omit `_cssText` and are inlined later during idle callbacks, reducing blocking work while preserving replay fidelity. (1.412.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.412.0)
- Small base64 images are no longer synchronously recompressed; larger images are memoized and retained when recompression is not smaller. (1.410.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.10)
- Improves console log capture performance for truncated large objects. (1.393.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.393.5)
- Bundled OpenTelemetry dependencies are removed, shrinking the lazily-loaded logs chunk. (1.392.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.392.0)
- save() skips storage writes when serialized props are unchanged, reducing unnecessary localStorage writes and cross-tab storage events. (1.376.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.376.6)
- Persistence writes are throttled to 5-second granularity, reducing localStorage pressure and cross-tab storage event broadcasts while flushing pending values on tab close. (1.376.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.376.5)
- Improved serialization performance for console logs involving large objects. (1.376.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.376.3)
- Session recording events use native asynchronous gzip compression when CompressionStream is available. (1.376.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.376.0)
- The bundle drops postcss and shrinks from 420KB to 170KB. (1.365.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.365.3)
- Reduced memory and CPU cost by caching gzipped empty arrays and eliminating redundant JSON.stringify for size estimation. (1.365.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.365.2)
- Uses async native CompressionStream for gzip compression to avoid blocking the main thread. (1.364.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.364.0)
- Reduced the browser SDK bundle size by approximately 6.6 KB (3.7%) through code and build optimizations. (1.363.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.3)
- Feature flags can now be tree-shaken, potentially reducing bundled client code. (1.359.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.359.0)
- Session replay reduces memory pressure through per-event sizing and FNV-1a canvas frame deduplication instead of storing full base64 strings. (1.358.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.358.1)
- Surveys, toolbar, exceptions, conversations, logs, and experiments can be tree-shaken to reduce unused application code. (1.358.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.358.0)
- URLs are no longer re-checked when they have not changed, reducing unnecessary runtime work. (1.357.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.357.1)
- The product tours bundle is smaller, reducing the amount of JavaScript shipped for this feature. (1.309.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.309.0)

### Behavior and default changes

- Freebuff click identifier is captured as a campaign parameter, set on events and as $initial_bfcid like other ad click IDs. (1.438.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.10)
- Build-time error tracking release IDs are now recognized, improving release association for reported errors. (1.438.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.5)
- Native bundler debug IDs are now recognized, improving error tracking for applications using supported bundlers. (1.438.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.5)
- WebMCP tool intent and model metadata are now captured by default. (1.438.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.0)
- Survey footer branding now uses the new PostHog logo. (1.435.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.8)
- Captured events reduce replay debug properties while preserving recording status and capture diagnostics. (1.435.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.2)
- $snapshot events report cumulative mutation-drop counts and dropped bytes only when greater than zero. (1.435.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.2)
- Logs a console warning when session replay stops capturing canvas frames because of unsupported browsers, CSP restrictions, or a failing maskRegionsFn. (1.433.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.10)
- Survey choice and question shuffling is shared between web and React Native through surveys core, using Fisher-Yates for web questions. (1.433.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.10)
- Events captured with send_instantly now prefer synchronous compression, including the initial $pageview, avoiding delays in request dispatch. (1.433.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.8)
- Cookieless mode skips reading the Meta `_fbc` and `_fbp` cookies. (1.433.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.0)
- The Meta click identifier is read from cookies, preserving the true ad click time and retaining clicks that occurred before the SDK loaded. (1.433.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.0)
- Conversations widget greetings now support clickable [label](url) links. (1.431.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.431.4)
- Internal SDK console diagnostics are excluded from exception autocapture. (1.431.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.431.1)
- Recoverable recorder diagnostics are reported as warnings. (1.431.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.431.1)
- Automatic feature flag refreshes back off on idle visible pages only when this interval is omitted; explicit intervals are preserved. (1.430.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.430.0)
- Retry delays for log exports are capped at 30 seconds, so exports resume sooner after endpoint recovery. (1.429.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.5)
- Browser autofill is disabled on input and textarea fields during session replay. (1.429.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.1)
- JSON-LD replay events now include the masked page URL. (1.428.9) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.9)
- Unbatched events prefer sendBeacon after PostHog detects page unloading, while active-page transports preserve response capability for retries. (1.428.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.6)
- Feature flag APIs distinguish conclusive off evaluations from unavailable evaluations, with different remote and backend local behavior. (1.427.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.3)
- Previously persisted feature flags are preserved as an offline fallback when bootstrap flags are provided. (1.426.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.426.4)
- Initializes the Segment enrichment integration when Segment is configured through set_config, so Segment events include PostHog properties such as active feature flags. (1.426.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.426.1)
- The Meta $fbc person property is captured when a new fbclid is observed. (1.426.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.426.0)
- Conversations widget requests now forward generic server-signed identity claims. (1.425.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.425.0)
- Browser SDK logs now include the os.name resource attribute, overridable via logs.resourceAttributes. (1.424.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.424.0)
- Browser SDK logs now include the os.version resource attribute, overridable via logs.resourceAttributes. (1.424.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.424.0)
- Initialization now warns when memory or sessionStorage persistence lacks a stable bootstrap distinct ID. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- Now reports Claude, Codex, and ChatGPT instead of Chrome when their user agent markers are detected. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- Persistence is synchronized across browser tabs, with successful partial evaluations authoritative for payload updates and removals. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- When enabled, privacy handling now also respects navigator.globalPrivacyControl. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- Popover surveys now re-translate when the display language changes, while preserving in-progress answers. (1.422.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.422.4)
- Survey events now report the question text and language the user saw when answering. (1.422.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.422.4)
- Config defaults now enable sanitized JSON-LD replay events. (1.421.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.421.0)
- Feature flags refresh when a hidden browser tab becomes visible, while the existing five-minute default and remote_config_refresh_interval_ms behavior remain unchanged. (1.419.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.419.4)
- INP and LCP now capture attribution by default; CLS remains without attribution to avoid memory leaks from detached DOM nodes. (1.419.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.419.0)
- Surveys now use the shared browser extension lifecycle, changing how survey functionality participates in the browser extension lifecycle. (1.418.15) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.15)
- Browser autocapture now uses the shared extension lifecycle. (1.418.14) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.14)
- Debug mode now names unmatched session replay trigger conditions instead of only reporting buffering. (1.418.11) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.11)
- Attributes are capped by nesting depth, object entries and total values, with excess data marked as [Truncated]. (1.418.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.8)
- React component stacks are rendered as linked exception causes so error tracking identifies the crashing component. (1.418.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.7)
- Full browser bundles now inline the whole session recorder instead of fetching the recorder script at runtime. (1.418.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.4)
- Sessions are flagged when the recorder script fails to load, making blocked recording visible in analytics. (1.418.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.4)
- The new cookie conflict behavior is enabled for the 2026-08-29 defaults. (1.418.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.0)
- External dependencies now load from versioned asset paths by default, with automatic fallback to legacy paths. (1.417.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.417.0)
- Styles produced by insertRule and adoptedStyleSheets no longer count against the stylesheet inlining budget. (1.416.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.416.1)
- The default 10,000-rule budget moves into posthog-js session recording options, preserving configured overrides including 0. (1.416.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.416.1)
- Duration samples spanning tab suspension are now discarded and reported through a debug telemetry event. (1.416.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.416.1)
- Supports removing multiple persisted properties in one operation. (1.415.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.2)
- The intro is dismissed by a button without recording a response or affecting completion and partial-response metrics. (1.415.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.0)
- Intro screen copy supports translation like the thank-you message. (1.415.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.0)
- When both masking options are set, maskAllElementAttributes wins, maskAttributeFn is ignored, and a console warning is emitted. (1.413.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.413.3)
- Minimal feature-flag events now retain referring-domain and canonical campaign parameters for session attribution. (1.411.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.411.0)
- Rate limit warnings now report privacy-aware dropped-event counts, page context, and session context. (1.410.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.10)
- reset() now logs a warning when opt_out_capturing_by_default silently opts the user out again after opt_in_capturing(). (1.410.9) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.9)
- Network-level message send failures are treated as transient, showing a connection message and logging warnings instead of errors. (1.410.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.2)
- Calling init() again with a different project token now produces a warning with actionable guidance. (1.410.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.2)
- Canvas recording now merges its sampling with user-provided sampling instead of overwriting it. (1.410.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.0)
- $exception events now include the injected release ID when available, allowing PostHog to attach exceptions to a release without joining through symbol sets. (1.409.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.409.0)
- Session recording request timestamps are sent in request bodies instead of query strings. (1.407.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.4)
- Analytics request timestamps are sent in capture bodies, while query timestamps remain used for session recordings. (1.407.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.3)
- SDK library identity is sent in feature flag person properties instead of URL query parameters. (1.407.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.3)
- Feature flag timestamps are now sent in ISO format within request bodies. (1.407.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.1)
- Capture POST requests now use numeric sent_at timestamps in the query string. (1.407.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.1)
- Debug mode now warns when client-side session recording masking options override project-level Privacy and masking settings. (1.407.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.0)
- Users can start a new conversation while an unresolved ticket remains open. (1.407.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.0)
- When server-controlled minimal flag events are enabled, events omit nonessential properties unless the flag is experiment-linked; before_send may re-add them. (1.405.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.405.0)
- Network-level fetch failures now log at warn instead of error because they are expected and retried by the request queue. (1.399.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.399.5)
- Browser SDK requests no longer include the gzip compression query parameter. (1.398.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.398.2)
- The deprecated ver query parameter is no longer sent to capture and session recording endpoints. (1.398.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.398.1)
- The loaded callback's instance type now includes config, enabling typed access to that property. (1.397.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.397.0)
- Cached survey definitions refresh after a short TTL so server-side survey changes reach long-lived tabs without reloads. (1.396.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.6)
- Android Chromium now captures the $device_model super-property during initialization and sends it on subsequent events. (1.394.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.394.0)
- Console-log records now include the standard SDK context field feature_flags. (1.392.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.392.0)
- Auto-captured console logs now use the same pipeline as captureLog() and logger.*, including standard PostHog log processing. (1.392.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.392.0)
- Console logs now use posthogDistinctId for person linking, so they appear on person profiles by default. (1.392.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.392.0)
- The default payload host deny list now skips more third-party analytics, RUM, and session-replay telemetry hosts without replay value. (1.391.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.4)
- The latest defaults bundle opts new installs into a 0.6 canvas capture scale, while the option itself defaults to full resolution. (1.391.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.0)
- Product tours follow the updated event-trigger activation and persistence model. (1.390.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.390.1)
- Retries are limited for transport failures without an HTTP response. (1.389.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.389.1)
- Log delivery now splits oversized batches automatically, making browser programmatic logs more resilient. (1.389.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.389.0)
- Failed log sends now retry with exponential backoff, improving delivery resilience. (1.389.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.389.0)
- Session replay now records native fullscreen transitions and reapplies fullscreen layout during playback, including when scrubbing into fullscreen regions. (1.387.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.387.0)
- onSessionId handlers now receive crossTabAdoption when adopting a sibling tab's session, so session-scoped state can follow the new session. (1.386.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.3)
- Volatile flag and survey metadata changes no longer rewrite split-storage entries or rebroadcast full payloads unless content changes. (1.386.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.3)
- Feature flags now reload by default when resetting person properties for flags. (1.385.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.385.0)
- __preview_disable_xhr_credentials is now a no-op. (1.384.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.384.3)
- The Google Search App is reported as Google Search App instead of Mobile Safari or Chrome when enabled. (1.384.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.384.0)
- The 2026-05-30 config defaults enable Google Search App detection automatically; other configurations remain opt-out by default. (1.384.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.384.0)
- Partial rageclick configuration objects merge with date-gated defaults; explicit values can override individual defaults or disable the feature entirely. (1.382.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.382.0)
- Browser tracing header configuration is now publicly supported through tracing_headers. (1.380.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.380.0)
- The 2026-05-30 config default automatically enables a 250ms debounce window. (1.378.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.378.0)
- $web_vitals reporting is now enabled when cookieless mode is enabled. (1.374.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.374.3)
- Open text survey questions submit with Cmd/Ctrl+Enter while plain Enter continues inserting a newline. (1.373.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.373.5)
- Survey translation logs are now gated behind SDK debug logging to avoid production console spam. (1.372.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.372.8)
- Browser surveys can render translations, enabling localized survey experiences. (1.372.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.372.3)
- Browser surveys track language, supporting language-aware survey behavior. (1.372.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.372.3)
- The OTLP scope.version field now contains the SDK version, changing the server instrumentation_scope value. (1.371.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.371.2)
- SDK-owned persistence keys now require explicit classification as event-visible, hidden, or derived, affecting which persistence state can appear in events. (1.371.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.371.1)
- Adds exception steps to error tracking, also known as breadcrumbs. (1.370.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.370.0)
- Active feature flag payloads are excluded from event properties, reducing unwanted data in captured events. (1.369.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.369.1)
- Adds handling for session replay trigger groups in V2. (1.369.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.369.0)
- Numeric survey rating options now show a hover state, providing clearer pointer feedback before selection. (1.366.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.366.2)
- Consent persistent store is re-evaluated when config changes, enabling cross-subdomain consent sharing. (1.366.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.366.1)
- Rejects the strings "undefined" and "null" as distinct IDs, and invalid IDs now always log a critical console error. (1.364.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.364.0)
- Anonymous users are automatically identified during the relevant bootstrap flow. (1.363.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.0)
- Calling reset() now automatically reloads feature flags. (1.360.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.360.2)
- Compressed requests now use ArrayBuffer for request data. (1.356.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.356.2)
- The recorder now outputs an event when recording starts. (1.356.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.356.1)
- Undated persisted recording configs are now treated as stale, so recording waits for a fresh remote config before starting. (1.356.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.6), [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.356.1)
- $user_state is now persisted to a cookie, enabling server-side access. (1.353.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.353.0)
- Tours now track clicks on banners. (1.351.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.351.2)
- config.js is now the sole config loading mechanism for posthog-js. (1.350.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.350.0)
- Replay now applies a DOM depth limit, affecting how deeply nested DOM content is captured. (1.347.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.347.2)
- Product tour images are preloaded, which may improve image availability during tours. (1.347.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.347.1)
- The z-index ordering was updated so tours appear above surveys, which appear above conversations. (1.347.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.347.0)
- Tours are now enabled by default, so applications using tours no longer need to enable them explicitly. (1.346.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.346.0)
- Adds product tour button clicked events for tracking interactions with product tour buttons. (1.345.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.345.2)
- Survey shown tracking was added to useThumbSurvey. (1.345.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.345.1)
- Markdown is now rendered in the support product. (1.337.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.337.0)
- Element inference is enabled for product tours, affecting how tour elements are identified. (1.334.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.334.1)
- sendMessage now sends context with the message. (1.333.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.333.0)
- Tickets now include more context when created, helping developers provide richer information in ticket records. (1.330.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.330.0)
- The support product no longer has a loading state. (1.329.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.329.0)
- Adds cache and URL-change tracking for regex behavior. (1.324.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.324.1)
- The logs extension no longer requires preflight requests. (1.324.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.324.0)
- Product tours now support banner rendering. (1.321.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.321.1)
- Adds first snapshot timestamp logging for monitoring and debugging purposes. (1.317.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.317.1)
- Product tours now support rich content. (1.317.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.317.0)
- Product tours now support multiple pages, enabling tours to span more than one page. (1.315.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.315.1)
- Adds a person property for the last-seen survey date to provide more consistent behavior across browsers and devices. (1.314.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.314.0)
- Lifecycle start events now include targetSessionID. (1.314.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.314.0)
- Product tour steps can progress when users click an element. (1.309.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.309.0)
- Feature flag requests now include $device_id, allowing flag fetching to use the device identifier. (1.307.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.307.1)
- console.error capture now includes synthetic exceptions. (1.306.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.306.2)
- Adds events for survey cancellation. (1.299.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.299.0)
- Overriding feature flags now outputs a confirmation log message, helping users know whether the action actually took effect. (1.297.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.297.0)
- Initialization now yields to the main thread, helping avoid blocking during posthog initialization. (1.290.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.290.0)
- Tracks the flushed size for each session, changing session-level telemetry behavior. (1.287.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.287.0)
- Session recordings now store the previous and next session ID, providing additional session context. (1.285.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.285.0)
- Exceptions thrown from the PostHog SDK are excluded from capture. (1.280.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.280.0)

### Tooling

- TypeScript declarations are now published under public dist paths for browser extension entrypoints. (1.410.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.8)
- Browser devtools now attribute console messages to the calling code instead of posthog-js's console wrapper. (1.409.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.409.6)
- Release tooling now recursively publishes dist/toolbar/ bundles with explicit JavaScript MIME types and supports the canonical toolbar.js/toolbar.css layout. (1.398.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.398.5)
- The rrweb worker sourcemap is shipped from posthog-js/dist so downstream bundlers need not access rrweb internals. (1.376.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.376.0)

### Fixes and other changes

- Backward device clock changes no longer subtract client rate-limit tokens. (1.438.12) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.12)
- WebMCP failures are captured in Error Tracking when exception autocapture is enabled; slim builds require this extension alongside WebMCPExtensions. (1.438.11) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.11)
- Callback types now accept non-null events while still allowing null returns to drop events. (1.438.9) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.9)
- Captures WebMCP error types and sanitized messages. (1.438.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.8)
- WebMCP intent and model injection are skipped for schemas whose constraints could be broken by the additional fields. (1.438.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.6)
- Publishes the feature flag types imported from @posthog/browser-common, fixing type checking in posthog-js. (1.438.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.4)
- Feature flag functionality is shared across browser SDKs while preserving existing behavior. (1.438.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.438.2)
- Events carrying pending Meta $fbc or $fbp identifiers are batched again, reducing races with preceding identify() calls. (1.436.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.436.1)
- Stops a SecurityError from escaping the recorder when an iframe becomes cross-origin during shadow DOM observation startup. (1.435.9) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.9)
- Preserves shared identity while consent is pending and clears it after shared rejection in cookieless mode. (1.435.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.7)
- Cross-subdomain identity continuity is fixed when users opt in after cookie consent. (1.435.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.6)
- Registered properties are preserved across initialization and configuration updates when persistence writes are debounced. (1.435.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.5)
- Session attribution is preserved across initialization and configuration updates when persistence writes are debounced. (1.435.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.5)
- Fixes a DataCloneError when session replay records network timing inside a cross-origin iframe. (1.435.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.4)
- The debug signal now reflects rrweb's own recording state. (1.435.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.3)
- Session recording now starts at DOMContentLoaded, allowing recording when the page load event is delayed or never fires. (1.435.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.3)
- PostHogFeature without match now shows the fallback when the flag evaluates to false. (1.435.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.435.1)
- Initialization no longer writes analytics persistence data when persistence is disabled or opted out. (1.434.18) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.18)
- Replay masking callback errors are isolated so unrelated network records continue to be captured. (1.434.18) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.18)
- Survey URL prefill values preserve equals signs, while malformed URL parameters no longer block surveys. (1.434.18) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.18)
- CSS-in-JS styles remain available after a large DOM change in the page head. (1.434.17) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.17)
- Buffered data is preserved when a held recording epoch reaches the size cap. (1.434.17) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.17)
- The modern replay network masking callback is honored when both modern and deprecated hooks are configured. (1.434.16) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.16)
- SPA $pageview events from pushState/replaceState navigations no longer carry the previous page's title. (1.434.15) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.15)
- Fixes useThumbSurvey to use the client passed to PostHogProvider, enabling survey event capture. (1.434.14) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.14)
- Replay loads recorded fonts under the replay iframe's content security policy instead of the embedding page's. (1.434.13) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.13)
- Cross-domain cookie probes are avoided when cross-subdomain cookies are disabled. (1.434.11) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.11)
- SDK initialization now works when a script loader pre-creates window.posthog as a placeholder object. (1.434.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.10)
- Session replay no longer defers input setter hooks on zone.js's patched setTimeout, preventing repeated Angular change detection and endless high-CPU loops. (1.434.9) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.9)
- Dead-click detection now survives denied DOM property access in Firefox and continues refreshing the liveness timestamp. (1.434.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.8)
- Session replay network capture starts in frames without PerformanceObserver or supportedEntryTypes, recording without live network timing. (1.434.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.7)
- Session recording stays active when a cross-origin image or video taints a canvas. (1.434.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.6)
- Dead clicks are no longer reported for controls inside open shadow roots when clicks update content within the shadow root. (1.434.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.5)
- Prevents $session_id from being sent as null when a sibling tab resets the session before this tab captures its first event. (1.434.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.4)
- The browser SDK retries feature flag requests on HTTP 502/504 responses and request timeouts. (1.434.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.3)
- Survey answer snapshots and response event properties are shared with React Native for consistent partial response reporting. (1.434.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.2)
- Replay network waterfall now captures document navigation timing when recording starts after page load and avoids partial duplicates during loading. (1.434.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.434.1)
- Survey shuffling no longer mutates configured choices. (1.433.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.10)
- Survey shuffling preserves the Other choice as the last choice. (1.433.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.10)
- Canvas settings are no longer changed when canvas capture fails to start. (1.433.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.10)
- Adds a session diagnostic when stale replay configuration cannot be refreshed, without changing recording behavior. (1.433.9) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.9)
- URL prefill continues working when localStorage is unavailable, including on opaque-origin pages or in private browsing. (1.433.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.7)
- The recorder no longer treats this resource hint as a stylesheet, preventing duplicated CSS in full snapshots and failed stylesheet deferrals. (1.433.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.6)
- Contains throws from third-party patched abort calls during fetch timeouts so requests retry instead of producing uncaught errors, with one outcome reported per request. (1.433.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.4)
- Captures causes and AggregateError members with relationship metadata and individual stacks, limiting output to 50 entries and 1,000 member inspections. (1.433.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.4)
- Keeps observers that initialized successfully when another observer fails, and reports failed observers in recorder debug properties. (1.433.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.4)
- Drops an oversized replay event when it cannot be stringified while continuing to ship the remaining buffer during unload flush. (1.433.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.4)
- Retryable browser responses respect repeated Retry-After headers up to 30 seconds without shortening exponential backoff. (1.433.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.2)
- Snapshots from different windows of the same session upload separately, preserving window attribution. (1.433.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.2)
- Autocapture attribute masks now apply to link URLs and legacy class properties. (1.433.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.433.1)
- Fixes lost event retries after restoring a page from the back-forward cache. (1.432.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.432.0)
- Fixes false dead clicks after synchronous DOM updates; stopped-bubbling clicks are now evaluated and may increase counts for inert controls. (1.431.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.431.8)
- Avoids keepalive quota failures when multiple event requests are in flight. (1.431.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.431.7)
- Pending replay network captures are discarded after recording stops or restarts. (1.431.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.431.5)
- Identical person property retries are no longer dropped after the original capture is rejected. (1.431.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.431.4)
- Fixes replay cleanup when the host's children are removed before destroying the player. (1.431.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.431.3)
- Console-captured exceptions are marked as handled and identified with their console origin. (1.431.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.431.2)
- Replay errors during playback and seeking no longer stall the remaining events after a failed event. (1.431.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.431.0)
- Console capture now stops correctly and avoids duplicating after restart when another library wraps the console. (1.430.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.430.4)
- Fixes session recording failing to restart after capturing events while stopped with expired config. (1.430.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.430.3)
- Each replay session's snapshots are sent in its own request, preventing session rotation from filing the new session's first snapshot under the old session. (1.430.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.430.2)
- Scroll depth metrics no longer carry over between pages after client-side navigation. (1.430.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.430.1)
- Batched event timestamps are preserved so delayed retries do not shift event times or prevent deduplication. (1.430.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.430.0)
- Failing log flushes continue backing off when new records arrive instead of resetting to the flush interval. (1.429.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.5)
- Logs and metrics always preserve service attribution and telemetry SDK fields when resource attributes are too large. (1.429.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.5)
- Session replay stops recording autoplay attribute mutations on video and audio elements, preventing repeated mutations from looping background media. (1.429.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.4)
- Console methods now receive console as their receiver when recording logs and reporting wrapper failures. (1.429.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.4)
- Error tracking excludes injected scripts and unsupported URL schemes from in-app issue grouping while retaining frames for context. (1.429.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.4)
- A console message is logged when this option prevents surveys from displaying. (1.429.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.3)
- Bootstrap values may now be null. (1.429.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.3)
- Null or empty distinct IDs are treated as missing. (1.429.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.3)
- Native ESM loading was fixed for consumers using native ES modules. (1.429.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.2)
- Recording package exports were fixed so consumers can import the package correctly. (1.429.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.2)
- Compatibility was fixed for consumers compiling with strict TypeScript 4.7 settings. (1.429.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.2)
- Text selection and editable caret gestures are no longer incorrectly reported as dead clicks when mouse release is delayed. (1.429.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.0)
- Clicks that select or unselect text are no longer reported as dead clicks. (1.429.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.0)
- TypeScript compatibility between public replay events and the replay player is fixed. (1.429.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.0)
- Surveys stay hidden while capture is disabled, and answers are preserved if capture stops before submission. (1.429.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.429.0)
- Empty survey placeholder text no longer displays the default "Start typing..." placeholder. (1.428.11) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.11)
- Repeated frame cycles are collapsed in parsed stack traces to reduce grouping differences caused by recursion depth while preserving distinct throw locations. (1.428.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.8)
- Restores connectivity tracking when a page returns from the back-forward cache, without reactivating it after explicit shutdown(). (1.428.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.7)
- isRecording() no longer reports a stopped recorder as started. (1.428.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.5)
- Browser handling drops Safari extension exceptions caused by WebKit messaging failures. (1.428.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.5)
- Session replay no longer renders the internal script placeholder, including inside shadow roots and replay iframes. (1.428.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.5)
- Playback skips malformed mouse-move positions and uses the event timestamp instead of stalling or ending. (1.428.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.5)
- Recorder teardown continues after cleanup-handler errors, allowing recording to restart after an idle reset. (1.428.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.5)
- Buffered session replay snapshots survive page unloads and are picked up by the next page in the same tab. (1.428.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.5)
- Idle tabs no longer extend the previous session recording across the entire idle gap when they wake. (1.428.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.4)
- Waits for the initial remote config outcome before using cached autocapture enablement, preventing capture after a project is newly disabled. (1.428.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.3)
- Error details, causes, aggregate errors, custom enumerable properties, and cross-realm Errors are preserved; ordinary capture properties are string-truncated while exception additional properties retain custom toJSON serialization. (1.428.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.2)
- Autocapture now recovers dropdown click targets retargeted to the page root and attributes nested SVG icon clicks to enclosing buttons or links while preserving privacy checks. (1.428.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.428.1)
- Session-id rotation synchronously drains compressed replay data so the old session's unflushed tail is preserved. (1.427.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.3)
- Exception autocapture no longer throws when wrapped handlers belong to another compartment or a destroyed document. (1.427.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.3)
- Discarding a recording no longer uploads stylesheet mutations emitted while the recorder stops. (1.427.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.3)
- Replay capture continues processing chunks after an individual chunk fails. (1.427.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.3)
- Session-id rotation resets the idle clock so the new session's first snapshot is not dropped or started prematurely. (1.427.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.3)
- Queued mutations no longer capture content beneath DOM or shadow ancestors that have become blocked. (1.427.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.3)
- Epochs without user interaction retain snapshots without uploading while `$recording_status` remains `active`. (1.427.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.3)
- Invalid clock values no longer break UUID generation. (1.427.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.3)
- Failures in automatic and manual exception processing no longer escape into customer code. (1.427.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.2)
- Automatic and manual exception capture no longer recursively recapture stack overflows raised while sending an exception. (1.427.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.1)
- Stack frames without filenames are no longer counted as in-app code. (1.427.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.0)
- Session recording events continue relaying when a cross-origin iframe redirects through the parent page's origin. (1.427.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.427.0)
- Prevents session replay network capture from replacing a downstream fetch wrapper's response with an instrumentation error when the response has no headers. (1.426.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.426.3)
- Explicitly false feature flag values supplied through bootstrap configuration are now preserved. (1.426.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.426.2)
- Event-specific $groups are now merged with groups registered on the browser client. (1.426.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.426.2)
- The anonymous distinct ID used for feature flag persistence is preserved when identify queues a reload behind an in-flight flags request. (1.426.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.426.2)
- Persisted initial URLs are limited by encoded cookie size, preventing long URLs and referrers from exceeding browser cookie limits. (1.426.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.426.2)
- The package now ships its ESM entrypoint with an .mjs extension so Node recognizes its module format, while retaining the existing .js bundle. (1.426.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.426.2)
- The bundles polyfill Array.prototype.findLast so they keep capturing on browsers older than Chrome 97 and Safari 15.4. (1.426.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.426.2)
- Replay now re-adopts constructed stylesheets when a shadow host is removed and re-added, keeping the component styled during live playback and fast-forward. (1.425.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.425.1)
- Replay recording now continues through session-id rotation when persisted remote config is past its TTL, including rotations caused by posthog.reset() on logout. (1.425.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.425.1)
- Failed replay network body reads no longer escape into the host page's own fetch() call. (1.424.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.424.1)
- Stale session recorders no longer initialize after consent or session teardown, and are disposed when switching to cookieless mode. (1.423.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.1)
- ChatGPT app versions differ by platform, so this value should not be compared across platforms. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- Cookie support detection now round-trips a probe cookie, improving storage selection when web storage and cookies are unavailable. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- Drops a known uBlock Origin Lite Safari extension exception while preserving first-party exceptions with an unmasked in_app frame. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- Returns an empty string for non-array input instead of throwing when runtime JavaScript callers provide malformed input. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- Falls back to in-memory storage when web storage and cookies are unavailable, and preserves stored falsy values. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- MutationBuffer cleanup now runs for empty normalized mutation batches, preventing DOM nodes from being retained indefinitely. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- Polling backs off to avoid starving event sends. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- Empty INP attribution reports no longer throw; metrics are captured with fallback attribution and no interaction details. (1.423.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.423.0)
- Survey events now report the language the user saw when answering, rather than the language active when the event fired. (1.422.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.422.4)
- Autocapture no longer throws a RangeError when sorting element attributes in browsers with faulty ICU data. (1.422.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.422.3)
- The bot-detection blocklist now matches pinterestbot instead of all Pinterest user agents, preventing real users in Pinterest's in-app browser from being excluded from analytics. (1.422.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.422.1)
- Console calls made before the logs script loads are now captured. (1.421.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.421.2)
- Session replay and posthog-js no longer leave each other's console wrapper in the call path when either stops. (1.421.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.421.2)
- Setting logs.captureConsoleLogs in init() now enables console autocapture. (1.421.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.421.2)
- Request timeouts now fire on pages where a browser extension makes Error.prototype.name non-writable. (1.421.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.421.2)
- Playback no longer ends when a recording contains a browser-refused shadow host; the player skips that subtree instead. (1.420.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.420.0)
- Fixes console log autocapture silently failing when an older posthog-js core loads a newer logs bundle. (1.419.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.419.4)
- Adds typed stable-name lookup for installed browser extensions when independently loaded survey code resolves feature flags. (1.419.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.419.4)
- Type declarations now support @types/react back to the declared 16.8.0 floor, avoiding TS2305 errors with older React types. (1.419.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.419.2)
- react is now an optional peer dependency, allowing posthog-js/react to resolve React on strict node_modules layouts without affecting projects that do not import it. (1.419.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.419.1)
- @types/react is now an optional peer dependency, avoiding unmet-peer warnings when React is absent while supporting posthog-js/react resolution. (1.419.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.419.1)
- Prevents failed CSSOM changes and fixes shadow DOM, cross-origin iframe, blocked and unsupported canvas, and deep DOM serialization edge cases. (1.418.17) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.17)
- Shares survey property matching between browser and React Native SDKs while preserving existing missing-value behavior. (1.418.17) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.17)
- Logs and metrics batches are retried after HTTP 408 instead of being dropped. (1.418.14) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.14)
- Fixed a stale element remaining rendered in the player when a mutation re-added a node ID with changed attributes; affects both useVirtualDom modes. (1.418.12) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.12)
- Prevents optional feature scripts from being added to the page more than once when api_host is a relative path. (1.418.11) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.11)
- Replay playback now continues across document swaps when constructed stylesheet adoption fails, using styles already applied. (1.418.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.10)
- Hover handling now ignores non-element and detached targets instead of throwing and stopping playback. (1.418.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.10)
- Backdated sessionIdle markers are attributed to the session that went idle, preventing rotation-born recordings from starting hours before their first snapshot. (1.418.9) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.9)
- Prevents logs and metrics from being silently dropped when attributes contain unsupported or unusually large values. (1.418.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.8)
- OtlpAnyValue.intValue is typed as string | number, so code reading it must handle both types. (1.418.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.8)
- The cookieless sentinel no longer leaks into identify() or real events, preventing distinct users from being merged. (1.418.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.7)
- Events are dropped when a before-send hook throws instead of sending the unmodified event. (1.418.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.6)
- Chromium <anonymous> stack frames from extension-injected, devtools, or string-evaluated code are no longer counted as in-app code. (1.418.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.5)
- Closing an in-app survey now uses a scoped CSS opacity transition instead of a document-level view transition, preventing Chrome renderer crashes on heavy pages. (1.418.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.2)
- Firefox and Safari extension frames are recognized when filtering extension exceptions, and Safari masked URL frames are no longer counted as in-app code. (1.418.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.418.1)
- Session recording takes a full snapshot when waking from idle after dropped DOM mutations, preventing duplicated or overlapping DOM in replay. (1.417.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.417.4)
- Restores exception autocapture compatibility for posthog-js clients through version 1.141.0. (1.417.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.417.3)
- Corrects exception types for non-Error objects thrown across browser extensions, iframes, and other realms instead of reporting them as Error. (1.417.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.417.2)
- Capture timestamp overrides are normalized to equivalent UTC ISO strings across browser, Node.js, and shared core SDKs. (1.417.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.417.1)
- Visibility and focus changes now suppress dead-click detection as liveness signals, preventing valid interactions from being flagged as dead. (1.417.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.417.1)
- Swallowed rrweb observer initialization errors no longer break session replay teardown or subsequent recorder restarts. (1.417.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.417.1)
- Deferred stylesheets are flushed synchronously when recording stops and during pagehide. (1.416.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.416.1)
- Fixes Chrome renderer crashes when closing in-app surveys and ensures popup state settles correctly during skipped, interrupted, or overlapping transitions. (1.415.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.5)
- The Segment integration config now accepts current and legacy Segment Analytics SDK types. (1.415.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.4)
- Preserves adopted stylesheets that arrive before a shadow root is attached, keeping Stencil and Lit components styled. (1.415.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.3)
- Prevents a buffer swapped in by re-entrant session rotation from being shipped during a replay flush. (1.415.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.3)
- Recordings containing only idle lifecycle markers are no longer opened. (1.415.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.1)
- The intro does not re-fire the survey shown event and is skipped when resuming a survey with answers in progress. (1.415.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.415.0)
- In-place object and array mutations are persisted when properties are re-registered. (1.413.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.413.3)
- Properties registered for a session are cleared when the PostHog session rotates. (1.413.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.413.3)
- Benign network failures no longer surface as unhandled promise rejections that exception autocapture could otherwise capture. (1.413.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.413.2)
- Recording now continues to capture mutations from adopted nodes originating in another realm. (1.413.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.413.1)
- Recorder-owned callback failures are contained and logged while exceptions from patched native host APIs remain preserved. (1.413.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.413.1)
- Held interaction-less recordings are discarded when a background document unloads without becoming visible. (1.412.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.413.0), [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.412.2)
- Stale persisted question indexes now discard the in-progress record and restart the survey; restored visited indices are filtered to valid questions. (1.410.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.10)
- Held rotation-born replay buffers now flush when a V2 event trigger matches. (1.410.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.10)
- Event-triggered survey popup delays now resume from the trigger time across page navigation instead of restarting on each page load. (1.410.9) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.9)
- Handled transport failures no longer become error logs in surveys, product tours, remote config, conversations, and logs; HTTP and unexpected failures retain error severity. (1.410.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.7)
- Idle session rotations no longer ship billable recordings until user interaction or an explicit event trigger; held data is discarded otherwise. (1.410.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.6)
- Open surveys remain in place when their trigger element is unmounted and are torn down only after the user closes them. (1.410.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.5)
- Click listeners on previously resolved selector elements are removed when the selector resolves to a different element, preventing repeated show-widget events. (1.410.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.5)
- Preserves messages, source locations, and existing stacks from browser errors without a same-realm Error object. (1.410.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.4)
- Support reply bullet and numbered lists retain markers despite aggressive host-page CSS resets by applying inline list styles. (1.410.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.3)
- Duplicate snippet loaders no longer replace initialized instances or replay queued calls more than once. (1.410.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.2)
- Prevents the inline canvas recording worker from requesting an unusable source map from its blob URL. (1.410.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.410.1)
- Suppression rules now fail open when evaluation encounters an unknown operator or unsupported key, preventing exceptions from being dropped. (1.409.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.409.5)
- Session replay re-sends one frame per canvas after each full snapshot, preventing canvases from staying blank after seeking. (1.409.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.409.4)
- Auto-submitted hosted survey responses retain caller-provided event properties, and manual submission preserves the prefilled answer during partial-response merging. (1.409.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.409.3)
- Session replay no longer redacts network bodies when timestamps or UUID fragments resemble social security or credit card numbers. (1.409.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.409.2)
- Campaign parameters are refreshed after single-page application URL changes. (1.408.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.408.3)
- identify() no longer creates a person profile when the supplied ID matches an anonymously persisted distinct ID. (1.408.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.408.3)
- Fixes dead-click false positives on WebKit when the SDK uses an iframe-sourced MutationObserver fallback. (1.408.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.408.2)
- React hooks without a PostHogProvider receive the default PostHog instance again when the UMD build is loaded through CommonJS. (1.407.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.8)
- Surveys now wait for feature flags only when they repeat; other surveys use cached targeting values immediately, preventing one-time api surveys from being dropped. (1.407.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.7)
- Fixes extension bundles when using the slim no-external browser build. (1.407.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.6)
- Paused replay seeks at an exact full snapshot timestamp now rebuild the snapshot frame before playback pauses. (1.407.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.5)
- Only reports surveys as renderable after their event or action activation trigger has fired. (1.407.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.3)
- Only reports surveys as renderable after their event or action activation trigger has fired. (1.407.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.3)
- Prevents server timings from dropped ingestion requests from causing an endless capture loop. (1.407.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.3)
- Session replay recordings remain playable after session rotation without prior user interaction, with recorder restart, session ID resync, and normal buffer flushing. (1.407.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.2)
- Dynamic GET requests continue preserving underscore cache-busting parameters. (1.407.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.1)
- Exception autocapture no longer throws when page error handlers contain truthy non-callable values. (1.407.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.0)
- Input observation skips native accessor calls on non-native objects, preventing uncaught Illegal invocation errors. (1.407.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.407.0)
- Recurring surveys wait for feature flags to load before eligibility checks and reload flags after completion to prevent duplicate responses. (1.406.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.406.2)
- save_referrer no longer overwrites explicitly registered $referrer or $referring_domain values, preserving attribution across SPA and iframe pageviews. (1.406.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.406.1)
- The active full snapshot interval now applies as soon as a recording trigger matches. (1.405.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.405.3)
- Failed remote config requests no longer enable autocapture for opted-out projects; it stays off until a successful config response. (1.404.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.404.1)
- Synchronous throws from monkey-patched fetch now follow async rejection handling, allowing request queue retries without unhandled exceptions. (1.404.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.404.0)
- Replay events containing array-based circular references are captured with [Circular] markers instead of being dropped. (1.402.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.402.3)
- Session recording drops replay updates for non-native input elements instead of throwing an uncaught TypeError. (1.402.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.402.2)
- Beacon quota rejections are now split and retried recursively, with non-keepalive fetch fallback and a warning when splitting cannot continue. (1.400.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.400.0)
- Ancestor traversal stops after 1000 ancestors or on revisiting a node, preventing indefinite walks on abnormal host-page DOM trees. (1.399.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.399.5)
- Uncompressed sendBeacon bodies now use base64 form data to preserve a CORS-simple content type and prevent cross-origin unload events from being lost. (1.399.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.399.4)
- Event serialization no longer throws on circular captured properties; true cycles become "[Circular]", preventing recaptured $exception loops. (1.399.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.399.3)
- Prevents shared rrweb global wrappers from growing without bound during recorder start/stop cycles, avoiding call-stack overflow. (1.399.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.399.2)
- Session recording startup now degrades gracefully when an older bundled core lacks SessionIdManager methods. (1.399.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.399.1)
- Fixed session replay leaking a shadow-root observer when a same-origin iframe is removed. (1.398.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.398.7)
- Cleanup no longer throws when the rrweb recorder cannot remove a listener. (1.398.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.398.6)
- Session recordings now preserve the initial full snapshot after an idle session-id rotation, preventing new recordings from becoming unplayable. (1.398.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.398.4)
- Session replay no longer silently drops shadow DOM mutations after an iframe teardown. (1.398.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.398.3)
- Network capture now degrades gracefully when instrumentation throws, preserving the host application's own XHR and fetch calls. (1.398.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.398.2)
- Fetch wrapper teardown now remains safe when restores occur out of order, preventing unbounded wrapper growth and stack overflows during repeated start/stop cycles. (1.398.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.398.2)
- The TypeScript definition now accepts the instance passed to the loaded callback, matching documented usage. (1.397.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.397.0)
- Prevents infinite-recursion stack overflows by bypassing the wrapped console during internal logging and guarding against re-entrancy. (1.396.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.8)
- Stops repeatedly hitting blocked feature flag and conversations polling endpoints after consecutive status-0 failures. (1.396.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.7)
- Own feature-flag timeouts are logged as warnings instead of errors when browsers do not propagate abort reasons. (1.396.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.6)
- Prevents uncaught crashes in heatmaps and autocapture when event targets are cross-realm elements from iframes or synthetic events. (1.396.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.5)
- Callbacks are isolated so a throwing user handler no longer breaks the remaining callback chain or gets misattributed as an SDK error. (1.396.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.4)
- The value now measures UTF-8 byte length instead of UTF-16 string length, accurately counting non-ASCII replay payloads against the message size limit. (1.396.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.4)
- Web vitals capture no longer crashes on browsers lacking Array.prototype.at(), including Chrome <92 and iOS Safari <15.4. (1.396.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.3)
- The IE11 bundle now includes a Promise polyfill and avoids async compression paths when Promise support is unavailable. (1.396.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.2)
- Browser requests fall back to uncompressed encoding when gzip encoding fails. (1.396.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.396.1)
- Request serialization errors no longer throw or block queued requests. (1.393.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.393.6)
- Browser console log capture now works when session activity timestamps are missing, and session attributes refresh for each log. (1.393.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.393.4)
- Page unload handling now guards the delegated method when a version-skewed surveys chunk lacks handlePageUnload. (1.393.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.399.1), [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.393.3)
- Stops logging a misleading server-upgrade warning when valid v2 flags responses contain no flags. (1.393.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.393.2)
- PostHog fetch timeouts now abort with an explicit descriptive reason while preserving AbortError handling and avoiding noisy exception recapture. (1.391.9) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.9)
- The browser SDK no longer adds the unused beacon query parameter to sendBeacon requests. (1.391.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.6)
- Applies the existing base64 image size cap to SVG image elements with data URIs in href and xlink:href, including mutations. (1.391.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.5)
- Binary and asset request or response bodies are never recorded, even when recordBody is enabled. (1.391.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.3)
- Custom event UUID overrides are validated, and new UUIDs are generated when overrides are invalid. (1.391.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.2)
- Delayed surveys now re-check full display eligibility before rendering and are cancelled when later evaluation finds them ineligible. (1.391.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.1)
- The flushed-size tracker is scoped to the current session, preventing leakage across page loads and tabs and ensuring new sessions start from zero. (1.390.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.390.2)
- The internal persistence key is hidden and no longer sent as a super-property on captured events, while remaining available on session-replay debug events. (1.390.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.390.2)
- Repeatable surveys using schedule: 'always' are consumed when shown, so each captured trigger shows them once. (1.390.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.390.1)
- Browser log delivery now resumes when the browser comes back online. (1.389.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.389.0)
- Merging flags no longer stores active feature flag overrides, so clearing an override restores the original flag. (1.388.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.388.2)
- Events are dropped and a warning is logged when a before_send hook removes token, avoiding rejected ingestion requests. (1.387.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.387.0)
- External scripts for exception and dead-click autocapture are not reloaded when already present. (1.387.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.387.0)
- The browser SDK no longer adds the unused ip query parameter to requests. (1.387.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.391.6), [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.387.0)
- Clears the stopped session's stale snapshot buffer when restarting recording after a pending stop, preventing previous-user snapshots from being attributed to the new session. (1.386.8) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.8)
- Surveys now swallow SecurityError from remaining localStorage accesses in cross-origin iframes instead of bubbling errors to user monitoring. (1.386.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.7)
- Disabling product tours now clears the cached tours blob, preventing stale data from persisting and broadcasting across tabs. (1.386.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.6)
- Prevents active rrweb capture from being silently torn down after session-id rotation, restoring replay event production and listener registration. (1.386.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.5)
- Seeking past pages and full snapshot rebuilds now apply scrolls instantly, preventing smooth-scroll animations from leaving revealed content out of view during fast-forwarding. (1.386.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.4)
- Session IDs remain stable across tabs, reducing spurious session fragmentation and correcting over-counted sessions. (1.386.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.3)
- The support widget now re-attaches after SPA navigations replace document.body, preventing it from disappearing until a full page reload. (1.386.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.3)
- Sampled-in session replay decisions are refreshed after the configured replay sample rate changes. (1.386.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.1)
- Snapshots are never recorded or flushed without a sampling decision, preventing junk recordings and stale decisions across session changes. (1.386.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.386.1)
- Resting scroll offset is captured on scrollend when reveal scrolling clamps to 0 before its target is scrollable, without duplicating normal scroll events. (1.385.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.385.0)
- Past events are applied synchronously only in live mode, preventing on-demand playback seeks and exports from using corrupted recording data. (1.384.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.384.1)
- In cookieless on_reject mode, opting out now respects capture_pageview: false. (1.383.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.383.1)
- Heatmap rageclick markers now apply the same suppression rules as the `$rageclick` event. (1.382.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.382.0)
- Survey rendering no longer uses a WebKit-crashing :has selector; empty headers now use a JavaScript-set class and sibling selector. (1.380.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.380.1)
- The tracing header now reads the distinct ID at request time, reflecting bootstrap, identify, reset, and other identity changes. (1.380.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.380.0)
- The console-log integration now suppresses log events after opt-out and resumes emitting them after opt-in. (1.379.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.379.3)
- Replay now reapplies the last scroll position after layout settles, preventing content from remaining scrolled out of view after fast-forward or seek. (1.379.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.379.2)
- Same-origin iframe documents, observers, serialized nodes, and cleanup handlers are released when iframes are removed, preventing session recording memory leaks. (1.379.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.379.1)
- Safari no longer exposes internally-created Request bodies to downstream fetch wrappers. (1.378.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.378.1)
- Initialization paths no longer throw or send requests when PostHog project tokens are missing or blank. (1.377.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.377.0)
- Takes a fresh full replay snapshot after session ID rotation, preventing new sessions from receiving only incremental mutations. (1.376.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.376.4)
- Enables the request queue when opting out in on_reject cookieless mode, allowing batched events to flush over the network. (1.376.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.376.4)
- Publishes the replay fix for absolutely positioned elements marked with ph-no-capture. (1.376.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.376.4)
- Session recorder no longer polls preload-as-style CSS links forever, preventing leaked load listeners, main-thread saturation, and tab freezes on refocus. (1.376.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.376.2)
- Stylesheet URLs are captured from link.sheet.href and link.sheet is tried directly for inlining, preserving recordings across SPA route changes. (1.374.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.374.4)
- PostHogProvider no longer throws or initializes when no API key or client is provided. (1.374.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.374.4)
- Tracing headers are now applied to matching XMLHttpRequest requests. (1.374.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.374.4)
- Preserves session-recording remote config across reset, allowing new sessions to start with recording metadata and a FullSnapshot. (1.374.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.374.2)
- posthog.capture now respects transport overrides passed to it. (1.374.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.374.1)
- Clicks on anchors are no longer flagged as dead clicks, while direct clicks on previously skipped form controls are now eligible for detection. (1.374.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.374.0)
- Gzip request bodies are validated at the browser send boundary and fall back to JSON when the outgoing body is not gzip data. (1.373.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.373.4)
- Native gzip output is validated before requests, with fallback when CompressionStream returns malformed data. (1.373.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.373.2)
- Prevents browser log capture from throwing when console arguments contain unreadable properties. (1.373.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.373.1)
- Invalid persisted session replay configuration JSON is handled gracefully. (1.373.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.373.0)
- Background refreshes are skipped when no document is available. (1.373.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.373.0)
- Session recording now stops before sessionManager destruction, preventing late rrweb events from throwing in cookieless rejection mode. (1.372.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.372.10)
- Original style text is preserved when CSSOM serialization produces empty longhands from var() shorthands, preventing layout rules from being dropped during replay. (1.372.10) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.372.10)
- Canvas recording now skips snapshots during WebGL context loss and catches getCanvas traversal errors, preventing recording from silently stopping for the session. (1.372.9) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.372.9)
- Fixes copy autocapture when copying or cutting text from Shadow DOM or document fragment contexts. (1.372.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.372.4)
- Fixes autofocus behavior for developers using posthog-js. (1.372.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.372.2)
- Native async gzip compression no longer uses Blob.stream(), preventing Safari NotReadableError stream failures. (1.372.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.372.1)
- Fixed session recording in the full no-external browser bundles. (1.371.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.371.3)
- NaN and ±Infinity attribute values are preserved during JSON encoding instead of being silently dropped. (1.371.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.371.2)
- Guards survey seen localStorage access to prevent access-related issues. (1.370.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.370.1)
- When opt_out_capturing_by_default is set, PostHog now starts in cookieless mode. (1.369.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.369.4)
- Reinstated in captured event properties, making feature flag payload data available again. (1.369.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.369.3)
- Reinstated in captured event properties, making survey activation data available again. (1.369.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.369.3)
- Unnecessary persisted config and activation properties are no longer added to captured events, including product tours, surveys, and session recording config. (1.369.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.369.1)
- Recording triggers for V2 triggers now account for property filters on events. (1.369.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.369.0)
- Browser SDK disables native gzip compression after a NotReadableError. (1.368.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.368.2)
- Bootstrapped feature flags are no longer overwritten by a partial /flags response when this option is enabled. (1.368.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.368.1)
- IframeManager destroy now handles SecurityError. (1.365.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.365.3)
- IframeManager removeIframeById now handles SecurityError. (1.365.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.365.3)
- The mutation buffer is cleared on iframe pagehide to prevent recording corruption. (1.365.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.365.3)
- Unchanged setAttribute calls are skipped to prevent replay flicker. (1.365.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.365.3)
- Preserves $set_once semantics in the local flag evaluation cache. (1.365.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.365.0)
- Sends $groupidentify for new groups even when no properties are provided. (1.364.7) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.364.7)
- Fixes crashes in slim and extension bundles caused by inconsistent property mangling. (1.364.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.364.6)
- Canvas FPS snapshots now recover from createImageBitmap or worker errors instead of permanently stopping canvas recording. (1.364.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.364.5)
- Avoids an infinite recursion crash when resetting or restarting the recorder on pages containing shadow DOM elements. (1.364.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.364.5)
- Snapshot and exception events skip deep copying to prevent stack overflow on deeply nested DOM trees. (1.364.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.364.4)
- Wraps the sendBeacon body in a Blob so the Content-Type header is set correctly. (1.364.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.364.2)
- Adopted stylesheets can now be cleared with empty strings. (1.363.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.6)
- Stop handler cleanup now handles cross-origin iframe errors. (1.363.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.6)
- Nested CSS rule handling is improved for replay behavior. (1.363.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.6)
- Object reference mutation no longer breaks remote CSS replay. (1.363.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.6)
- Stop handler cleanup now catches all SecurityError variants. (1.363.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.6)
- WebGLRenderingContext access is guarded for iOS compatibility. (1.363.6) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.6)
- Document visibility changes no longer capture dead clicks. (1.363.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.5)
- Logs a warning instead of throwing an error when ad blockers block the session recording script. (1.363.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.2)
- Bootstrap no longer causes a silent identity switch, making user identity behavior more predictable. (1.363.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.0)
- overrideFeatureFlags now handles plain array and object forms. (1.363.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.363.0)
- Initial person properties are now included with $identify calls even after being sent in a prior anonymous event, improving identification across subdomains. (1.362.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.362.0)
- Preserved from terser mangling so wrapper SDKs can call it. (1.361.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.361.1)
- Debug mode now persists across page navigations. (1.361.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.361.0)
- Restarts when the session rotates externally while idle, preventing Recording not found errors. (1.361.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.361.0)
- Legacy persisted configs without cache_timestamp are treated as fresh, preventing them from being cleared before recording starts. (1.360.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.360.0)
- PostHogFeatureFlags now uses a TreeShakeable<T> type. (1.360.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.360.0)
- When remote config fetch fails, session recording falls back to persisted config or disables recording for first-ever visits instead of remaining stuck in pending_config. (1.358.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.358.1)
- Tablet detection now occurs in detectDeviceType, providing consistent device classification across all call sites. (1.357.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.357.2)
- Reuses a single OffscreenCanvas in the canvas recording worker, fixing a Safari memory leak. (1.357.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.357.0)
- Canvas FPS recording is skipped on browsers without OffscreenCanvas instead of running a loop that cannot produce data. (1.356.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.356.2)
- Canvas mutation data now includes displayHeight for correct replay sizing. (1.356.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.356.2)
- Canvas mutation data now includes displayWidth for correct replay sizing. (1.356.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.356.2)
- Canvas recording now closes ImageBitmaps on Safari versions without OffscreenCanvas, preventing a memory leak. (1.356.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.356.2)
- Recording initialization failures now report rrweb_error instead of appearing active while capturing no data. (1.356.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.356.2)
- Improves tablet and mobile classification when Chrome on Android tablets sends desktop-like user-agent strings. (1.356.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.356.0)
- Adds a re-entrancy guard for configurations combining ALL, regex, and event trigger matching. (1.354.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.354.4)
- Added additional legacy exports for fully qualified dist and lib exports, improving compatibility for existing imports. (1.354.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.354.2)
- All package export paths are exposed, allowing developers to access the intended package entry points. (1.354.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.354.1)
- Fixed an autofill bug in hosted surveys. (1.353.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.353.1)
- Fixed an issue where the toolbar interfered with distinct id handling in conversations. (1.352.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.352.1)
- Prevents an infinite recursion bug when using a 3rd party proxy with posthog. (1.351.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.351.1)
- Markdown is stripped in the tickets list. (1.351.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.351.0)
- Retries starting session recording when persisted remote configuration is stale. (1.347.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.347.2)
- Tree shaking configuration was reverted, potentially changing how application bundles are optimized. (1.347.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.347.0)
- Added the missing featureFlags property to the PostHog interface. (1.345.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.345.5)
- Restored set_config to the loaded callback type. (1.345.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.345.5)
- Session replay now respects the network_timing remote configuration, allowing network timing behavior to be controlled as intended. (1.345.4) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.345.4)
- Dead Clicks no longer continue being captured after being disabled via remote config. (1.345.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.345.3)
- Remote config cache invalidation is no longer too aggressive. (1.345.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.345.0)
- The replay remote config cache is now invalidated periodically. (1.343.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.343.1)
- The identification form is no longer shown when the user is already identified. (1.343.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.343.0)
- Legacy persistence entries with sampled: true are now ignored. (1.343.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.343.0)
- Fixed console error capturing so captured console errors behave correctly for developers using the library. (1.342.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.342.1)
- Tour manual click triggers now use preventDefault instead of stopPropagation. (1.341.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.341.1)
- Tours now infer elements more precisely and wait to mark a tour as shown until the first step renders successfully. (1.339.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.339.1)
- Fixed stale element references in multi-page product tours. (1.338.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.338.1)
- Fixed contrast colors in the support widget. (1.338.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.338.0)
- Failed flags are filtered before cached values merge, preventing transient backend errors from overwriting previously evaluated states. (1.337.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.337.0)
- Element clicks are no longer intercepted when a product tour fails to show. (1.337.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.337.0)
- Undefined and null configuration values are treated identically when config is received. (1.336.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.336.2)
- Fixes the color of the survey close button. (1.335.5) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.335.5)
- Survey cancel buttons are now black. (1.335.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.335.2)
- Reduces memory leaks in SPAs by upgrading web-vitals and removing duplicate observers on URL changes. (1.334.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.334.0)
- Fixed product tour tooltips on mobile devices. (1.331.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.331.3)
- Rate limiting configuration changes are now respected. (1.331.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.331.2)
- Logging objects with null or undefined property values no longer throws a TypeError. (1.329.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.329.0)
- Fetch wrappers were restored to the most recent working version. (1.328.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.328.0)
- Fetch wrappers no longer reconsume request bodies or generate mismatched FormData boundaries. (1.327.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.327.0)
- Wrapped fetch now always receives a RequestInit object, ensuring consistent fetch initialization behavior. (1.325.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.325.0)
- Wrapped fetch() now passes the duplex option when required. (1.323.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.323.0)
- Fixed an issue with _currentTicketId. (1.322.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.322.0)
- Product tour tooltips now use more robust element-based positioning. (1.321.3) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.321.3)
- Typing inside the loaded callback was fixed, improving type checking for callback implementations. (1.319.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.319.2)
- Missing public definitions were added to @posthog/types, improving the available type surface for developers. (1.319.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.319.2)
- Activity timestamp detection no longer compares null to numbers, preventing incorrect activity handling. (1.318.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.318.2)
- Adds missing sessionRecording types for developers using session recording APIs. (1.318.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.318.0)
- Survey responses prefilled from URL parameters now respect branching and skip logic instead of always advancing sequentially. (1.316.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.316.1)
- $prev_pageview_duration no longer spans session boundaries after session rotation, preventing inflated page duration values. (1.312.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.312.0)
- $device_id is persisted to cookies so it survives localStorage clears. (1.310.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.310.2)
- Callbacks are queued while a survey fetch is in progress instead of returning an error. (1.310.2) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.310.2)
- Hosted survey auto-submit behavior now only submits skipped questions. (1.310.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.310.0)
- Updated which network masking function is used. (1.306.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.306.1)
- Includes initial person properties in $identify when group() is called first. (1.306.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.306.0)
- Session recording restarts after opt_in_capture is called. (1.302.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.302.1)
- Prefilled questions now work for hosted surveys. (1.302.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.302.0)
- Session ID rotation no longer relies on stale in-memory cache after idle periods, especially when multiple windows are in use. (1.301.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.301.1)
- Clicks with CTRL, ALT, CMD, or Windows modifier keys no longer count as dead clicks. (1.300.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.300.0)
- Fixed session replay on React Native Web. (1.298.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.298.1)
- Corrects the frame platform property for $exception events. (1.297.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.297.0)
- No longer relies on the order of method calls to gate calling url. (1.296.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.296.1)
- Popover surveys are now cleaned up from the DOM when closed. (1.296.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.296.0)
- Fixes a bug in survey HTML rendering. (1.295.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.295.0)
- Rageclick detection now uses the event timestamp instead of the current time. (1.293.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.293.0)
- Session recording configuration overrides are now applied even while the recorder module is still loading. (1.286.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.286.0)
- Session ending payloads are now allowed when recording is idle. (1.285.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.285.1)
- Token calculation can now occur without a timer. (1.281.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.281.0)
- Surveys are no longer polled while the page is hidden. (1.281.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.281.0)
- The retry count URL parameter is now updated correctly. (1.280.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.280.1)
- Polling now stops when the retry queue is empty. (1.280.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.280.1)
- Stops the heatmap buffer interval when the page is hidden. (1.279.1) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.279.1)
- Adds a warning and extra examples explaining what advanced_disable_flags disables. (1.278.0) — [release notes](https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.278.0)
