unstale

npm / posthog-js

posthog-js

What changed in posthog-js 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-04.

52 breaking24 security13 deprecations213 new APIs and options32 performance173 behavior and defaults4 tooling443 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

posthog-js 1954 changes

Breaking changes 52

  • The SDK no longer falls back to config.js if the remote config JSON request fails.

    1.451.0release notes

  • Without a reverse proxy, CSP must allow the assets host in connect-src for remote config to load.

    1.451.0release notes

  • Failed flag evaluations are omitted, and failed values or payloads are not exposed.

    1.450.0release notes

  • Failed flag evaluations now return undefined, so callers can treat them as unavailable.

    1.450.0release notes

  • Metrics recorded after posthog.shutdown() are dropped, and late samples no longer restart the metrics flush timer.

    1.446.0release notes

  • Web experiment HTML transforms are sanitized; unsupported tags and attributes are removed.

    1.444.4release notes

  • In Conversations, calling reset() or opting out while tickets or a restore link are loading no longer revives the widget, restarts polling, or restores the old ticket ID to storage.

    1.438.16release notes

  • Calls before survey setup now invoke the callback immediately with an unavailable error.

    1.438.14release notes

  • Calls before logging setup are now dropped instead of buffered.

    1.438.7release notes

  • 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.1release notes

  • Default network metric attributes now use OTel HTTP client semantic conventions instead of the previous attribute names.

    1.434.0release notes

  • Sending and retention of group identification now depend on person processing mode and group association behavior.

    1.426.0release notes

  • identify now requires a distinct ID, matching the existing runtime validation.

    1.426.0release notes

  • Bigint attributes on logs, metrics, and spans are sent as int64 rather than strings.

    1.423.0release notes

  • Values from the closest element now take precedence when the same property exists on multiple ancestors.

    1.423.0release notes

  • Prefilled surveys no longer send survey sent before completion, and partial events include only auto-advanced answers.

    1.419.3release notes

  • Browser-injected user script exceptions are no longer captured by default; set this option to true to keep capturing them.

    1.418.16release notes

  • Reports without a code position no longer receive a document-URL stack frame, so these exceptions arrive without a stack trace.

    1.418.6release notes

  • Non-repeatable triggered survey activation is now scoped to the triggering session and cleared in a new session.

    1.407.0release notes

  • When remote config omits autocapture_opt_out, the SDK retains the last known server value instead of enabling autocapture.

    1.406.0release notes

  • Enum members no longer work as standalone type annotations; use the exported union types instead. Runtime values are unchanged.

    1.400.1release notes

  • 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.9release notes

  • host moves from resource attributes to record attributes in console logs; saved queries using the old location need updating.

    1.392.0release notes

  • The canonical console-log person identifier changes from distinct_id to posthogDistinctId.

    1.392.0release notes

  • Console-log session identifiers move from resource.attributes.session.id to the standard sessionId record attribute.

    1.392.0release notes

  • 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.0release notes

  • window.id moves from resource attributes to record attributes in console logs; saved queries using the old location need updating.

    1.392.0release notes

  • 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.1release notes

  • Event-triggered survey activations remain in memory until shown, then persist across reloads; unshown activations no longer reappear after reload.

    1.390.1release notes

  • Symbol-only keywords match element text exactly, and default stepper buttons are ignored, changing suppression of controls containing symbols such as > or <.

    1.382.0release notes

  • OpenTelemetry logs dependencies are no longer installed transitively by consumers; projects importing them directly must declare their own dependencies.

    1.379.1release notes

  • Writing to a resolve ticket is no longer allowed; developers must start a new ticket instead.

    1.372.0release notes

  • Renames the public tracing-headers configuration option for linking LLM traces to session replays.

    1.371.0release notes

  • CLI and sourcemap utilities moved from @posthog/core to @posthog/plugin-utils, removing cross-spawn from React Native dependencies.

    1.364.5release notes

  • rrweb and related dependencies are no longer placed directly on window by posthog-recorder.

    1.352.1release notes

  • The legacy config loading path was removed.

    1.350.0release notes

  • The __preview_remote_config gate was removed from config loading.

    1.350.0release notes

  • Renames setTestUser to setInternalOrTestUser; update calls to the new API name.

    1.341.0release notes

  • Attribution is now opt-in by default, reducing memory usage.

    1.336.2release notes

  • The minimum supported Preact version is now 10.28.2.

    1.335.4release notes

  • Renamed evaluationEnvironments to evaluationContexts to clarify that values specify evaluation contexts such as web, mobile, or checkout.

    1.331.0release notes

  • extendUrlParams now replaces URL parameters by default unless the caller explicitly chooses otherwise.

    1.280.1release notes

  • rrweb types are no longer required as a peer dependency when using posthog-js.

    1.279.0release notes

  • This method now uses per-event capture v1 results rather than treating a successful HTTP response as confirmation that all events persisted.

    1.0.0upgrade guide

  • The property now lists only images with a debug ID that a sent stack frame points into.

    1.0.0upgrade guide

  • This option still controls the number of /flags retries, which now wait 300 ms before the first retry and double up to 30 seconds instead of using capture retry options.

    1.0.0upgrade guide

  • Flag events now prefer request-context values over client defaults; per-call disable_geoip wins over both, including when set to Some(false).

    1.0.0upgrade guide

  • MCP events set $lib to posthog-rs-mcp and $lib_version to the crate version; they no longer send the three version-part properties.

    1.0.0upgrade guide

  • The blocking client has no scoped context, and this method returns None; apply context to events yourself or use evaluate_flags_with_context.

    1.0.0upgrade guide

  • The SDK sends this field as a top-level event field only when its value is a string; null is unset, and other types are dropped with a warning.

    1.0.0upgrade guide

  • Request-context maps now fill only keys missing from the event map, so context properties can supplement event properties on every event.

    1.0.0upgrade guide

  • Shutdown makes one final attempt per batch, drops retryable failures rather than retrying them, and drops remaining events when the timeout expires.

    1.0.0upgrade guide

Security 24

  • Session replay sampling decisions now use a plain letter instead of a ! prefix, avoiding OWASP Core Rule Set false positives; old ! values are removed on the next page load.

    1.451.1release notes

  • When enabled, maskAllInputs now masks hidden input values in session replay.

    1.447.2release notes

  • The static loader adds release integrity manifests and support for customer-pinned core integrity.

    1.445.0release notes

  • Sanitizes survey HTML descriptions while preserving rich text formatting.

    1.444.3release notes

  • Fetch requests now default to strict-origin, omitting page paths and query strings from referrers.

    1.433.3release notes

  • Prevents buffered session replay data from crossing projects that share a persistence name during page navigation.

    1.431.6release notes

  • Replay URL privacy settings now apply to URL values in captured JSON-LD payloads.

    1.428.10release notes

  • Replay redaction preserves safe JSON-LD properties and allowlisted structure while restricting IDs, types, and payloads.

    1.427.3release notes

  • Legacy product tour HTML is sanitized before rendering, reducing the risk of unsafe HTML being rendered.

    1.423.2release notes

  • Captured console records are now dropped when the user opts out.

    1.421.2release notes

  • Clipboard autocapture now records paste interactions without collecting the pasted text.

    1.420.0release notes

  • Initial navigation and performance-timing entries now use the masking callback, preserving privacy while retaining required replay timing metadata when filtered.

    1.413.1release notes

  • Masks all source DOM string attributes, including rendering attributes and synthesized form values, with reduced replay fidelity.

    1.413.0release notes

  • Configuring maskRegionsFn disables canvas pixel serialization in DOM full snapshots, preventing unmasked canvas stills from being embedded.

    1.408.0release notes

  • When ancestor checks for ph-no-capture or ph-sensitive cannot finish, the element is treated as not capturable.

    1.399.5release notes

  • Auto-captured console logs now pass through logs.beforeSend, allowing sensitive console output to be redacted or dropped before sending.

    1.392.0release notes

  • Product Tours styles now use the CSP stylesheet preparation hook, improving compatibility with Content Security Policy requirements.

    1.391.8release notes

  • Credential-bearing headers are redacted in both requests and responses, including custom names containing credential-shaped substrings, preventing token and cookie capture.

    1.391.7release notes

  • Style mutation diffing no longer causes style-src-attr CSP violations.

    1.391.3release notes

  • Style and script elements appended by site apps now receive CSP nonce preparation hooks.

    1.388.1release notes

  • Consumers no longer install transitive protobufjs from posthog-js, avoiding its unsafe-eval Content Security Policy issue.

    1.379.1release notes

  • Avoids cross-origin property access when calling the previous unhandled rejection handler.

    1.372.5release notes

  • An iframe leak in the untainted prototype is prevented, along with unnecessary iframe creation.

    1.365.3release notes

  • Textarea innerText mutations are now masked during recording.

    1.363.6release notes

Deprecations 13

  • The preview cookie conflict option is deprecated in favor of cookieWinsOnConflict.

    1.418.0release notes

  • Deprecates the double-underscore bucket-size option while continuing to honor it as a fallback.

    1.400.0release notes

  • Deprecates the double-underscore refill-rate option while continuing to honor it as a fallback.

    1.400.0release notes

  • __preview_disable_beacon is deprecated in favor of disable_beacon.

    1.384.3release notes

  • Deprecated as a no-op because session replay lazy loading is now the default.

    1.384.2release notes

  • The no-op browser SDK config option is deprecated because the SDK already uses the /flags/?v=2 endpoint by default.

    1.383.3release notes

  • __add_tracing_headers remains available as a deprecated alias for tracing_headers.

    1.380.0release notes

  • addTracingHeaders remains available as a deprecated alias for tracing_headers.

    1.380.0release notes

  • The old tracing-headers configuration alias continues to work but is deprecated on the browser SDK.

    1.371.0release notes

  • Manual capture of $exception now produces a warning.

    1.351.0release notes

  • Element steps are deprecated as product tour steps are unified with modal steps.

    1.341.2release notes

  • The posthog.init option remains functional but logs a deprecation warning and will be removed in a future major version.

    1.331.0release notes

  • The package is deprecated, so developers should avoid adopting it for new usage.

    1.298.0release notes

New APIs and options 213

  • When the experimental metrics.flags option is on, the browser SDK records last-byte-to-callback duration, including reading and parsing the response body.

    1.449.0release notes

  • When the experimental metrics.flags option is on, the browser SDK records request-start to last-byte duration from the request's Resource Timing entry.

    1.449.0release notes

  • When the experimental metrics.flags option is on, the browser SDK records dispatch-to-request-start duration, including body compression.

    1.449.0release notes

  • Adds an opt-in allowlist of hostnames or origins that receive a W3C traceparent header on fetch and XMLHttpRequest requests, without overwriting or duplicating an existing header.

    1.448.0release notes

  • Adds imageUrl to the EarlyAccessFeature type, allowing developers to use this field with early access features.

    1.447.11release notes

  • Accepts hidden in maskInputOptions so developers can configure masking for hidden inputs.

    1.447.2release notes

  • Accepts a bounds option for setting histogram bucket boundaries; beforeSend can see and change them. The first sample fixes bounds until reset, mismatched later bounds use the fixed buckets and log a warning, and invalid bounds are dropped.

    1.447.0release notes

  • Enabling this experimental option records the round trip of every /flags HTTP attempt as the posthog.flags.request.duration histogram, with server host, response status or error type, and browser timezone attributes.

    1.446.0release notes

  • Adds a conversations.theme init option for theming the support widget.

    1.444.0release notes

  • Adds CSS custom properties for theming the support widget.

    1.444.0release notes

  • Adds an API to set the support widget theme.

    1.444.0release notes

  • Adds an API to close the support chat panel.

    1.442.0release notes

  • Adds an API to open the support chat panel.

    1.442.0release notes

  • Adds an option accepting CSS selectors or an (element) => boolean predicate to select fields whose values are captured in autocapture change events.

    1.441.0release notes

  • Adds $input_value to autocapture change events for fields marked data-ph-capture-value or matched by the capture-value selector allowlist.

    1.441.0release notes

  • Adds a browser SDK loader that uses URL or attribute tokens and supports optional deferred initialization.

    1.440.0release notes

  • Add defaults: 'latest' to follow the newest defaults and report the applied date in events.

    1.439.0release notes

  • WebMCPExtensions is now exported from the slim extension-bundles entry point, making it available to consumers of that entry point.

    1.438.6release notes

  • Adds a private opt-in to preserve application stacks for failed fetch requests.

    1.438.3release notes

  • Adds opt-in capture of WebMCP tool calls for MCP Analytics.

    1.437.0release notes

  • A new opt-in helper flags likely WebView bots for tagging or dropping events via before_send; default SDK behavior remains unchanged.

    1.436.0release notes

  • OpenAI Ads click identifier oppref is captured as a campaign parameter, included on events, and stored as $initial_oppref.

    1.435.6release notes

  • Adds a subscription API for survey eligibility updates with safe unsubscribe and recoverable load-error reporting.

    1.435.0release notes

  • Adds a config limit for feature flag request retries, defaulting to 1 and allowing 0 to disable retries.

    1.434.3release notes

  • The Meta browser ID is captured as a person property so backend conversions can use it later.

    1.433.0release notes

  • Setting this switch to false disables reading the Meta _fbc and _fbp cookies.

    1.433.0release notes

  • Adds a resetError callback to React error-boundary fallbacks, allowing applications to retry rendering without remounting the boundary.

    1.432.0release notes

  • Adds network metrics configuration to record fetch and XMLHttpRequest durations as histograms, with optional custom names and attributes.

    1.431.0release notes

  • Adds require-able bundle entry points for desktop apps and CSP-restricted builds, avoiding deep imports from dist/.

    1.430.0release notes

  • Segment integration accepts filterProperties to filter PostHog-generated enrichment properties before events reach destinations.

    1.429.0release notes

  • Adds best-effort in-app browser attribution using $webview_app and $webview_app_version while preserving existing browser values.

    1.428.0release notes

  • Captured replay events now expose why an epoch's recording buffer is being held.

    1.427.3release notes

  • Browser identify calls now support reuseAnonymousId.

    1.427.0release notes

  • Session replay can opt into a DOM mutation byte budget; excess mutations are dropped and recording resyncs with a full snapshot.

    1.422.2release notes

  • The DOM mutation budget refills at 25KB/s by default, controlling the sustained mutation rate before mutations are dropped.

    1.422.2release notes

  • Captured events now report discarded session-recorder attribute changes so developers can query whether recordings are affected.

    1.422.0release notes

  • 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.0release notes

  • Configure web vitals attribution with false, true, or an array naming the metrics.

    1.419.0release notes

  • Now accepts path, search, and hash options to trigger $pageview events when selected URL components change during SPA navigation.

    1.418.13release notes

  • Adds an option that keeps shared cross-subdomain identity and session state ahead of stale per-origin localStorage.

    1.418.0release notes

  • A new observability payload field reports focus-change delay for dead-click detection.

    1.417.1release notes

  • Adds a fallback mode for strict script versioning to support legacy asset paths when needed.

    1.417.0release notes

  • Abandoned deferred stylesheet work is now counted through a dedicated debug telemetry event.

    1.416.1release notes

  • Residual deferred stylesheet failures are now counted through a dedicated debug telemetry event.

    1.416.1release notes

  • Adds reset options that apply bootstrapped identity, feature flag, and session values after reset while preserving the legacy boolean argument.

    1.416.0release notes

  • Adds rewriteRequestPath to customize API, feature flag, and asset paths for reverse proxies.

    1.416.0release notes

  • Adds an appearance field to show an optional survey intro screen before question 1.

    1.415.0release notes

  • Exports a constant representing the intro screen preview page index.

    1.415.0release notes

  • Adds the button text setting used to dismiss the optional survey intro screen.

    1.415.0release notes

  • Adds the description text for the optional survey intro screen.

    1.415.0release notes

  • Adds the content type setting for the intro screen description.

    1.415.0release notes

  • Adds the header text for the optional survey intro screen.

    1.415.0release notes

  • Adds previewPageIndex -1 to preview the survey intro screen.

    1.415.0release notes

  • Exports the unavailable-reason type from package entry points so consumers can name the type.

    1.414.0release notes

  • Exposes the specific reason the conversations API is unavailable, enabling callers to record why they fall back to another channel.

    1.414.0release notes

  • Adds per-attribute control over the final serialized value in session replay.

    1.413.0release notes

  • Adds a captured-event metric reporting deferred stylesheet work.

    1.412.0release notes

  • Adds a captured-event metric reporting the CSS rule count associated with the slowest full snapshot.

    1.412.0release notes

  • Adds a captured-event metric reporting the slowest full snapshot duration.

    1.412.0release notes

  • Adds a captured-event metric reporting the node count associated with the slowest full snapshot.

    1.412.0release notes

  • Adds a captured-event metric reporting the slowest full snapshot stylesheet processing duration.

    1.412.0release notes

  • Adds a captured-event metric reporting the slowest incremental mutation batch duration.

    1.412.0release notes

  • Adds a stylesheet CSSRule budget per snapshot, defaulting to 10,000; setting 0 restores unbounded inlining.

    1.412.0release notes

  • Opting in scopes web vitals to soft navigation entries, preventing inflated measurements after SPA route changes.

    1.411.0release notes

  • Adds sampling controls to disable or throttle mousemove capture and optionally mouseInteraction in session replay.

    1.410.0release notes

  • Adds a browser-v1 client adapter for shared extensions with analytics, request, persistence, replayed remote-config outcomes, and synchronous best-effort cleanup.

    1.409.1release notes

  • Adds getInjectedReleaseId() to @posthog/core for reading the release ID injected by posthog-cli.

    1.409.0release notes

  • 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.1release notes

  • 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.0release notes

  • Accepts defaultValue when a flag has no value and narrows the return type to boolean.

    1.407.0release notes

  • The pending session recording trigger buffer interval is now configurable.

    1.405.2release notes

  • Adds configurable dead swipe capture, enabled by default, for touch gestures that produce no observable screen change.

    1.404.0release notes

  • Adds a per-page-load cap of 10 dead swipe captures by default.

    1.404.0release notes

  • Adds the pixel threshold used to detect dead swipes, defaulting to 30 pixels.

    1.404.0release notes

  • Touch swipes with no observable screen change are now captured as $dead_swipe events.

    1.404.0release notes

  • $feature_flag_called events now include a boolean indicating whether the feature flag has an experiment when explicitly reported by the server.

    1.403.0release notes

  • Adds count, gauge, and histogram metrics recording to posthog-node, with in-memory aggregation and flushing to /i/v1/metrics.

    1.402.1release notes

  • 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.0release notes

  • Adds an attribute allowlist passed to MutationObserver, reducing recording CPU from mutations to unlisted attributes.

    1.401.0release notes

  • Adds exceptionRateLimiterBucketSize as a first-class error tracking rate-limiter option.

    1.400.0release notes

  • Adds exceptionRateLimiterRefillRate as a first-class error tracking rate-limiter option.

    1.400.0release notes

  • Adds metrics configuration for service identity, flush timing, series limits, and a before-send hook.

    1.399.0release notes

  • Adds an alpha statsd-style metrics client with count, gauge, and histogram methods that pre-aggregate samples and periodically flush metrics.

    1.399.0release notes

  • Adds a survey appearance option that prevents open-text questions from stealing focus in embedded surveys; defaults to false.

    1.398.0release notes

  • Custom survey integrators can mark surveys as seen while honoring already-seen and wait-period checks.

    1.396.6release notes

  • Browser clients now support graceful shutdown, best-effort event flushing, and always-resolving teardown.

    1.396.6release notes

  • Adds a config option to provide the logical URL used for client-side URL targeting; defaults to window.location.href when unset.

    1.396.0release notes

  • Adds a synchronous API returning cached feature flags as structured FeatureFlagResults without sending a $feature_flag_called event.

    1.395.0release notes

  • Adds an option to opt out of capturing and sending the Android Chromium device model.

    1.394.0release notes

  • Adds opt-in streaming network body capture that bounds memory and pre-request latency for very large bodies.

    1.393.1release notes

  • 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.0release notes

  • Auto-captured console logs identify their console method through log.source, while manual logs leave it unset.

    1.392.0release notes

  • The canvas FPS-snapshot observer accepts an optional resolution scale record option for downscaling captured frames.

    1.391.0release notes

  • Adds a fractional canvas capture scale to reduce replay frame pixel area while preserving the canvas display dimensions and aspect ratio.

    1.391.0release notes

  • Adds a log hook to inspect, redact, modify, or drop records before sending, including logs from captureLog() and logger.*.

    1.390.0release notes

  • Adds CSS selector opt-outs that apply only to autocaptured web interactions.

    1.388.0release notes

  • Capture options now accept $unset and pass it through in browser capture payloads.

    1.387.0release notes

  • Adds a counterpart to setPersonProperties() for removing person properties without manually passing a $unset array in capture().

    1.387.0release notes

  • Enables a Back button for multi-question web surveys, preserving branching navigation and prior answers while pruning abandoned-branch responses before submission.

    1.386.0release notes

  • Overrides the default Back button label in web surveys.

    1.386.0release notes

  • Adds survey-level translation support for the Back button label.

    1.386.0release notes

  • Adds survey-level translation support for the submit button label.

    1.386.0release notes

  • External dependency script versioning is now supported through the asset_host config option.

    1.385.0release notes

  • External dependency script versioning is now supported through the strict_script_versioning config option.

    1.385.0release notes

  • Adds a configuration option to detect the Google Search App as its own browser value.

    1.384.0release notes

  • Stores feature-flag configuration in a separate localStorage entry to reduce main-blob writes and cross-tab storage-event broadcasts.

    1.383.0release notes

  • 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.0release notes

  • Adds the $sdk_dist_channel event property for browser SDK npm and cdn distribution channels.

    1.379.0release notes

  • Adds a config option to debounce localStorage and cookie writes while keeping in-memory props updates synchronous.

    1.378.0release notes

  • detectBrowser and detectBrowserVersion accept an optional BrowserDetectionHints argument with a brave flag for identifying Brave browsers without a user-agent marker.

    1.377.0release notes

  • Adds a boolean captured-event property showing whether starting the rrweb recorder was attempted.

    1.376.4release notes

  • Adds a config option to restrict browser feature flag remote evaluation to specific flag keys.

    1.375.0release notes

  • Adds a configuration option to exclude specific elements from dead-click detection without affecting autocapture, session replay, or heatmaps.

    1.374.0release notes

  • Adds a CSS class to exclude specific elements from dead-click detection without affecting autocapture, session replay, or heatmaps.

    1.374.0release notes

  • capture() now accepts an optional uuid on CaptureOptions.

    1.373.0release notes

  • React Native now supports translated survey rendering, with shared survey translation logic through @posthog/core.

    1.372.6release notes

  • Exposes the tracing-header fetch patch implementation from @posthog/core for reuse by non-browser SDKs.

    1.371.0release notes

  • Adds a preview flag for versioned browser lazy bundle asset paths.

    1.369.2release notes

  • Adds an API for sending structured log entries to PostHog logs.

    1.368.0release notes

  • Adds support for pre-loaded remote-config, allowing developers to use remote configuration loaded before initialization.

    1.367.0release notes

  • Adds customer side identification for developers using posthog-js.

    1.366.0release notes

  • Exposes the current survey question index on .survey-box, including link questions without input or rating elements.

    1.365.4release notes

  • Adds a tree-shakeable ESM entry point for slim builds.

    1.363.5release notes

  • Scopes $feature_flag_called deduplication to the current session.

    1.361.0release notes

  • Adds an internal method for wrapper SDKs to override $lib and $lib_version event properties.

    1.361.0release notes

  • Adds a serviceName option to the logs configuration.

    1.361.0release notes

  • Adds an Extension interface for authoring tree-shakable extensions.

    1.358.0release notes

  • Adds a local sampleRate configuration option for session recording.

    1.357.0release notes

  • A new recorder status was added for tracking recording state.

    1.356.1release notes

  • Adds a configuration option to prevent stale feature flag values.

    1.356.0release notes

  • Adds a configuration option to control automatic feature flag refresh frequency in long-running sessions.

    1.356.0release notes

  • Adds support for configuring a wait period for product tours.

    1.355.0release notes

  • Product tours can target users by device type.

    1.354.3release notes

  • Adds the ability to retrieve previous conversations.

    1.352.0release notes

  • Feature flag APIs can now return only values loaded from the server, excluding cached localStorage values.

    1.351.4release notes

  • Adds an animation option for tour banners, allowing developers to configure their presentation behavior.

    1.351.3release notes

  • Added support for localizing product tours.

    1.349.0release notes

  • Support for multiple tickets was added, enabling developers to work with more than one ticket.

    1.348.0release notes

  • Product tours now support customizable text for survey step buttons.

    1.348.0release notes

  • Adds a replay debug property indicating that the DOM depth limit was exceeded.

    1.347.2release notes

  • Added the OverrideFeatureFlagsOptions type to the PostHog interface.

    1.345.5release notes

  • displaySurvey now has an option to disable survey shown tracking.

    1.345.1release notes

  • Adds the $feature_flag_error property to $feature_flag_called events.

    1.345.0release notes

  • Added featureFlagsReloading to on() event types.

    1.342.0release notesrelease notes

  • Adds support for configuring widget position.

    1.340.0release notes

  • Adds isTestUser() for identifying test users.

    1.339.0release notes

  • Adds the test_user_hostname configuration option for identifying test users.

    1.339.0release notes

  • Product tours now support placing the banner in a custom container.

    1.336.2release notes

  • Adds the getFeatureFlagResult method for retrieving feature flag results.

    1.336.0release notes

  • Product tours now support linked flags.

    1.335.0release notes

  • Web vitals can now be used with or without attribution.

    1.335.0release notes

  • Adds a config option to control where external scripts are injected.

    1.334.0release notes

  • Popover surveys now support prefilled questions.

    1.332.0release notes

  • Adds the useThumbSurvey hook for thumb surveys.

    1.332.0release notes

  • Added URL parameters to the PostHog logo in the surveys footer.

    1.331.3release notes

  • Adds support for thumbs up/down survey rating scales.

    1.326.0release notes

  • Product tour announcements now support display frequency options.

    1.324.0release notes

  • The z-index is now configurable, allowing developers to control the stacking order of PostHog UI elements.

    1.321.3release notes

  • API survey events now allow custom properties.

    1.321.0release notes

  • Product tour steps now support button actions, enabling developers to add actionable buttons to tour steps.

    1.319.1release notes

  • Added an extension for PostHog Logs, enabling developers to use Logs functionality with posthog-js.

    1.319.0release notes

  • Adds position options to modal and survey tour steps, allowing developers to control their positioning.

    1.318.1release notes

  • Adds product tour element inference for developers using product tours.

    1.317.0release notes

  • Conversation API methods are exposed for building custom user interfaces.

    1.316.0release notes

  • The default stack parser creator is exposed for developers to use.

    1.316.0release notes

  • Conversation enabling is separated from enabling the conversations widget, allowing developers to control them independently.

    1.315.0release notes

  • A new library provides proper typing for window.posthog when using the script version of posthog-js.

    1.315.0release notes

  • Allows opting in to store selected properties in cookies when using localstorage+cookies persistence mode.

    1.313.0release notes

  • Adds updateFlags() to inject feature flag values from an external source without making a network request.

    1.311.0release notes

  • Supports merge: true to merge injected flags with existing flags instead of replacing them.

    1.311.0release notes

  • Product tours now support custom appearance and cleaned-up animations, allowing developers to customize tour presentation.

    1.310.1release notes

  • Exception autocapture can now be programmatically enabled or disabled.

    1.310.0release notes

  • Product tours now support event and action triggers.

    1.310.0release notes

  • A new survey abandoned event is emitted when users leave the page.

    1.310.0release notes

  • Text colors can now be customized for web and React Native.

    1.310.0release notes

  • Survey event property filters now support less-than and greater-than operators.

    1.308.0release notes

  • Adds support for building survey steps specific to tours.

    1.308.0release notes

  • Introduces a conversations widget for developers using posthog-js.

    1.307.0release notes

  • Survey appearance now supports hideCancelButton.

    1.306.0release notes

  • Product tours now support survey steps, allowing surveys to be included in tour flows.

    1.305.0release notes

  • Product tours support auto-show configuration, allowing tours to appear automatically.

    1.304.0release notes

  • Product tours add modal steps for presenting tour content in modals.

    1.304.0release notes

  • Product tours are introduced in a super-alpha state for developer use.

    1.303.0release notes

  • Actions now support all filter options, allowing developers to use the complete set of available action filters.

    1.301.0release notes

  • Adds evaluation timestamp properties to $feature_flag_called events.

    1.300.0release notes

  • Surveys now allow customization of text input and background.

    1.300.0release notes

  • Adds a payload entry to the EarlyAccessFeature type.

    1.299.0release notes

  • Adds support for triggering surveys from actions filtered by event properties.

    1.299.0release notes

  • Adds support for customizing the positions of the survey feedback button.

    1.294.0release notes

  • Rageclicks can now be ignored based on their content.

    1.293.0release notes

  • Rageclick detection now supports a configurable click count while preserving previous default behavior.

    1.292.0release notes

  • Rageclick detection now supports a configurable pixel threshold while preserving previous default behavior.

    1.292.0release notes

  • Rageclick detection now supports a configurable timeout while preserving previous default behavior.

    1.292.0release notes

  • Adds support for a strict minimum duration, providing more accurate measurements on full page load.

    1.291.0release notes

  • Feature flags can now be bootstrapped during server-side rendering in ReactJS.

    1.289.0release notes

  • Adds the flags_api_host configuration option for specifying the flags API host.

    1.288.0release notes

  • Adds a URL parameter that enables automatic survey submission.

    1.284.0release notes

  • Adds URL parameters for prefilling survey answers by zero-based question index.

    1.284.0release notes

  • Configures the delay before automatically submitting a completed survey.

    1.284.0release notes

  • Enables automatic submission when URL-provided answers are complete.

    1.284.0release notes

  • Enables prefilling surveys from URL parameters.

    1.284.0release notes

  • Adds bot pageview collection when the preview flag is enabled, tracking bot traffic as $bot_pageview events.

    1.283.0release notes

  • Added a component that wraps components and captures an event when they are in view in the browser.

    1.282.0release notes

  • Use the capture_ai family for LLM analytics events; sending $ai_ events through capture remains temporarily accepted.

    1.0.0upgrade guide

  • Sets per-event processing controls in the capture v1 options map for exceptions.

    1.0.0upgrade guide

  • Call this from an on_error hook to log every drop and retry reason in a single summary line.

    1.0.0upgrade guide

  • Sets per-event processing controls in the capture v1 options map, sent next to properties.

    1.0.0upgrade guide

  • When the SDK adds its own library version, it also sends numeric major, minor, and patch properties; minimized flag events omit these parts.

    1.0.0upgrade guide

  • Adds a callback that supplies options for each MCP request; its options take precedence over request context options.

    1.0.0upgrade guide

  • The SDK is published under the posthog crate name; new applications should depend on posthog = "1" and import posthog.

    1.0.0upgrade guide

  • Existing applications can depend on this compatibility package and retain posthog_rs imports; it forwards features and re-exports the same implementation, types, and global state.

    1.0.0upgrade guide

  • Sets an option on every event in a request; an event's non-null option takes precedence, subject to the stated identify-style event limitation.

    1.0.0upgrade guide

  • Sets an option on one MCP tool call, taking precedence over callback and request-context options.

    1.0.0upgrade guide

Performance 32

  • Bundlers can tree-shake the slim build's extension bundles, so an app keeps only the bundles it imports.

    1.447.12release notes

  • capture() compares the stored persistence text and parses it only when a sibling tab or subdomain has changed it, avoiding parsing on every capture.

    1.447.4release notes

  • Releases a removed shadow DOM host as soon as it leaves the page, rather than retaining it and its detached subtree in memory until the next full snapshot.

    1.441.2release notes

  • Session replay mutation draining now runs in O(n) instead of O(n²), fixing a 9–10 s main-thread freeze when a render mounts many sibling nodes.

    1.439.1release notes

  • The SDK no longer parses the whole persistence entry on every capture() to refresh Meta identifiers, improving Interaction to Next Paint performance, especially on mobile and for projects with many feature flags.

    1.438.22release notes

  • The replayer batches large mutation adds against a detached subtree, preventing tab freezes and reducing blocked main-thread time.

    1.434.12release notes

  • Session recording avoids per-node traversal callbacks when DOM subtrees are moved repeatedly.

    1.428.5release notes

  • Session recording avoids empty child-list reads for text nodes during mutation processing.

    1.428.5release notes

  • Session replay reduces DOM traversal overhead by reusing native-accessor cache keys for node access.

    1.428.5release notes

  • Session replay avoids repeatedly traversing a subtree when it moves multiple times in one mutation batch.

    1.428.5release notes

  • Session replay reduces per-node allocations by reusing serialization options within each emission.

    1.428.5release notes

  • Session recording performs fewer shadow DOM connectivity checks.

    1.428.5release notes

  • Requests now use the best available compression, preferring gzip when supported.

    1.421.1release notes

  • npm source maps no longer embed TypeScript sources, reducing the unpacked package size while preserving source-map chaining.

    1.421.1release notes

  • Deferred inlining now processes 200 rules per idle slice and emits each sheet atomically, avoiding long tasks and partial CSS transmission.

    1.416.1release notes

  • Stylesheets beyond the snapshot budget omit _cssText and are inlined later during idle callbacks, reducing blocking work while preserving replay fidelity.

    1.412.0release notes

  • Small base64 images are no longer synchronously recompressed; larger images are memoized and retained when recompression is not smaller.

    1.410.10release notes

  • Improves console log capture performance for truncated large objects.

    1.393.5release notes

  • Bundled OpenTelemetry dependencies are removed, shrinking the lazily-loaded logs chunk.

    1.392.0release notes

  • save() skips storage writes when serialized props are unchanged, reducing unnecessary localStorage writes and cross-tab storage events.

    1.376.6release notes

  • 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.5release notes

  • Improved serialization performance for console logs involving large objects.

    1.376.3release notes

  • Session recording events use native asynchronous gzip compression when CompressionStream is available.

    1.376.0release notes

  • The bundle drops postcss and shrinks from 420KB to 170KB.

    1.365.3release notes

  • Reduced memory and CPU cost by caching gzipped empty arrays and eliminating redundant JSON.stringify for size estimation.

    1.365.2release notes

  • Uses async native CompressionStream for gzip compression to avoid blocking the main thread.

    1.364.0release notes

  • Reduced the browser SDK bundle size by approximately 6.6 KB (3.7%) through code and build optimizations.

    1.363.3release notes

  • Feature flags can now be tree-shaken, potentially reducing bundled client code.

    1.359.0release notes

  • Session replay reduces memory pressure through per-event sizing and FNV-1a canvas frame deduplication instead of storing full base64 strings.

    1.358.1release notes

  • Surveys, toolbar, exceptions, conversations, logs, and experiments can be tree-shaken to reduce unused application code.

    1.358.0release notes

  • URLs are no longer re-checked when they have not changed, reducing unnecessary runtime work.

    1.357.1release notes

  • The product tours bundle is smaller, reducing the amount of JavaScript shipped for this feature.

    1.309.0release notes

Behavior and default changes 173

  • The console warning no longer includes the first dropped event's name when the bot user agent filter drops events.

    1.451.2release notes

  • When site apps are disabled, the SDK loads remote config as JSON with fetch instead of executable config.js.

    1.451.0release notes

  • Browser metrics now export once a minute by default instead of every 10 seconds; an explicit metrics.flushIntervalMs still wins.

    1.447.13release notes

  • Browsers that cannot encode WebP now send opaque canvas frames as JPEG at the configured quality instead of lossless PNG.

    1.447.13release notes

  • Survey and product tour footers use the gradient PostHog logo, and the one-color logo on dark backgrounds.

    1.447.10release notes

  • When the filter drops events, a console warning is emitted once, even outside debug mode.

    1.447.7release notes

  • Buffered text changes are collapsed to the final value per node.

    1.447.5release notes

  • The experimental histogram now uses specified bucket boundaries, allowing its p50 and p95 to resolve between 50ms and 5s.

    1.447.0release notes

  • Feature flag requests sent over XHR now retry on timeout and record a timeout flag error.

    1.445.6release notes

  • Bot detection now recognizes self-declared Lightpanda headless browsers.

    1.444.4release notes

  • Adds dark mode support for the support widget.

    1.444.0release notes

  • Local bootstrap is nonblocking and queues early calls.

    1.443.0release notes

  • Synchronous session replay fetch capture is enabled by default for new SDK versions.

    1.438.23release notes

  • Ships the IE11 Math.trunc and Number.isInteger polyfills only in this bundle, so modern bundles no longer trigger Lighthouse's "Legacy JavaScript" audit.

    1.438.21release notes

  • Autocapture is shared across browser SDKs while preserving existing event capture behavior.

    1.438.19release notes

  • When debug is enabled, logs why capture() dropped an event because capturing is disabled or the user agent is a bot.

    1.438.18release notes

  • Warns in debug mode when reloadFeatureFlags() runs inside an onFeatureFlags callback, because cross-tab flag changes can turn it into a request loop.

    1.438.15release notes

  • Surveys are shared across browser SDKs.

    1.438.14release notes

  • Freebuff click identifier is captured as a campaign parameter, set on events and as $initial_bfcid like other ad click IDs.

    1.438.10release notes

  • Build-time error tracking release IDs are now recognized, improving release association for reported errors.

    1.438.5release notes

  • Native bundler debug IDs are now recognized, improving error tracking for applications using supported bundlers.

    1.438.5release notes

  • WebMCP tool intent and model metadata are now captured by default.

    1.438.0release notes

  • Survey footer branding now uses the new PostHog logo.

    1.435.8release notes

  • Captured events reduce replay debug properties while preserving recording status and capture diagnostics.

    1.435.2release notes

  • $snapshot events report cumulative mutation-drop counts and dropped bytes only when greater than zero.

    1.435.2release notes

  • Logs a console warning when session replay stops capturing canvas frames because of unsupported browsers, CSP restrictions, or a failing maskRegionsFn.

    1.433.10release notes

  • Survey choice and question shuffling is shared between web and React Native through surveys core, using Fisher-Yates for web questions.

    1.433.10release notes

  • Events captured with send_instantly now prefer synchronous compression, including the initial $pageview, avoiding delays in request dispatch.

    1.433.8release notes

  • Cookieless mode skips reading the Meta _fbc and _fbp cookies.

    1.433.0release notes

  • 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.0release notes

  • Conversations widget greetings now support clickable [label](url) links.

    1.431.4release notes

  • Internal SDK console diagnostics are excluded from exception autocapture.

    1.431.1release notes

  • Recoverable recorder diagnostics are reported as warnings.

    1.431.1release notes

  • Automatic feature flag refreshes back off on idle visible pages only when this interval is omitted; explicit intervals are preserved.

    1.430.0release notes

  • Retry delays for log exports are capped at 30 seconds, so exports resume sooner after endpoint recovery.

    1.429.5release notes

  • Browser autofill is disabled on input and textarea fields during session replay.

    1.429.1release notes

  • JSON-LD replay events now include the masked page URL.

    1.428.9release notes

  • Unbatched events prefer sendBeacon after PostHog detects page unloading, while active-page transports preserve response capability for retries.

    1.428.6release notes

  • Feature flag APIs distinguish conclusive off evaluations from unavailable evaluations, with different remote and backend local behavior.

    1.427.3release notes

  • Previously persisted feature flags are preserved as an offline fallback when bootstrap flags are provided.

    1.426.4release notes

  • 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.1release notes

  • The Meta $fbc person property is captured when a new fbclid is observed.

    1.426.0release notes

  • Conversations widget requests now forward generic server-signed identity claims.

    1.425.0release notes

  • Browser SDK logs now include the os.name resource attribute, overridable via logs.resourceAttributes.

    1.424.0release notes

  • Browser SDK logs now include the os.version resource attribute, overridable via logs.resourceAttributes.

    1.424.0release notes

  • Initialization now warns when memory or sessionStorage persistence lacks a stable bootstrap distinct ID.

    1.423.0release notes

  • Now reports Claude, Codex, and ChatGPT instead of Chrome when their user agent markers are detected.

    1.423.0release notes

  • Persistence is synchronized across browser tabs, with successful partial evaluations authoritative for payload updates and removals.

    1.423.0release notes

  • When enabled, privacy handling now also respects navigator.globalPrivacyControl.

    1.423.0release notes

  • Popover surveys now re-translate when the display language changes, while preserving in-progress answers.

    1.422.4release notes

  • Survey events now report the question text and language the user saw when answering.

    1.422.4release notes

  • Config defaults now enable sanitized JSON-LD replay events.

    1.421.0release notes

  • 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.4release notes

  • INP and LCP now capture attribution by default; CLS remains without attribution to avoid memory leaks from detached DOM nodes.

    1.419.0release notes

  • Surveys now use the shared browser extension lifecycle, changing how survey functionality participates in the browser extension lifecycle.

    1.418.15release notes

  • Browser autocapture now uses the shared extension lifecycle.

    1.418.14release notes

  • Debug mode now names unmatched session replay trigger conditions instead of only reporting buffering.

    1.418.11release notes

  • Attributes are capped by nesting depth, object entries and total values, with excess data marked as [Truncated].

    1.418.8release notes

  • React component stacks are rendered as linked exception causes so error tracking identifies the crashing component.

    1.418.7release notes

  • Full browser bundles now inline the whole session recorder instead of fetching the recorder script at runtime.

    1.418.4release notes

  • Sessions are flagged when the recorder script fails to load, making blocked recording visible in analytics.

    1.418.4release notes

  • The new cookie conflict behavior is enabled for the 2026-08-29 defaults.

    1.418.0release notes

  • External dependencies now load from versioned asset paths by default, with automatic fallback to legacy paths.

    1.417.0release notes

  • Styles produced by insertRule and adoptedStyleSheets no longer count against the stylesheet inlining budget.

    1.416.1release notes

  • The default 10,000-rule budget moves into posthog-js session recording options, preserving configured overrides including 0.

    1.416.1release notes

  • Duration samples spanning tab suspension are now discarded and reported through a debug telemetry event.

    1.416.1release notes

  • Supports removing multiple persisted properties in one operation.

    1.415.2release notes

  • The intro is dismissed by a button without recording a response or affecting completion and partial-response metrics.

    1.415.0release notes

  • Intro screen copy supports translation like the thank-you message.

    1.415.0release notes

  • When both masking options are set, maskAllElementAttributes wins, maskAttributeFn is ignored, and a console warning is emitted.

    1.413.3release notes

  • Minimal feature-flag events now retain referring-domain and canonical campaign parameters for session attribution.

    1.411.0release notes

  • Rate limit warnings now report privacy-aware dropped-event counts, page context, and session context.

    1.410.10release notes

  • reset() now logs a warning when opt_out_capturing_by_default silently opts the user out again after opt_in_capturing().

    1.410.9release notes

  • Network-level message send failures are treated as transient, showing a connection message and logging warnings instead of errors.

    1.410.2release notes

  • Calling init() again with a different project token now produces a warning with actionable guidance.

    1.410.2release notes

  • Canvas recording now merges its sampling with user-provided sampling instead of overwriting it.

    1.410.0release notes

  • $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.0release notes

  • Session recording request timestamps are sent in request bodies instead of query strings.

    1.407.4release notes

  • Analytics request timestamps are sent in capture bodies, while query timestamps remain used for session recordings.

    1.407.3release notes

  • SDK library identity is sent in feature flag person properties instead of URL query parameters.

    1.407.3release notes

  • Feature flag timestamps are now sent in ISO format within request bodies.

    1.407.1release notes

  • Capture POST requests now use numeric sent_at timestamps in the query string.

    1.407.1release notes

  • Debug mode now warns when client-side session recording masking options override project-level Privacy and masking settings.

    1.407.0release notes

  • Users can start a new conversation while an unresolved ticket remains open.

    1.407.0release notes

  • 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.0release notes

  • Network-level fetch failures now log at warn instead of error because they are expected and retried by the request queue.

    1.399.5release notes

  • Browser SDK requests no longer include the gzip compression query parameter.

    1.398.2release notes

  • The deprecated ver query parameter is no longer sent to capture and session recording endpoints.

    1.398.1release notes

  • The loaded callback's instance type now includes config, enabling typed access to that property.

    1.397.0release notes

  • Cached survey definitions refresh after a short TTL so server-side survey changes reach long-lived tabs without reloads.

    1.396.6release notes

  • Android Chromium now captures the $device_model super-property during initialization and sends it on subsequent events.

    1.394.0release notes

  • Console-log records now include the standard SDK context field feature_flags.

    1.392.0release notes

  • Auto-captured console logs now use the same pipeline as captureLog() and logger.*, including standard PostHog log processing.

    1.392.0release notes

  • Console logs now use posthogDistinctId for person linking, so they appear on person profiles by default.

    1.392.0release notes

  • The default payload host deny list now skips more third-party analytics, RUM, and session-replay telemetry hosts without replay value.

    1.391.4release notes

  • The latest defaults bundle opts new installs into a 0.6 canvas capture scale, while the option itself defaults to full resolution.

    1.391.0release notes

  • Product tours follow the updated event-trigger activation and persistence model.

    1.390.1release notes

  • Retries are limited for transport failures without an HTTP response.

    1.389.1release notes

  • Log delivery now splits oversized batches automatically, making browser programmatic logs more resilient.

    1.389.0release notes

  • Failed log sends now retry with exponential backoff, improving delivery resilience.

    1.389.0release notes

  • Session replay now records native fullscreen transitions and reapplies fullscreen layout during playback, including when scrubbing into fullscreen regions.

    1.387.0release notes

  • onSessionId handlers now receive crossTabAdoption when adopting a sibling tab's session, so session-scoped state can follow the new session.

    1.386.3release notes

  • Volatile flag and survey metadata changes no longer rewrite split-storage entries or rebroadcast full payloads unless content changes.

    1.386.3release notes

  • Feature flags now reload by default when resetting person properties for flags.

    1.385.0release notes

  • __preview_disable_xhr_credentials is now a no-op.

    1.384.3release notes

  • The Google Search App is reported as Google Search App instead of Mobile Safari or Chrome when enabled.

    1.384.0release notes

  • The 2026-05-30 config defaults enable Google Search App detection automatically; other configurations remain opt-out by default.

    1.384.0release notes

  • Partial rageclick configuration objects merge with date-gated defaults; explicit values can override individual defaults or disable the feature entirely.

    1.382.0release notes

  • Browser tracing header configuration is now publicly supported through tracing_headers.

    1.380.0release notes

  • The 2026-05-30 config default automatically enables a 250ms debounce window.

    1.378.0release notes

  • $web_vitals reporting is now enabled when cookieless mode is enabled.

    1.374.3release notes

  • Open text survey questions submit with Cmd/Ctrl+Enter while plain Enter continues inserting a newline.

    1.373.5release notes

  • Survey translation logs are now gated behind SDK debug logging to avoid production console spam.

    1.372.8release notes

  • Browser surveys can render translations, enabling localized survey experiences.

    1.372.3release notes

  • Browser surveys track language, supporting language-aware survey behavior.

    1.372.3release notes

  • The OTLP scope.version field now contains the SDK version, changing the server instrumentation_scope value.

    1.371.2release notes

  • SDK-owned persistence keys now require explicit classification as event-visible, hidden, or derived, affecting which persistence state can appear in events.

    1.371.1release notes

  • Adds exception steps to error tracking, also known as breadcrumbs.

    1.370.0release notes

  • Active feature flag payloads are excluded from event properties, reducing unwanted data in captured events.

    1.369.1release notes

  • Adds handling for session replay trigger groups in V2.

    1.369.0release notes

  • Numeric survey rating options now show a hover state, providing clearer pointer feedback before selection.

    1.366.2release notes

  • Consent persistent store is re-evaluated when config changes, enabling cross-subdomain consent sharing.

    1.366.1release notes

  • Rejects the strings "undefined" and "null" as distinct IDs, and invalid IDs now always log a critical console error.

    1.364.0release notes

  • Anonymous users are automatically identified during the relevant bootstrap flow.

    1.363.0release notes

  • Calling reset() now automatically reloads feature flags.

    1.360.2release notes

  • Compressed requests now use ArrayBuffer for request data.

    1.356.2release notes

  • The recorder now outputs an event when recording starts.

    1.356.1release notes

  • Undated persisted recording configs are now treated as stale, so recording waits for a fresh remote config before starting.

    1.356.1release notesrelease notes

  • $user_state is now persisted to a cookie, enabling server-side access.

    1.353.0release notes

  • Tours now track clicks on banners.

    1.351.2release notes

  • config.js is now the sole config loading mechanism for posthog-js.

    1.350.0release notes

  • Replay now applies a DOM depth limit, affecting how deeply nested DOM content is captured.

    1.347.2release notes

  • Product tour images are preloaded, which may improve image availability during tours.

    1.347.1release notes

  • The z-index ordering was updated so tours appear above surveys, which appear above conversations.

    1.347.0release notes

  • Tours are now enabled by default, so applications using tours no longer need to enable them explicitly.

    1.346.0release notes

  • Adds product tour button clicked events for tracking interactions with product tour buttons.

    1.345.2release notes

  • Survey shown tracking was added to useThumbSurvey.

    1.345.1release notes

  • Markdown is now rendered in the support product.

    1.337.0release notes

  • Element inference is enabled for product tours, affecting how tour elements are identified.

    1.334.1release notes

  • sendMessage now sends context with the message.

    1.333.0release notes

  • Tickets now include more context when created, helping developers provide richer information in ticket records.

    1.330.0release notes

  • The support product no longer has a loading state.

    1.329.0release notes

  • Adds cache and URL-change tracking for regex behavior.

    1.324.1release notes

  • The logs extension no longer requires preflight requests.

    1.324.0release notes

  • Product tours now support banner rendering.

    1.321.1release notes

  • Adds first snapshot timestamp logging for monitoring and debugging purposes.

    1.317.1release notes

  • Product tours now support rich content.

    1.317.0release notes

  • Product tours now support multiple pages, enabling tours to span more than one page.

    1.315.1release notes

  • Adds a person property for the last-seen survey date to provide more consistent behavior across browsers and devices.

    1.314.0release notes

  • Lifecycle start events now include targetSessionID.

    1.314.0release notes

  • Product tour steps can progress when users click an element.

    1.309.0release notes

  • Feature flag requests now include $device_id, allowing flag fetching to use the device identifier.

    1.307.1release notes

  • console.error capture now includes synthetic exceptions.

    1.306.2release notes

  • Adds events for survey cancellation.

    1.299.0release notes

  • Overriding feature flags now outputs a confirmation log message, helping users know whether the action actually took effect.

    1.297.0release notes

  • Initialization now yields to the main thread, helping avoid blocking during posthog initialization.

    1.290.0release notes

  • Tracks the flushed size for each session, changing session-level telemetry behavior.

    1.287.0release notes

  • Session recordings now store the previous and next session ID, providing additional session context.

    1.285.0release notes

  • Exceptions thrown from the PostHog SDK are excluded from capture.

    1.280.0release notes

  • Capture retries network errors and HTTP 404, 408, 429, 500, 502, 503, and 504; later waits double up to the configured maximum with up to 25% random variation.

    1.0.0upgrade guide

  • Regular capture methods remain fire-and-forget; the background worker now splits analytics batches into requests of at most 5 MiB of serialized events.

    1.0.0upgrade guide

  • The default remains false; event or request-context $geoip_disable values override the setting, with null counting as set.

    1.0.0upgrade guide

  • Empty event names are sent and dropped by PostHog; names over 200 UTF-8 bytes are dropped with a per-event result.

    1.0.0upgrade guide

  • Minimized flag events are trimmed to their allowlist before before_send runs, so properties added by the hook are sent.

    1.0.0upgrade guide

  • The SDK fills $lib and $lib_version from event and request-context values before before_send; non-empty strings count as set, and the hook can change the result.

    1.0.0upgrade guide

  • The default number of capture attempts increases from 3 to 4.

    1.0.0upgrade guide

  • The hook must not call back into the SDK; immediate methods never call it, and queue-full or before_send drops do not reach it.

    1.0.0upgrade guide

  • Capture v1 reads per-event processing controls from an options map; options override their legacy property equivalents, while new server-supported options need no SDK upgrade.

    1.0.0upgrade guide

  • The SDK sends posthog-rs/<version> in this request header, which PostHog uses only to fill unset library identity properties.

    1.0.0upgrade guide

  • Scoped request context is available only with the async client and propagates to capture, identity, flag snapshot, and MCP calls as described.

    1.0.0upgrade guide

  • The first capture retry wait decreases from 200 ms to 100 ms.

    1.0.0upgrade guide

  • Exception trace_context continues to take precedence over trace IDs in exception properties and the trace context provider.

    1.0.0upgrade guide

  • The SDK sends this field as a top-level event field only when its value is a string; null is unset, and other types are dropped with a warning.

    1.0.0upgrade guide

Tooling 4

  • TypeScript declarations are now published under public dist paths for browser extension entrypoints.

    1.410.8release notes

  • Browser devtools now attribute console messages to the calling code instead of posthog-js's console wrapper.

    1.409.6release notes

  • Release tooling now recursively publishes dist/toolbar/ bundles with explicit JavaScript MIME types and supports the canonical toolbar.js/toolbar.css layout.

    1.398.5release notes

  • The rrweb worker sourcemap is shipped from posthog-js/dist so downstream bundlers need not access rrweb internals.

    1.376.0release notes

Fixes and other changes 443

  • Sends base64 beacon bodies as bare text/plain so /i/v0/e/ accepts page-unload events when gzip compression is disabled or unavailable.

    1.450.1release notes

  • Scroll events are throttled per element so a resting scroll offset is not dropped when another element scrolls in the same 100ms window.

    1.449.2release notes

  • Fixes dropdown selection masking without changing custom multiselect behavior.

    1.447.15release notes

  • Fixes blocked-value leaks.

    1.447.14release notes

  • Preserves custom mask passthrough.

    1.447.14release notes

  • Fixes dropdown replay updates.

    1.447.14release notes

  • Network metrics no longer record server-sent event streams, which otherwise appear to last for minutes and skew duration percentiles.

    1.447.13release notes

  • Full snapshots no longer force the layout of content-visibility content that the browser skips.

    1.447.9release notes

  • Observed CSS-variable shorthands are preserved across full session replay snapshots, including uninterrupted session rotations.

    1.447.8release notes

  • Debug mode warns once when history-based pageviews are explicitly configured without the required history autocapture extension.

    1.447.8release notes

  • Fixes session recording errors when adopted stylesheets are locked by another script.

    1.447.6release notes

  • Replay continues after a removal has the wrong parent or an addition targets a leaf node, preventing mutation batches from stopping.

    1.447.5release notes

  • Fixes snapshot rebuilding when the replay document already has a root element.

    1.447.5release notes

  • Preserves non-empty CDATA content with text masking and rebuilds it as text in HTML documents.

    1.447.3release notes

  • The description of the llm_model argument added to WebMCP tools was reworded so it no longer points the model at its system prompt.

    1.447.1release notes

  • Uses native sibling accessors when recording insertion positions so patched DOM getters do not reorder replayed nodes.

    1.446.3release notes

  • Avoids duplicate same-origin iframe observers after full snapshots during session recording.

    1.446.2release notes

  • Fixes tree shaking of unselected extensions and shared utilities when using the slim SDK.

    1.446.1release notes

  • Timed-out requests now report statusCode: 0 with an error named AbortError, matching the fetch transport.

    1.445.6release notes

  • When client rate limiting drops a $feature_flag_called event, it is sent again at the next capture instead of losing the flag exposure.

    1.445.5release notes

  • Relative path resolution in session recordings now preserves CSS URL fragments.

    1.445.4release notes

  • The support widget skips its initial ticket list request for new anonymous visitors.

    1.445.4release notes

  • Web experiments running on a feature flag now honor each variant's URL conditions, so variants only change the pages they target.

    1.445.3release notes

  • Feature flags read before capture opt-in now send this event when the user opts in, without requiring the flag to be read again.

    1.445.2release notes

  • Now captures the $opt_in event (or custom captureEventName) only when the user was not already opted in, avoiding a billed event on every page load when stored consent is reapplied.

    1.445.1release notes

  • Tab widget surveys now honor the selected appearance position; the popup is centered next to the tab only for the default right position or next to trigger.

    1.444.4release notes

  • Respects external script loading policies when reusing scripts or inserting deferred dependencies.

    1.444.3release notes

  • Fixes session replay retaining a stylesheet's old CSS when a link changes to a stylesheet the recorder cannot read.

    1.444.2release notes

  • Session replay now captures stylesheets that load after 5 seconds or after a <link> changes its rel or href.

    1.444.1release notes

  • Hosted and local loaders honor the selected latest, major, or exact-version SDK namespace.

    1.443.0release notes

  • URL masking now keeps the rest of the URL when a query value contains ? or the hash contains #.

    1.442.1release notes

  • Falls back to Math.random when crypto.getRandomValues throws, so UUID generation no longer breaks capture.

    1.441.1release notes

  • Fixes stale identity when restoring a page from the back-forward cache.

    1.439.2release notes

  • Fixes response-based branching for optional rating surveys when they are skipped.

    1.438.24release notes

  • Rejects a prefilled rating of 0 when the rating scale starts at 1.

    1.438.21release notes

  • Query params now use form-encoding rules: encoded plus signs remain plus signs, and values containing = are no longer truncated. This fixes UTM, click ID and search keyword properties.

    1.438.20release notes

  • The widget comes back after reset() or after a cookieless visitor calls opt_in_capturing(), rather than remaining unavailable until the next page load.

    1.438.18release notes

  • When recordHeaders and recordBody are false and network timing is off, session replay no longer installs the network plugin, even if the project enables network payload capture.

    1.438.17release notes

  • Filtering output remains valid JSON and matches svg+xml and parameterised data URIs.

    1.438.17release notes

  • Session replay records mouse movement inside same-origin iframes as mouse movement instead of touch movement, keeping the replay cursor visible.

    1.438.17release notes

  • Feature flags read before opting in to capturing now send this event the next time they are read after opt-in.

    1.438.16release notes

  • During real-time session replay, scrolls on scroll-snap-type containers land instantly, keeping revealed sheets and carousels consistent with Safari; other elements still animate.

    1.438.16release notes

  • All survey subscribers are notified when survey loading fails.

    1.438.14release notes

  • Buffered web vitals are flushed immediately using a beacon when the page is hidden or unloaded.

    1.438.13release notes

  • Backward device clock changes no longer subtract client rate-limit tokens.

    1.438.12release notes

  • WebMCP failures are captured in Error Tracking when exception autocapture is enabled; slim builds require this extension alongside WebMCPExtensions.

    1.438.11release notes

  • Callback types now accept non-null events while still allowing null returns to drop events.

    1.438.9release notes

  • Captures WebMCP error types and sanitized messages.

    1.438.8release notes

  • WebMCP intent and model injection are skipped for schemas whose constraints could be broken by the additional fields.

    1.438.6release notes

  • Publishes the feature flag types imported from @posthog/browser-common, fixing type checking in posthog-js.

    1.438.4release notes

  • Feature flag functionality is shared across browser SDKs while preserving existing behavior.

    1.438.2release notes

  • Events carrying pending Meta $fbc or $fbp identifiers are batched again, reducing races with preceding identify() calls.

    1.436.1release notes

  • Stops a SecurityError from escaping the recorder when an iframe becomes cross-origin during shadow DOM observation startup.

    1.435.9release notes

  • Preserves shared identity while consent is pending and clears it after shared rejection in cookieless mode.

    1.435.7release notes

  • Cross-subdomain identity continuity is fixed when users opt in after cookie consent.

    1.435.6release notes

  • Registered properties are preserved across initialization and configuration updates when persistence writes are debounced.

    1.435.5release notes

  • Session attribution is preserved across initialization and configuration updates when persistence writes are debounced.

    1.435.5release notes

  • Fixes a DataCloneError when session replay records network timing inside a cross-origin iframe.

    1.435.4release notes

  • The debug signal now reflects rrweb's own recording state.

    1.435.3release notes

  • Session recording now starts at DOMContentLoaded, allowing recording when the page load event is delayed or never fires.

    1.435.3release notes

  • PostHogFeature without match now shows the fallback when the flag evaluates to false.

    1.435.1release notes

  • Initialization no longer writes analytics persistence data when persistence is disabled or opted out.

    1.434.18release notes

  • Replay masking callback errors are isolated so unrelated network records continue to be captured.

    1.434.18release notes

  • Survey URL prefill values preserve equals signs, while malformed URL parameters no longer block surveys.

    1.434.18release notes

  • CSS-in-JS styles remain available after a large DOM change in the page head.

    1.434.17release notes

  • Buffered data is preserved when a held recording epoch reaches the size cap.

    1.434.17release notes

  • The modern replay network masking callback is honored when both modern and deprecated hooks are configured.

    1.434.16release notes

  • SPA $pageview events from pushState/replaceState navigations no longer carry the previous page's title.

    1.434.15release notes

  • Fixes useThumbSurvey to use the client passed to PostHogProvider, enabling survey event capture.

    1.434.14release notes

  • Replay loads recorded fonts under the replay iframe's content security policy instead of the embedding page's.

    1.434.13release notes

  • Cross-domain cookie probes are avoided when cross-subdomain cookies are disabled.

    1.434.11release notes

  • SDK initialization now works when a script loader pre-creates window.posthog as a placeholder object.

    1.434.10release notes

  • 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.9release notes

  • Dead-click detection now survives denied DOM property access in Firefox and continues refreshing the liveness timestamp.

    1.434.8release notes

  • Session replay network capture starts in frames without PerformanceObserver or supportedEntryTypes, recording without live network timing.

    1.434.7release notes

  • Session recording stays active when a cross-origin image or video taints a canvas.

    1.434.6release notes

  • Dead clicks are no longer reported for controls inside open shadow roots when clicks update content within the shadow root.

    1.434.5release notes

  • Prevents $session_id from being sent as null when a sibling tab resets the session before this tab captures its first event.

    1.434.4release notes

  • The browser SDK retries feature flag requests on HTTP 502/504 responses and request timeouts.

    1.434.3release notes

  • Survey answer snapshots and response event properties are shared with React Native for consistent partial response reporting.

    1.434.2release notes

  • Replay network waterfall now captures document navigation timing when recording starts after page load and avoids partial duplicates during loading.

    1.434.1release notes

  • Survey shuffling no longer mutates configured choices.

    1.433.10release notes

  • Survey shuffling preserves the Other choice as the last choice.

    1.433.10release notes

  • Canvas settings are no longer changed when canvas capture fails to start.

    1.433.10release notes

  • Adds a session diagnostic when stale replay configuration cannot be refreshed, without changing recording behavior.

    1.433.9release notes

  • URL prefill continues working when localStorage is unavailable, including on opaque-origin pages or in private browsing.

    1.433.7release notes

  • The recorder no longer treats this resource hint as a stylesheet, preventing duplicated CSS in full snapshots and failed stylesheet deferrals.

    1.433.6release notes

  • 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.4release notes

  • Captures causes and AggregateError members with relationship metadata and individual stacks, limiting output to 50 entries and 1,000 member inspections.

    1.433.4release notes

  • Keeps observers that initialized successfully when another observer fails, and reports failed observers in recorder debug properties.

    1.433.4release notes

  • Drops an oversized replay event when it cannot be stringified while continuing to ship the remaining buffer during unload flush.

    1.433.4release notes

  • Retryable browser responses respect repeated Retry-After headers up to 30 seconds without shortening exponential backoff.

    1.433.2release notes

  • Snapshots from different windows of the same session upload separately, preserving window attribution.

    1.433.2release notes

  • Autocapture attribute masks now apply to link URLs and legacy class properties.

    1.433.1release notes

  • Fixes lost event retries after restoring a page from the back-forward cache.

    1.432.0release notes

  • Fixes false dead clicks after synchronous DOM updates; stopped-bubbling clicks are now evaluated and may increase counts for inert controls.

    1.431.8release notes

  • Avoids keepalive quota failures when multiple event requests are in flight.

    1.431.7release notes

  • Pending replay network captures are discarded after recording stops or restarts.

    1.431.5release notes

  • Identical person property retries are no longer dropped after the original capture is rejected.

    1.431.4release notes

  • Fixes replay cleanup when the host's children are removed before destroying the player.

    1.431.3release notes

  • Console-captured exceptions are marked as handled and identified with their console origin.

    1.431.2release notes

  • Replay errors during playback and seeking no longer stall the remaining events after a failed event.

    1.431.0release notes

  • Console capture now stops correctly and avoids duplicating after restart when another library wraps the console.

    1.430.4release notes

  • Fixes session recording failing to restart after capturing events while stopped with expired config.

    1.430.3release notes

  • 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.2release notes

  • Scroll depth metrics no longer carry over between pages after client-side navigation.

    1.430.1release notes

  • Batched event timestamps are preserved so delayed retries do not shift event times or prevent deduplication.

    1.430.0release notes

  • Failing log flushes continue backing off when new records arrive instead of resetting to the flush interval.

    1.429.5release notes

  • Logs and metrics always preserve service attribution and telemetry SDK fields when resource attributes are too large.

    1.429.5release notes

  • Session replay stops recording autoplay attribute mutations on video and audio elements, preventing repeated mutations from looping background media.

    1.429.4release notes

  • Console methods now receive console as their receiver when recording logs and reporting wrapper failures.

    1.429.4release notes

  • Error tracking excludes injected scripts and unsupported URL schemes from in-app issue grouping while retaining frames for context.

    1.429.4release notes

  • A console message is logged when this option prevents surveys from displaying.

    1.429.3release notes

  • Bootstrap values may now be null.

    1.429.3release notes

  • Null or empty distinct IDs are treated as missing.

    1.429.3release notes

  • Native ESM loading was fixed for consumers using native ES modules.

    1.429.2release notes

  • Recording package exports were fixed so consumers can import the package correctly.

    1.429.2release notes

  • Compatibility was fixed for consumers compiling with strict TypeScript 4.7 settings.

    1.429.2release notes

  • Text selection and editable caret gestures are no longer incorrectly reported as dead clicks when mouse release is delayed.

    1.429.0release notes

  • Clicks that select or unselect text are no longer reported as dead clicks.

    1.429.0release notes

  • TypeScript compatibility between public replay events and the replay player is fixed.

    1.429.0release notes

  • Surveys stay hidden while capture is disabled, and answers are preserved if capture stops before submission.

    1.429.0release notes

  • Empty survey placeholder text no longer displays the default "Start typing..." placeholder.

    1.428.11release notes

  • Repeated frame cycles are collapsed in parsed stack traces to reduce grouping differences caused by recursion depth while preserving distinct throw locations.

    1.428.8release notes

  • Restores connectivity tracking when a page returns from the back-forward cache, without reactivating it after explicit shutdown().

    1.428.7release notes

  • isRecording() no longer reports a stopped recorder as started.

    1.428.5release notes

  • Browser handling drops Safari extension exceptions caused by WebKit messaging failures.

    1.428.5release notes

  • Session replay no longer renders the internal script placeholder, including inside shadow roots and replay iframes.

    1.428.5release notes

  • Playback skips malformed mouse-move positions and uses the event timestamp instead of stalling or ending.

    1.428.5release notes

  • Recorder teardown continues after cleanup-handler errors, allowing recording to restart after an idle reset.

    1.428.5release notes

  • Buffered session replay snapshots survive page unloads and are picked up by the next page in the same tab.

    1.428.5release notes

  • Idle tabs no longer extend the previous session recording across the entire idle gap when they wake.

    1.428.4release notes

  • Waits for the initial remote config outcome before using cached autocapture enablement, preventing capture after a project is newly disabled.

    1.428.3release notes

  • 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.2release notes

  • 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.1release notes

  • Session-id rotation synchronously drains compressed replay data so the old session's unflushed tail is preserved.

    1.427.3release notes

  • Exception autocapture no longer throws when wrapped handlers belong to another compartment or a destroyed document.

    1.427.3release notes

  • Discarding a recording no longer uploads stylesheet mutations emitted while the recorder stops.

    1.427.3release notes

  • Replay capture continues processing chunks after an individual chunk fails.

    1.427.3release notes

  • Session-id rotation resets the idle clock so the new session's first snapshot is not dropped or started prematurely.

    1.427.3release notes

  • Queued mutations no longer capture content beneath DOM or shadow ancestors that have become blocked.

    1.427.3release notes

  • Epochs without user interaction retain snapshots without uploading while $recording_status remains active.

    1.427.3release notes

  • Invalid clock values no longer break UUID generation.

    1.427.3release notes

  • Failures in automatic and manual exception processing no longer escape into customer code.

    1.427.2release notes

  • Automatic and manual exception capture no longer recursively recapture stack overflows raised while sending an exception.

    1.427.1release notes

  • Stack frames without filenames are no longer counted as in-app code.

    1.427.0release notes

  • Session recording events continue relaying when a cross-origin iframe redirects through the parent page's origin.

    1.427.0release notes

  • 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.3release notes

  • Explicitly false feature flag values supplied through bootstrap configuration are now preserved.

    1.426.2release notes

  • Event-specific $groups are now merged with groups registered on the browser client.

    1.426.2release notes

  • The anonymous distinct ID used for feature flag persistence is preserved when identify queues a reload behind an in-flight flags request.

    1.426.2release notes

  • Persisted initial URLs are limited by encoded cookie size, preventing long URLs and referrers from exceeding browser cookie limits.

    1.426.2release notes

  • 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.2release notes

  • The bundles polyfill Array.prototype.findLast so they keep capturing on browsers older than Chrome 97 and Safari 15.4.

    1.426.2release notes

  • 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.1release notes

  • 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.1release notes

  • Failed replay network body reads no longer escape into the host page's own fetch() call.

    1.424.1release notes

  • Stale session recorders no longer initialize after consent or session teardown, and are disposed when switching to cookieless mode.

    1.423.1release notes

  • ChatGPT app versions differ by platform, so this value should not be compared across platforms.

    1.423.0release notes

  • Cookie support detection now round-trips a probe cookie, improving storage selection when web storage and cookies are unavailable.

    1.423.0release notes

  • Drops a known uBlock Origin Lite Safari extension exception while preserving first-party exceptions with an unmasked in_app frame.

    1.423.0release notes

  • Returns an empty string for non-array input instead of throwing when runtime JavaScript callers provide malformed input.

    1.423.0release notes

  • Falls back to in-memory storage when web storage and cookies are unavailable, and preserves stored falsy values.

    1.423.0release notes

  • MutationBuffer cleanup now runs for empty normalized mutation batches, preventing DOM nodes from being retained indefinitely.

    1.423.0release notes

  • Polling backs off to avoid starving event sends.

    1.423.0release notes

  • Empty INP attribution reports no longer throw; metrics are captured with fallback attribution and no interaction details.

    1.423.0release notes

  • Survey events now report the language the user saw when answering, rather than the language active when the event fired.

    1.422.4release notes

  • Autocapture no longer throws a RangeError when sorting element attributes in browsers with faulty ICU data.

    1.422.3release notes

  • 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.1release notes

  • Console calls made before the logs script loads are now captured.

    1.421.2release notes

  • Session replay and posthog-js no longer leave each other's console wrapper in the call path when either stops.

    1.421.2release notes

  • Setting logs.captureConsoleLogs in init() now enables console autocapture.

    1.421.2release notes

  • Request timeouts now fire on pages where a browser extension makes Error.prototype.name non-writable.

    1.421.2release notes

  • Playback no longer ends when a recording contains a browser-refused shadow host; the player skips that subtree instead.

    1.420.0release notes

  • Fixes console log autocapture silently failing when an older posthog-js core loads a newer logs bundle.

    1.419.4release notes

  • Adds typed stable-name lookup for installed browser extensions when independently loaded survey code resolves feature flags.

    1.419.4release notes

  • Type declarations now support @types/react back to the declared 16.8.0 floor, avoiding TS2305 errors with older React types.

    1.419.2release notes

  • 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.1release notes

  • @types/react is now an optional peer dependency, avoiding unmet-peer warnings when React is absent while supporting posthog-js/react resolution.

    1.419.1release notes

  • Prevents failed CSSOM changes and fixes shadow DOM, cross-origin iframe, blocked and unsupported canvas, and deep DOM serialization edge cases.

    1.418.17release notes

  • Shares survey property matching between browser and React Native SDKs while preserving existing missing-value behavior.

    1.418.17release notes

  • Logs and metrics batches are retried after HTTP 408 instead of being dropped.

    1.418.14release notes

  • 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.12release notes

  • Prevents optional feature scripts from being added to the page more than once when api_host is a relative path.

    1.418.11release notes

  • Replay playback now continues across document swaps when constructed stylesheet adoption fails, using styles already applied.

    1.418.10release notes

  • Hover handling now ignores non-element and detached targets instead of throwing and stopping playback.

    1.418.10release notes

  • Backdated sessionIdle markers are attributed to the session that went idle, preventing rotation-born recordings from starting hours before their first snapshot.

    1.418.9release notes

  • Prevents logs and metrics from being silently dropped when attributes contain unsupported or unusually large values.

    1.418.8release notes

  • OtlpAnyValue.intValue is typed as string | number, so code reading it must handle both types.

    1.418.8release notes

  • The cookieless sentinel no longer leaks into identify() or real events, preventing distinct users from being merged.

    1.418.7release notes

  • Events are dropped when a before-send hook throws instead of sending the unmodified event.

    1.418.6release notes

  • Chromium <anonymous> stack frames from extension-injected, devtools, or string-evaluated code are no longer counted as in-app code.

    1.418.5release notes

  • 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.2release notes

  • 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.1release notes

  • Session recording takes a full snapshot when waking from idle after dropped DOM mutations, preventing duplicated or overlapping DOM in replay.

    1.417.4release notes

  • Restores exception autocapture compatibility for posthog-js clients through version 1.141.0.

    1.417.3release notes

  • Corrects exception types for non-Error objects thrown across browser extensions, iframes, and other realms instead of reporting them as Error.

    1.417.2release notes

  • Capture timestamp overrides are normalized to equivalent UTC ISO strings across browser, Node.js, and shared core SDKs.

    1.417.1release notes

  • Visibility and focus changes now suppress dead-click detection as liveness signals, preventing valid interactions from being flagged as dead.

    1.417.1release notes

  • Swallowed rrweb observer initialization errors no longer break session replay teardown or subsequent recorder restarts.

    1.417.1release notes

  • Deferred stylesheets are flushed synchronously when recording stops and during pagehide.

    1.416.1release notes

  • Fixes Chrome renderer crashes when closing in-app surveys and ensures popup state settles correctly during skipped, interrupted, or overlapping transitions.

    1.415.5release notes

  • The Segment integration config now accepts current and legacy Segment Analytics SDK types.

    1.415.4release notes

  • Preserves adopted stylesheets that arrive before a shadow root is attached, keeping Stencil and Lit components styled.

    1.415.3release notes

  • Prevents a buffer swapped in by re-entrant session rotation from being shipped during a replay flush.

    1.415.3release notes

  • Recordings containing only idle lifecycle markers are no longer opened.

    1.415.1release notes

  • The intro does not re-fire the survey shown event and is skipped when resuming a survey with answers in progress.

    1.415.0release notes

  • In-place object and array mutations are persisted when properties are re-registered.

    1.413.3release notes

  • Properties registered for a session are cleared when the PostHog session rotates.

    1.413.3release notes

  • Benign network failures no longer surface as unhandled promise rejections that exception autocapture could otherwise capture.

    1.413.2release notes

  • Recording now continues to capture mutations from adopted nodes originating in another realm.

    1.413.1release notes

  • Recorder-owned callback failures are contained and logged while exceptions from patched native host APIs remain preserved.

    1.413.1release notes

  • Held interaction-less recordings are discarded when a background document unloads without becoming visible.

    1.412.2release notesrelease notes

  • Stale persisted question indexes now discard the in-progress record and restart the survey; restored visited indices are filtered to valid questions.

    1.410.10release notes

  • Held rotation-born replay buffers now flush when a V2 event trigger matches.

    1.410.10release notes

  • Event-triggered survey popup delays now resume from the trigger time across page navigation instead of restarting on each page load.

    1.410.9release notes

  • 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.7release notes

  • Idle session rotations no longer ship billable recordings until user interaction or an explicit event trigger; held data is discarded otherwise.

    1.410.6release notes

  • Open surveys remain in place when their trigger element is unmounted and are torn down only after the user closes them.

    1.410.5release notes

  • Click listeners on previously resolved selector elements are removed when the selector resolves to a different element, preventing repeated show-widget events.

    1.410.5release notes

  • Preserves messages, source locations, and existing stacks from browser errors without a same-realm Error object.

    1.410.4release notes

  • Support reply bullet and numbered lists retain markers despite aggressive host-page CSS resets by applying inline list styles.

    1.410.3release notes

  • Duplicate snippet loaders no longer replace initialized instances or replay queued calls more than once.

    1.410.2release notes

  • Prevents the inline canvas recording worker from requesting an unusable source map from its blob URL.

    1.410.1release notes

  • Suppression rules now fail open when evaluation encounters an unknown operator or unsupported key, preventing exceptions from being dropped.

    1.409.5release notes

  • Session replay re-sends one frame per canvas after each full snapshot, preventing canvases from staying blank after seeking.

    1.409.4release notes

  • Auto-submitted hosted survey responses retain caller-provided event properties, and manual submission preserves the prefilled answer during partial-response merging.

    1.409.3release notes

  • Session replay no longer redacts network bodies when timestamps or UUID fragments resemble social security or credit card numbers.

    1.409.2release notes

  • Campaign parameters are refreshed after single-page application URL changes.

    1.408.3release notes

  • identify() no longer creates a person profile when the supplied ID matches an anonymously persisted distinct ID.

    1.408.3release notes

  • Fixes dead-click false positives on WebKit when the SDK uses an iframe-sourced MutationObserver fallback.

    1.408.2release notes

  • React hooks without a PostHogProvider receive the default PostHog instance again when the UMD build is loaded through CommonJS.

    1.407.8release notes

  • 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.7release notes

  • Fixes extension bundles when using the slim no-external browser build.

    1.407.6release notes

  • Paused replay seeks at an exact full snapshot timestamp now rebuild the snapshot frame before playback pauses.

    1.407.5release notes

  • Only reports surveys as renderable after their event or action activation trigger has fired.

    1.407.3release notes

  • Prevents server timings from dropped ingestion requests from causing an endless capture loop.

    1.407.3release notes

  • Session replay recordings remain playable after session rotation without prior user interaction, with recorder restart, session ID resync, and normal buffer flushing.

    1.407.2release notes

  • Dynamic GET requests continue preserving underscore cache-busting parameters.

    1.407.1release notes

  • Exception autocapture no longer throws when page error handlers contain truthy non-callable values.

    1.407.0release notes

  • Input observation skips native accessor calls on non-native objects, preventing uncaught Illegal invocation errors.

    1.407.0release notes

  • Recurring surveys wait for feature flags to load before eligibility checks and reload flags after completion to prevent duplicate responses.

    1.406.2release notes

  • save_referrer no longer overwrites explicitly registered $referrer or $referring_domain values, preserving attribution across SPA and iframe pageviews.

    1.406.1release notes

  • The active full snapshot interval now applies as soon as a recording trigger matches.

    1.405.3release notes

  • Failed remote config requests no longer enable autocapture for opted-out projects; it stays off until a successful config response.

    1.404.1release notes

  • Synchronous throws from monkey-patched fetch now follow async rejection handling, allowing request queue retries without unhandled exceptions.

    1.404.0release notes

  • Replay events containing array-based circular references are captured with [Circular] markers instead of being dropped.

    1.402.3release notes

  • Session recording drops replay updates for non-native input elements instead of throwing an uncaught TypeError.

    1.402.2release notes

  • Beacon quota rejections are now split and retried recursively, with non-keepalive fetch fallback and a warning when splitting cannot continue.

    1.400.0release notes

  • Ancestor traversal stops after 1000 ancestors or on revisiting a node, preventing indefinite walks on abnormal host-page DOM trees.

    1.399.5release notes

  • 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.4release notes

  • Event serialization no longer throws on circular captured properties; true cycles become "[Circular]", preventing recaptured $exception loops.

    1.399.3release notes

  • Prevents shared rrweb global wrappers from growing without bound during recorder start/stop cycles, avoiding call-stack overflow.

    1.399.2release notes

  • Session recording startup now degrades gracefully when an older bundled core lacks SessionIdManager methods.

    1.399.1release notes

  • Fixed session replay leaking a shadow-root observer when a same-origin iframe is removed.

    1.398.7release notes

  • Cleanup no longer throws when the rrweb recorder cannot remove a listener.

    1.398.6release notes

  • Session recordings now preserve the initial full snapshot after an idle session-id rotation, preventing new recordings from becoming unplayable.

    1.398.4release notes

  • Session replay no longer silently drops shadow DOM mutations after an iframe teardown.

    1.398.3release notes

  • Network capture now degrades gracefully when instrumentation throws, preserving the host application's own XHR and fetch calls.

    1.398.2release notes

  • 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.2release notes

  • The TypeScript definition now accepts the instance passed to the loaded callback, matching documented usage.

    1.397.0release notes

  • Prevents infinite-recursion stack overflows by bypassing the wrapped console during internal logging and guarding against re-entrancy.

    1.396.8release notes

  • Stops repeatedly hitting blocked feature flag and conversations polling endpoints after consecutive status-0 failures.

    1.396.7release notes

  • Own feature-flag timeouts are logged as warnings instead of errors when browsers do not propagate abort reasons.

    1.396.6release notes

  • Prevents uncaught crashes in heatmaps and autocapture when event targets are cross-realm elements from iframes or synthetic events.

    1.396.5release notes

  • Callbacks are isolated so a throwing user handler no longer breaks the remaining callback chain or gets misattributed as an SDK error.

    1.396.4release notes

  • 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.4release notes

  • Web vitals capture no longer crashes on browsers lacking Array.prototype.at(), including Chrome <92 and iOS Safari <15.4.

    1.396.3release notes

  • The IE11 bundle now includes a Promise polyfill and avoids async compression paths when Promise support is unavailable.

    1.396.2release notes

  • Browser requests fall back to uncompressed encoding when gzip encoding fails.

    1.396.1release notes

  • Request serialization errors no longer throw or block queued requests.

    1.393.6release notes

  • Browser console log capture now works when session activity timestamps are missing, and session attributes refresh for each log.

    1.393.4release notes

  • Page unload handling now guards the delegated method when a version-skewed surveys chunk lacks handlePageUnload.

    1.393.3release notesrelease notes

  • Stops logging a misleading server-upgrade warning when valid v2 flags responses contain no flags.

    1.393.2release notes

  • PostHog fetch timeouts now abort with an explicit descriptive reason while preserving AbortError handling and avoiding noisy exception recapture.

    1.391.9release notes

  • The browser SDK no longer adds the unused beacon query parameter to sendBeacon requests.

    1.391.6release notes

  • Applies the existing base64 image size cap to SVG image elements with data URIs in href and xlink:href, including mutations.

    1.391.5release notes

  • Binary and asset request or response bodies are never recorded, even when recordBody is enabled.

    1.391.3release notes

  • Custom event UUID overrides are validated, and new UUIDs are generated when overrides are invalid.

    1.391.2release notes

  • Delayed surveys now re-check full display eligibility before rendering and are cancelled when later evaluation finds them ineligible.

    1.391.1release notes

  • 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.2release notes

  • 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.2release notes

  • Repeatable surveys using schedule: 'always' are consumed when shown, so each captured trigger shows them once.

    1.390.1release notes

  • Browser log delivery now resumes when the browser comes back online.

    1.389.0release notes

  • Merging flags no longer stores active feature flag overrides, so clearing an override restores the original flag.

    1.388.2release notes

  • Events are dropped and a warning is logged when a before_send hook removes token, avoiding rejected ingestion requests.

    1.387.0release notes

  • External scripts for exception and dead-click autocapture are not reloaded when already present.

    1.387.0release notes

  • The browser SDK no longer adds the unused ip query parameter to requests.

    1.387.0release notesrelease notes

  • 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.8release notes

  • Surveys now swallow SecurityError from remaining localStorage accesses in cross-origin iframes instead of bubbling errors to user monitoring.

    1.386.7release notes

  • Disabling product tours now clears the cached tours blob, preventing stale data from persisting and broadcasting across tabs.

    1.386.6release notes

  • Prevents active rrweb capture from being silently torn down after session-id rotation, restoring replay event production and listener registration.

    1.386.5release notes

  • 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.4release notes

  • Session IDs remain stable across tabs, reducing spurious session fragmentation and correcting over-counted sessions.

    1.386.3release notes

  • The support widget now re-attaches after SPA navigations replace document.body, preventing it from disappearing until a full page reload.

    1.386.3release notes

  • Sampled-in session replay decisions are refreshed after the configured replay sample rate changes.

    1.386.1release notes

  • Snapshots are never recorded or flushed without a sampling decision, preventing junk recordings and stale decisions across session changes.

    1.386.1release notes

  • 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.0release notes

  • Past events are applied synchronously only in live mode, preventing on-demand playback seeks and exports from using corrupted recording data.

    1.384.1release notes

  • In cookieless on_reject mode, opting out now respects capture_pageview: false.

    1.383.1release notes

  • Heatmap rageclick markers now apply the same suppression rules as the $rageclick event.

    1.382.0release notes

  • Survey rendering no longer uses a WebKit-crashing :has selector; empty headers now use a JavaScript-set class and sibling selector.

    1.380.1release notes

  • The tracing header now reads the distinct ID at request time, reflecting bootstrap, identify, reset, and other identity changes.

    1.380.0release notes

  • The console-log integration now suppresses log events after opt-out and resumes emitting them after opt-in.

    1.379.3release notes

  • 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.2release notes

  • Same-origin iframe documents, observers, serialized nodes, and cleanup handlers are released when iframes are removed, preventing session recording memory leaks.

    1.379.1release notes

  • Safari no longer exposes internally-created Request bodies to downstream fetch wrappers.

    1.378.1release notes

  • Initialization paths no longer throw or send requests when PostHog project tokens are missing or blank.

    1.377.0release notes

  • Takes a fresh full replay snapshot after session ID rotation, preventing new sessions from receiving only incremental mutations.

    1.376.4release notes

  • Enables the request queue when opting out in on_reject cookieless mode, allowing batched events to flush over the network.

    1.376.4release notes

  • Publishes the replay fix for absolutely positioned elements marked with ph-no-capture.

    1.376.4release notes

  • 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.2release notes

  • Stylesheet URLs are captured from link.sheet.href and link.sheet is tried directly for inlining, preserving recordings across SPA route changes.

    1.374.4release notes

  • PostHogProvider no longer throws or initializes when no API key or client is provided.

    1.374.4release notes

  • Tracing headers are now applied to matching XMLHttpRequest requests.

    1.374.4release notes

  • Preserves session-recording remote config across reset, allowing new sessions to start with recording metadata and a FullSnapshot.

    1.374.2release notes

  • posthog.capture now respects transport overrides passed to it.

    1.374.1release notes

  • 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.0release notes

  • 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.4release notes

  • Native gzip output is validated before requests, with fallback when CompressionStream returns malformed data.

    1.373.2release notes

  • Prevents browser log capture from throwing when console arguments contain unreadable properties.

    1.373.1release notes

  • Invalid persisted session replay configuration JSON is handled gracefully.

    1.373.0release notes

  • Background refreshes are skipped when no document is available.

    1.373.0release notes

  • Session recording now stops before sessionManager destruction, preventing late rrweb events from throwing in cookieless rejection mode.

    1.372.10release notes

  • Original style text is preserved when CSSOM serialization produces empty longhands from var() shorthands, preventing layout rules from being dropped during replay.

    1.372.10release notes

  • Canvas recording now skips snapshots during WebGL context loss and catches getCanvas traversal errors, preventing recording from silently stopping for the session.

    1.372.9release notes

  • Fixes copy autocapture when copying or cutting text from Shadow DOM or document fragment contexts.

    1.372.4release notes

  • Fixes autofocus behavior for developers using posthog-js.

    1.372.2release notes

  • Native async gzip compression no longer uses Blob.stream(), preventing Safari NotReadableError stream failures.

    1.372.1release notes

  • Fixed session recording in the full no-external browser bundles.

    1.371.3release notes

  • NaN and ±Infinity attribute values are preserved during JSON encoding instead of being silently dropped.

    1.371.2release notes

  • Guards survey seen localStorage access to prevent access-related issues.

    1.370.1release notes

  • When opt_out_capturing_by_default is set, PostHog now starts in cookieless mode.

    1.369.4release notes

  • Reinstated in captured event properties, making feature flag payload data available again.

    1.369.3release notes

  • Reinstated in captured event properties, making survey activation data available again.

    1.369.3release notes

  • Unnecessary persisted config and activation properties are no longer added to captured events, including product tours, surveys, and session recording config.

    1.369.1release notes

  • Recording triggers for V2 triggers now account for property filters on events.

    1.369.0release notes

  • Browser SDK disables native gzip compression after a NotReadableError.

    1.368.2release notes

  • Bootstrapped feature flags are no longer overwritten by a partial /flags response when this option is enabled.

    1.368.1release notes

  • IframeManager destroy now handles SecurityError.

    1.365.3release notes

  • IframeManager removeIframeById now handles SecurityError.

    1.365.3release notes

  • The mutation buffer is cleared on iframe pagehide to prevent recording corruption.

    1.365.3release notes

  • Unchanged setAttribute calls are skipped to prevent replay flicker.

    1.365.3release notes

  • Preserves $set_once semantics in the local flag evaluation cache.

    1.365.0release notes

  • Sends $groupidentify for new groups even when no properties are provided.

    1.364.7release notes

  • Fixes crashes in slim and extension bundles caused by inconsistent property mangling.

    1.364.6release notes

  • Canvas FPS snapshots now recover from createImageBitmap or worker errors instead of permanently stopping canvas recording.

    1.364.5release notes

  • Avoids an infinite recursion crash when resetting or restarting the recorder on pages containing shadow DOM elements.

    1.364.5release notes

  • Snapshot and exception events skip deep copying to prevent stack overflow on deeply nested DOM trees.

    1.364.4release notes

  • Wraps the sendBeacon body in a Blob so the Content-Type header is set correctly.

    1.364.2release notes

  • Adopted stylesheets can now be cleared with empty strings.

    1.363.6release notes

  • Stop handler cleanup now handles cross-origin iframe errors.

    1.363.6release notes

  • Nested CSS rule handling is improved for replay behavior.

    1.363.6release notes

  • Object reference mutation no longer breaks remote CSS replay.

    1.363.6release notes

  • Stop handler cleanup now catches all SecurityError variants.

    1.363.6release notes

  • WebGLRenderingContext access is guarded for iOS compatibility.

    1.363.6release notes

  • Document visibility changes no longer capture dead clicks.

    1.363.5release notes

  • Logs a warning instead of throwing an error when ad blockers block the session recording script.

    1.363.2release notes

  • Bootstrap no longer causes a silent identity switch, making user identity behavior more predictable.

    1.363.0release notes

  • overrideFeatureFlags now handles plain array and object forms.

    1.363.0release notes

  • Initial person properties are now included with $identify calls even after being sent in a prior anonymous event, improving identification across subdomains.

    1.362.0release notes

  • Preserved from terser mangling so wrapper SDKs can call it.

    1.361.1release notes

  • Debug mode now persists across page navigations.

    1.361.0release notes

  • Restarts when the session rotates externally while idle, preventing Recording not found errors.

    1.361.0release notes

  • Legacy persisted configs without cache_timestamp are treated as fresh, preventing them from being cleared before recording starts.

    1.360.0release notes

  • PostHogFeatureFlags now uses a TreeShakeable<T> type.

    1.360.0release notes

  • 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.1release notes

  • Tablet detection now occurs in detectDeviceType, providing consistent device classification across all call sites.

    1.357.2release notes

  • Reuses a single OffscreenCanvas in the canvas recording worker, fixing a Safari memory leak.

    1.357.0release notes

  • Canvas FPS recording is skipped on browsers without OffscreenCanvas instead of running a loop that cannot produce data.

    1.356.2release notes

  • Canvas mutation data now includes displayHeight for correct replay sizing.

    1.356.2release notes

  • Canvas mutation data now includes displayWidth for correct replay sizing.

    1.356.2release notes

  • Canvas recording now closes ImageBitmaps on Safari versions without OffscreenCanvas, preventing a memory leak.

    1.356.2release notes

  • Recording initialization failures now report rrweb_error instead of appearing active while capturing no data.

    1.356.2release notes

  • Improves tablet and mobile classification when Chrome on Android tablets sends desktop-like user-agent strings.

    1.356.0release notes

  • Adds a re-entrancy guard for configurations combining ALL, regex, and event trigger matching.

    1.354.4release notes

  • Added additional legacy exports for fully qualified dist and lib exports, improving compatibility for existing imports.

    1.354.2release notes

  • All package export paths are exposed, allowing developers to access the intended package entry points.

    1.354.1release notes

  • Fixed an autofill bug in hosted surveys.

    1.353.1release notes

  • Fixed an issue where the toolbar interfered with distinct id handling in conversations.

    1.352.1release notes

  • Prevents an infinite recursion bug when using a 3rd party proxy with posthog.

    1.351.1release notes

  • Markdown is stripped in the tickets list.

    1.351.0release notes

  • Retries starting session recording when persisted remote configuration is stale.

    1.347.2release notes

  • Tree shaking configuration was reverted, potentially changing how application bundles are optimized.

    1.347.0release notes

  • Added the missing featureFlags property to the PostHog interface.

    1.345.5release notes

  • Restored set_config to the loaded callback type.

    1.345.5release notes

  • Session replay now respects the network_timing remote configuration, allowing network timing behavior to be controlled as intended.

    1.345.4release notes

  • Dead Clicks no longer continue being captured after being disabled via remote config.

    1.345.3release notes

  • Remote config cache invalidation is no longer too aggressive.

    1.345.0release notes

  • The replay remote config cache is now invalidated periodically.

    1.343.1release notes

  • The identification form is no longer shown when the user is already identified.

    1.343.0release notes

  • Legacy persistence entries with sampled: true are now ignored.

    1.343.0release notes

  • Fixed console error capturing so captured console errors behave correctly for developers using the library.

    1.342.1release notes

  • Tour manual click triggers now use preventDefault instead of stopPropagation.

    1.341.1release notes

  • Tours now infer elements more precisely and wait to mark a tour as shown until the first step renders successfully.

    1.339.1release notes

  • Fixed stale element references in multi-page product tours.

    1.338.1release notes

  • Fixed contrast colors in the support widget.

    1.338.0release notes

  • Failed flags are filtered before cached values merge, preventing transient backend errors from overwriting previously evaluated states.

    1.337.0release notes

  • Element clicks are no longer intercepted when a product tour fails to show.

    1.337.0release notes

  • Undefined and null configuration values are treated identically when config is received.

    1.336.2release notes

  • Fixes the color of the survey close button.

    1.335.5release notes

  • Survey cancel buttons are now black.

    1.335.2release notes

  • Reduces memory leaks in SPAs by upgrading web-vitals and removing duplicate observers on URL changes.

    1.334.0release notes

  • Fixed product tour tooltips on mobile devices.

    1.331.3release notes

  • Rate limiting configuration changes are now respected.

    1.331.2release notes

  • Logging objects with null or undefined property values no longer throws a TypeError.

    1.329.0release notes

  • Fetch wrappers were restored to the most recent working version.

    1.328.0release notes

  • Fetch wrappers no longer reconsume request bodies or generate mismatched FormData boundaries.

    1.327.0release notes

  • Wrapped fetch now always receives a RequestInit object, ensuring consistent fetch initialization behavior.

    1.325.0release notes

  • Wrapped fetch() now passes the duplex option when required.

    1.323.0release notes

  • Fixed an issue with _currentTicketId.

    1.322.0release notes

  • Product tour tooltips now use more robust element-based positioning.

    1.321.3release notes

  • Typing inside the loaded callback was fixed, improving type checking for callback implementations.

    1.319.2release notes

  • Missing public definitions were added to @posthog/types, improving the available type surface for developers.

    1.319.2release notes

  • Activity timestamp detection no longer compares null to numbers, preventing incorrect activity handling.

    1.318.2release notes

  • Adds missing sessionRecording types for developers using session recording APIs.

    1.318.0release notes

  • Survey responses prefilled from URL parameters now respect branching and skip logic instead of always advancing sequentially.

    1.316.1release notes

  • $prev_pageview_duration no longer spans session boundaries after session rotation, preventing inflated page duration values.

    1.312.0release notes

  • $device_id is persisted to cookies so it survives localStorage clears.

    1.310.2release notes

  • Callbacks are queued while a survey fetch is in progress instead of returning an error.

    1.310.2release notes

  • Hosted survey auto-submit behavior now only submits skipped questions.

    1.310.0release notes

  • Updated which network masking function is used.

    1.306.1release notes

  • Includes initial person properties in $identify when group() is called first.

    1.306.0release notes

  • Session recording restarts after opt_in_capture is called.

    1.302.1release notes

  • Prefilled questions now work for hosted surveys.

    1.302.0release notes

  • Session ID rotation no longer relies on stale in-memory cache after idle periods, especially when multiple windows are in use.

    1.301.1release notes

  • Clicks with CTRL, ALT, CMD, or Windows modifier keys no longer count as dead clicks.

    1.300.0release notes

  • Fixed session replay on React Native Web.

    1.298.1release notes

  • Corrects the frame platform property for $exception events.

    1.297.0release notes

  • No longer relies on the order of method calls to gate calling url.

    1.296.1release notes

  • Popover surveys are now cleaned up from the DOM when closed.

    1.296.0release notes

  • Fixes a bug in survey HTML rendering.

    1.295.0release notes

  • Rageclick detection now uses the event timestamp instead of the current time.

    1.293.0release notes

  • Session recording configuration overrides are now applied even while the recorder module is still loading.

    1.286.0release notes

  • Session ending payloads are now allowed when recording is idle.

    1.285.1release notes

  • Token calculation can now occur without a timer.

    1.281.0release notes

  • Surveys are no longer polled while the page is hidden.

    1.281.0release notes

  • The retry count URL parameter is now updated correctly.

    1.280.1release notes

  • Polling now stops when the retry queue is empty.

    1.280.1release notes

  • Stops the heatmap buffer interval when the page is hidden.

    1.279.1release notes

  • Adds a warning and extra examples explaining what advanced_disable_flags disables.

    1.278.0release notes

  • Immediate batches continue to bypass the queue and are sent as one request.

    1.0.0upgrade guide

  • Gzip, Deflate, Brotli, and Zstandard variants now apply their corresponding Content-Encoding.

    1.0.0upgrade guide