NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
npm, #4153 most downloaded on npm
Type definitions for the PostHog JavaScript SDK
Latest stable
1.425.1
Last release 9 days ago
13 Nov 2026
Ships on a steady schedule
a new release about every 9 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 months old
280 releases · first in 2026
Drag across the ruler to compare, or tap a release to open it.
### Patch Changes - #5721 `6cebc6c` Thanks @haacked! - When the experimental metrics.flags option is on, the browser SDK splits each /flags attempt th
6cebc6c Thanks @haacked! - When the experimental metrics.flags option is on, the browser SDK splits each /flags attempt that gets a response into three histograms with the same attributes as posthog.flags.request.duration. posthog.flags.request.pre_send_duration runs from dispatch until the request starts, which includes body compression. posthog.flags.request.network_duration runs from the request start until the last byte of the response arrives, taken from the request's Resource Timing entry. posthog.flags.request.main_thread_duration runs from that last byte until the SDK's callback runs, which includes reading and parsing the response body. The three add up to the total. An attempt records them only when the browser reports its Resource Timing entry within 5 seconds of the callback and that entry can't belong to another /flags request that this copy of the SDK sends to the same URL, so it may record the total without them. posthog.flags.request.duration is unchanged. The option, the metric names, and their attributes may change or be removed in any release.
(2026-11-13)### Minor Changes - #5675 `6af1863` Thanks @DanielVisca! - Add trace_propagation_targets: an opt-in allowlist of hostnames or origins that receive a W
Your coding agent can read these notes before it upgrades. Set up the MCP server →
6af1863 Thanks @DanielVisca! - Add trace_propagation_targets: an opt-in allowlist of hostnames or origins that receive a W3C traceparent header on fetch and XMLHttpRequest requests, so backend traces can continue from the browser. Unlisted hosts never get the header, and a traceparent set by the app or by OpenTelemetry instrumentation is never overwritten or duplicated.
(2026-11-13)### Patch Changes - #5685 `d669687` Thanks @DanielVisca! - fix(metrics): export browser metrics once a minute by default instead of every 10 seconds.
#5685 d669687 Thanks @DanielVisca! - fix(metrics): export browser metrics once a minute by default instead of every 10 seconds. Every tab of an app writes to the same series, so busy series exceeded the backend's per-series point limit and were undercounted. An explicit metrics.flushIntervalMs still wins.
(2026-11-12)
#5686 9e97237 Thanks @DanielVisca! - fix(metrics): metrics.network no longer records server-sent event streams. A text/event-stream response stays open for as long as the page listens, so it was timed as a request lasting minutes and pinned the duration percentiles to the top bucket.
(2026-11-12)
### Minor Changes - #5663 `d6dbd3a` Thanks @rafaeelaudibert! - Add imageUrl to the EarlyAccessFeature type (2026-11-11)
d6dbd3a Thanks @rafaeelaudibert! - Add imageUrl to the EarlyAccessFeature type
(2026-11-11)## 1.423.0 ### Minor Changes - #5599 `fee9bee` Thanks @DanielVisca! - feat(node): expose traceId and spanId getters on the Span handle, for correlatin
fee9bee Thanks @DanielVisca! - feat(node): expose traceId and spanId getters on the Span handle, for correlating logs from other loggers with a trace without parsing traceparent()
(2026-11-10)b5e9b69 Thanks @DanielVisca! - Warn once in the console, even outside debug mode, when the bot user agent filter drops events, and document that captureLog logs bypass the filter.
(2026-11-10)## 1.422.0 ### Minor Changes - #5594 `bfbaff7` Thanks @DanielVisca! - feat(node): expose traceId and spanId getters on the Span handle, for correlatin
bfbaff7 Thanks @DanielVisca! - feat(node): expose traceId and spanId getters on the Span handle, for correlating logs from other loggers with a trace without parsing traceparent()
(2026-11-09)## 1.421.1 ### Patch Changes - #5561 `ab49034` Thanks @adityareddy-dev! - Mask hidden input values in session replay when maskAllInputs is enabled, an
ab49034 Thanks @adityareddy-dev! - Mask hidden input values in session replay when maskAllInputs is enabled, and accept hidden in maskInputOptions.
(2026-11-06)## 1.421.0 ### Minor Changes - #5580 `aa66d4c` Thanks @haacked! - metrics.histogram() accepts a bounds option that sets the histogram's bucket boundar
aa66d4c Thanks @haacked! - metrics.histogram() accepts a bounds option that sets the histogram's bucket boundaries, and beforeSend sees and can change them. The first sample of a histogram (name and unit) fixes its bounds until the client resets. A later sample with different bounds is recorded in the fixed buckets and logs a warning, and a sample with invalid bounds is dropped. The experimental posthog.flags.request.duration histogram now uses the bounds [50, 75, 100, 150, 200, 300, 400, 500, 750, 1000, 1500, 2000, 3000, 5000, 10000] ms, so its p50 and p95 resolve between 50ms and 5s. This changes the metric's buckets, which its experimental status allows.
(2026-11-05)## 1.420.0 ### Minor Changes - #5547 `742f73f` Thanks @haacked! - Add the experimental metrics.flags option. When it is on, the browser SDK records th
742f73f Thanks @haacked! - Add the experimental metrics.flags option. When it is on, the browser SDK records the round trip of every /flags HTTP attempt as the histogram posthog.flags.request.duration, with the server host, the response status or error type, and the browser's timezone as attributes. The option, the metric name, and its attributes may change or be removed in any release.
(2026-11-04)## 1.419.0 ### Minor Changes - #5480 `9bd0e80` Thanks @veryayskiy! - Add support widget theming: conversations.theme init option, posthog.conversation
9bd0e80 Thanks @veryayskiy! - Add support widget theming: conversations.theme init option, posthog.conversations.setTheme(), dark mode, and --ph-conv-* CSS custom properties
(2026-10-30)## 1.418.0 ### Minor Changes - #5269 `950d034` Thanks @dustinbyrne! - Add $input_value to autocapture change events for fields marked data-ph-capture-
950d034 Thanks @dustinbyrne! - Add $input_value to autocapture change events for fields marked data-ph-capture-value, or matched by the new autocapture.capture_value_css_selector_allowlist option (CSS selectors or an (element) => boolean predicate).
(2026-10-28)## 1.417.0 ### Minor Changes - #5405 `3150079` Thanks @marandaneto! - Add defaults: 'latest' to follow the newest defaults and report the applied date
3150079 Thanks @marandaneto! - Add defaults: 'latest' to follow the newest defaults and report the applied date in events.
(2026-10-27)## 1.416.1 ### Patch Changes - #5335 `cb34fe0` Thanks @hpouillot! - Correct the documented default for synchronous session replay fetch capture. (2026
cb34fe0 Thanks @hpouillot! - Correct the documented default for synchronous session replay fetch capture.
(2026-10-26)## 1.416.0 ### Minor Changes - #5291 `7c10169` Thanks @DanielVisca! - Attach trace exemplars to metrics recorded inside sampled spans. (2026-10-13)
7c10169 Thanks @DanielVisca! - Attach trace exemplars to metrics recorded inside sampled spans.
(2026-10-13)## 1.415.3 ### Patch Changes - #5281 `8f2d581` Thanks @marandaneto! - Fix before_send callback types to accept non-null events while still allowing nu
8f2d581 Thanks @marandaneto! - Fix before_send callback types to accept non-null events while still allowing null returns to drop events.
(2026-10-12)## 1.415.2 ### Patch Changes - #5200 `34cdfa6` Thanks @hpouillot! - fix(replay): add a private opt-in to preserve application stacks for failed fetch
34cdfa6 Thanks @hpouillot! - fix(replay): add a private opt-in to preserve application stacks for failed fetch requests
(2026-10-08)## 1.415.1 ### Patch Changes - #5004 `730d92b` Thanks @posthog! - Stop carousel and pager arrow controls from capturing false $rageclick events. The r
730d92b Thanks @posthog! - Stop carousel and pager arrow controls from capturing false $rageclick events. The rageclick content ignorelist, active from the 2025-11-30 config defaults, now also covers arrow glyphs (→, ←, ›, ‹, », «, ▶, ◀, ❯, ❮). The built-in word keywords match whole words wherever they appear, including inside a list you pass yourself, so "Preview" keeps capturing; other word keywords you add still match as substrings. Keywords now match against the clicked control (the nearest button, link, ARIA control or cursor: pointer wrapper), reading its label from the control's whole subtree instead of every ancestor up to the body, so a region labelled "Featured carousel" no longer suppresses the buttons inside it. A control's own text or aria-label wins over an icon's aria-label inside it, so clicking the icon and clicking the text agree. Set rageclick: { content_ignorelist: false } to keep capturing these events.
(2026-10-06)## 1.415.0 ### Minor Changes - #5191 `6cd5496` Thanks @gesh! - Capture WebMCP tool intent and model metadata by default. (2026-10-06)
## 1.414.0 ### Minor Changes - #5190 `6af4c59` Thanks @gesh! - Add opt-in WebMCP tool call capture for MCP Analytics. (2026-10-06)
1.413.0 Minor Changes #4794 e89d224 Thanks @AyobamiH ! - Add onActiveMatchingSurveysChanged to subscribe to survey eligibility updates with safe unsub
1.412.4 Patch Changes #5008 3a8035f Thanks @nachogarcia ! - Retry /flags in the browser SDK on HTTP 502/504 and on request timeouts, bounded by the ne
3a8035f Thanks @nachogarcia! - Retry /flags in the browser SDK on HTTP 502/504 and on request timeouts, bounded by the new feature_flag_request_max_retries config (default 1, set 0 to disable). Plain transport failures are deliberately left to the existing status-zero circuit breaker.1.412.3 Patch Changes #5018 9cd8ebd Thanks @turnipdabeets ! - Stop dropping long spans that end: maxSpanAgeMs now evicts spans only once maxLiveSpans
9cd8ebd Thanks @turnipdabeets! - Stop dropping long spans that end: maxSpanAgeMs now evicts spans only once maxLiveSpans is reached, so a span that runs past the age limit and then ends is exported, and its children are no longer orphaned.1.412.2 Patch Changes #5014 5e86154 Thanks @pauldambra ! - Rename the metrics.network default attributes to the OTel HTTP client semantic conventions:
5e86154 Thanks @pauldambra! - Rename the metrics.network default attributes to the OTel HTTP client semantic conventions: http.request.method, server.address, server.port, url.scheme, url.template, http.response.status_code and error.type replace method, host, path and status_class.1.412.1 Patch Changes #4962 85b775a Thanks @posthog ! - Docstrings for identity_hash and setIdentity() now say the hash is signed with the Secret API
### Minor Changes - #4918 `c666606` Thanks @pauldambra! - Add metrics.network config to record HTTP and HTTPS fetch and XMLHttpRequest durations as hi
c666606 Thanks @pauldambra! - Add metrics.network config to record HTTP and HTTPS fetch and XMLHttpRequest durations as histograms, with an optional custom metric name and attributes.
(2026-09-14)1.411.1 Patch Changes #4860 8207df8 Thanks @posthog ! - Back off automatic feature flag refreshes on idle visible pages only when remote_config_refres
### Minor Changes - #4579 `19e78cc` Thanks @turnipdabeets! - Add experimental distributed tracing to posthog-node: startSpan, withSpan and getActiveSp
19e78cc Thanks @turnipdabeets! - Add experimental distributed tracing to posthog-node: startSpan, withSpan and getActiveSpan record spans against a new traces client option. A service with tracing off still forwards an inbound traceparent, including from spans nested inside the one that received it, so a distributed trace is not severed. A traceparent may be passed as the one-element array req.headersDistinct gives. A beforeSpanSend hook sees every span before it is exported and may edit or drop it, and maxAttributesPerSpan, maxEventsPerSpan, maxAttributeValueLength, maxLiveSpans and maxSpanAgeMs bound what a single span and a single process may hold.
(2026-09-10)### Patch Changes - #4878 `14ba783` Thanks @dustinbyrne! - Allow null bootstrap values and treat null or empty distinct IDs as missing. (2026-09-10) -
### Minor Changes - #4707 `b441eb2` Thanks @posthog! - Segment integration: allow segment to accept an integration config with filterProperties, so cu
b441eb2 Thanks @posthog! - Segment integration: allow segment to accept an integration config with filterProperties, so customers can filter PostHog-generated enrichment properties before Segment sends an event to its destinations. Returning null or throwing leaves the original Segment event unenriched.
(2026-09-09)#4876 0c2a15f Thanks @dustinbyrne! - Fix dead-click detection for text selection and editable caret gestures when mouse release is delayed, while continuing to report inert text clicks.
(2026-09-09)
#4733 24fa541 Thanks @dustinbyrne! - fix(web): avoid reporting clicks that select or unselect text as dead clicks
(2026-09-09)
### Patch Changes - #4869 `891eefa` Thanks @robbie-c! - Apply replay URL privacy settings to URL values in captured JSON-LD payloads. (2026-09-09)
### Patch Changes - #4864 `e8b2be1` Thanks @robbie-c! - Include the masked page URL with JSON-LD replay events. (2026-09-09)
1.409.2 Patch Changes #4791 b2affdc Thanks @posthog ! - Prefer sendBeacon for unbatched events, such as { send_instantly: true } captures, once PostHo
b2affdc Thanks @posthog! - Prefer sendBeacon for unbatched events, such as { send_instantly: true } captures, once PostHog's own pagehide handler (or unload fallback) marks the page as unloading. Captures from beforeunload or earlier pagehide listeners retain their normal transport. Preserve response-capable transports on active pages so failed requests can be retried, including when fetch is unavailable.### Patch Changes - #4785 `74ca945` Thanks @marandaneto! - Clarify feature flag return-value terminology across SDK APIs. A false value is a conclusiv
#4785 74ca945 Thanks @marandaneto! - Clarify feature flag return-value terminology across SDK APIs. A false value is a conclusive off evaluation, while undefined means no evaluation is available. Remote evaluation omits globally inactive flags, whereas backend local evaluation can resolve cached inactive definitions to false.
(2026-09-07)
#4666 5e74132 Thanks @robbie-c! - Preserve universally safe JSON-LD properties and allowlisted tree structure when replay redacts other fields. Keep only DOM-backed ID fragments. Keep only @type values shaped like a Schema.org term, and limit types and payloads. Publish a reusable sanitization contract fixture.
(2026-09-07)
1.409.0 Minor Changes #4774 426e1fd Thanks @Fhatu12 ! - Add reuseAnonymousId support to browser identify calls. (2026-09-04)
### Patch Changes - #4760 `41ed3af` Thanks @marandaneto! - Require a distinct ID when calling identify and correct its API documentation to match the
41ed3af Thanks @marandaneto! - Require a distinct ID when calling identify and correct its API documentation to match the existing runtime validation.
(2026-09-03)1.408.0 Minor Changes #4741 61a26e5 Thanks @veryayskiy ! - Forward generic server-signed identity claims with conversations widget requests. (2026-09-
61a26e5 Thanks @veryayskiy! - Forward generic server-signed identity claims with conversations widget requests.### Patch Changes - #4712 `7f009dc` Thanks @posthog! - Document the session replay input masking defaults in the session_recording config reference: i
7f009dc Thanks @posthog! - Document the session replay input masking defaults in the session_recording config reference: inputs are masked by default, password inputs stay masked on a partial maskInputOptions override, non-input text and images need maskTextSelector, and client-side masking options override the project privacy setting.
(2026-09-01)1.407.1 Patch Changes #4665 d5ef459 Thanks @fasyy612 ! - Session replay can now bound DOM mutation bytes with an opt-in budget. Set __mutationBytesBuc
d5ef459 Thanks @fasyy612! - Session replay can now bound DOM mutation bytes with an opt-in budget. Set __mutationBytesBucketSize (e.g. 1MB) to enable: mutations beyond the sustained budget (__mutationBytesRefillRate, default 25KB/s) are dropped and the recording resyncs with a full snapshot, keeping recordings from apps with very high DOM churn playable. Off by default.1.407.0 Minor Changes #4655 4f80973 Thanks @robbie-c ! - Add the 2026-08-30 config defaults. These defaults enable sanitized JSON-LD replay events. (2
1.406.2 Patch Changes #4635 ab1383a Thanks @robbie-c ! - Capture paste interactions with clipboard autocapture without collecting pasted text. (2026-0
#4635 ab1383a Thanks @robbie-c! - Capture paste interactions with clipboard autocapture without collecting pasted text.
(2026-08-26)
#4640 0d2cf49 Thanks @robbie-c! - Add opt-in Schema.org JSON-LD capture to session replay through session_recording.captureJsonLd. When enabled, the recorder emits sanitized JSON-LD as custom replay events and excludes all script elements from replay snapshots.
(2026-08-26)
Feature flags now own their automatic refresh timer and visibility listener. Hidden tabs reload due flags when they become visible. The existing five-
#4476 ed4dd97 Thanks @posthog! - fix(browser): refresh configured feature flags when a hidden tab becomes visible
Feature flags now own their automatic refresh timer and visibility listener.
Hidden tabs reload due flags when they become visible. The existing five-minute
default and remote_config_refresh_interval_ms behavior remain unchanged. (2026-08-25)
### Minor Changes - #4598 `334159b` Thanks @posthog! - Web vitals now capture attribution by default for INP and LCP, so a slow interaction or paint a
334159b Thanks @posthog! - Web vitals now capture attribution by default for INP and LCP, so a slow interaction or paint arrives with the target element and phase breakdown that make it diagnosable. CLS stays without attribution by default, because its attribution holds detached DOM nodes and can leak memory in single-page apps. Set capture_performance.web_vitals_attribution to false to opt out, true for every metric, or an array to name the metrics. The captured metric also drops the empty entries array and bounds attribution to a small set of useful fields, and the attributed INP observer no longer collects the processedEventEntries we never read.
(2026-08-25)### Patch Changes - #4607 `7ec4f0d` Thanks @posthog! - Drop exceptions thrown by user scripts the browser injects into every page (Firefox for iOS, Ch
capture_pageview now accepts an object with path, search, and hash options. Each selected URL component triggers a $pageview when it changes, includin
#4418 be2161d Thanks @posthog! - feat: add granular automatic pageview options for SPA navigation
capture_pageview now accepts an object with path, search, and hash options. Each selected URL component triggers a $pageview when it changes, including direct hash changes used by hash-based routers. The existing 'history_change' option continues to capture pathname changes. (2026-08-24)
### Patch Changes - #4583 `6322f09` Thanks @turnipdabeets! - Fix logs and metrics being silently dropped when an attribute holds a very large integer,
6322f09 Thanks @turnipdabeets! - Fix logs and metrics being silently dropped when an attribute holds a very large integer, a function, a symbol, a sparse array, or a truncated emoji.
Cap log and metric attributes at 20 levels of nesting, 1,000 entries per object and 10,000 values in total, marking anything beyond as [Truncated].
Type OtlpAnyValue.intValue as string | number — code reading that field must handle both. (2026-08-21)### Minor Changes - #4496 `1ade666` Thanks @marandaneto! - Add cookieWinsOnConflict to keep shared cross-subdomain identity and session state ahead of
1ade666 Thanks @marandaneto! - Add cookieWinsOnConflict to keep shared cross-subdomain identity and session state ahead of stale per-origin localStorage, deprecate __preview_cookie_wins_on_conflict, and enable the new behavior for the 2026-08-29 defaults.
(2026-08-18)The dead-click detector treated a visibilitychange as evidence a click was dead: it measured Math.abs(clickTimestamp - lastVisibilityChange) and, once
#4503 eb05237 Thanks @pauldambra! - fix(dead-clicks): treat visibility and focus changes as liveness signals, not dead-click evidence
The dead-click detector treated a visibilitychange as evidence a click was dead: it measured Math.abs(clickTimestamp - lastVisibilityChange) and, once that exceeded the threshold, timed the click out as dead. Because it only recorded the tab becoming visible, any click in a session where the tab had ever been backgrounded (median gap ~1 minute) was flagged.
A visibility or focus change near a click is the opposite — a sign the click did something (it woke/focused the tab, opened a new tab, or opened a new window/popup) — so these signals now only ever suppress a dead click, never cause one:
hidden), and a window focus/blur observer is added, since a click that opens a new window/popup may leave the tab visible and only surface as the current window losing focus.$dead_click_visibility_changed_timeout stays in the payload (always false) for shape compatibility, and a new $dead_click_focus_changed_delay_ms is emitted for observability.## 1.404.0 ### Minor Changes - #4485 `8bc63c3` Thanks @dustinbyrne! - Default external dependency loading to versioned asset paths with automatic fall
8bc63c3 Thanks @dustinbyrne! - Default external dependency loading to versioned asset paths with automatic fallback to legacy paths, and add a strict_script_versioning: 'fallback' mode.
(2026-08-13)The default budget (10,000 rules) moves from the recorder chunk into posthog-js session recording options, so npm-pinned or cached bundles keep their
b2c6830 Thanks @arnohillen! - Harden the session replay stylesheet inlining budget (inlineStylesheetBudgetRules):
0 to disable) and direct rrweb.record() consumers keep unbounded inlining unless they opt in._cssText atomically, so monolithic sheets no longer produce one long task and partial CSS never reaches the wire.pagehide; residual failure modes are counted via $sdk_debug_replay_deferred_stylesheets_failed / _abandoned.insertRule output, adoptedStyleSheets) no longer charge the budget, since deferring <link> sheets buys those pages nothing.$sdk_debug_replay_discarded_duration_samples). (2026-08-13)## 1.403.0 ### Minor Changes - #4495 `e4b9947` Thanks @marandaneto! - feat(browser): add rewriteRequestPath to customize API, feature flag, and asset
#4495 e4b9947 Thanks @marandaneto! - feat(browser): add rewriteRequestPath to customize API, feature flag, and asset paths for reverse proxies
(2026-08-12)
#4493 e34ebf9 Thanks @marandaneto! - Add reset options for applying bootstrapped identity, feature flag, and session values after posthog.reset() while preserving the legacy boolean argument.
(2026-08-12)
## 1.402.3 ### Patch Changes - #4494 `deb6bb0` Thanks @marandaneto! - fix(types): accept current and legacy Segment Analytics SDK types in the Segment
deb6bb0 Thanks @marandaneto! - fix(types): accept current and legacy Segment Analytics SDK types in the Segment integration config
(2026-08-11)## 1.402.2 ### Patch Changes - #4434 `75fb719` Thanks @arnohillen! - Make the session replay attribute masking options mutually exclusive: when both m
75fb719 Thanks @arnohillen! - Make the session replay attribute masking options mutually exclusive: when both maskAllElementAttributes and maskAttributeFn are set, the coarse option wins and the callback is ignored (with a console warning), so a callback can no longer accidentally unmask what maskAllElementAttributes hides.
(2026-08-06)Initial navigation and performance-timing entries are now passed through maskCapturedNetworkRequestFn, including when they have no method. URL rewrite
#4286 d108d66 Thanks @posthog! - fix(replay): preserve privacy masking for initial network metadata
Initial navigation and performance-timing entries are now passed through maskCapturedNetworkRequestFn, including when they have no method. URL rewrites are respected. When the callback returns nullish for an initial entry, replay-required timing metadata is retained without its URL, headers, or body so method-gated callbacks do not drop the metadata or expose deliberately filtered customer data. Derived server-timing entries are also suppressed when this strict fallback is used. Enforced PostHog filtering and payload cleaning still run first. (2026-08-05)
## 1.402.0 ### Minor Changes - #4376 `2da12b8` Thanks @posthog! - Add attribute-level masking to session replay: maskAttributeFn provides per-attribut
2da12b8 Thanks @posthog! - Add attribute-level masking to session replay: maskAttributeFn provides per-attribute control over the final serialized value, while maskAllElementAttributes masks all source DOM string attributes (including rendering attributes and synthesized form values) at the cost of replay fidelity.
(2026-08-05)## 1.401.1 ### Patch Changes - #4380 `3c40b6c` Thanks @marandaneto! - Keep request timeouts active through response body consumption and clarify event
3c40b6c Thanks @marandaneto! - Keep request timeouts active through response body consumption and clarify eventual event UUID deduplication semantics.
(2026-08-05)Client-side route changes in SPAs previously left web vitals (LCP especially) accumulating against the original hard-navigation timestamp, inflating t
#4266 43d1850 Thanks @posthog! - feat: add opt-in capture_performance.__preview_web_vitals_soft_navs to fix inflated web vitals on single-page apps
Client-side route changes in SPAs previously left web vitals (LCP especially) accumulating against the original hard-navigation timestamp, inflating the top tail of Core Web Vitals. Setting capture_performance: { __preview_web_vitals_soft_navs: true } now scopes metrics to the browser's Soft Navigation entries so each route change starts a fresh measurement window. It's a preview option because it relies on Chrome's experimental Soft Navigation Detection API and loads pinned stable web-vitals 6.x callbacks; when disabled (the default), the existing web-vitals 5.x behavior remains unchanged. (2026-08-04)
## 1.400.2 ### Patch Changes - #4339 `f865818` Thanks @posthog! - Report privacy-aware dropped-event count, page and session context in the client rat
reset() clears stored consent along with the rest of the user's state. With opt_out_capturing_by_default, this returns the instance to the opted-out d
#4314 feb9e2a Thanks @posthog! - fix: warn when reset() silently opts the user back out
reset() clears stored consent along with the rest of the user's state. With opt_out_capturing_by_default, this returns the instance to the opted-out default, so calling reset() after opt_in_capturing() would stop capturing without warning. It now logs a warning when that happens and documents the required ordering. (2026-08-04)
## 1.400.0 ### Minor Changes - #4125 `fde7145` Thanks @DerGeraetK! - Add session_recording.sampling to disable or throttle mousemove capture (and opti
fde7145 Thanks @DerGeraetK! - Add session_recording.sampling to disable or throttle mousemove capture (and optionally mouseInteraction) in session replay. Canvas recording now merges its canvas sampling with user-provided sampling instead of overwriting it.
(2026-08-03)The return value decides what happens to that canvas's frame:
#4270 92427a1 Thanks @turnipdabeets! - Add canvas mask regions to session replay canvas capture: session_recording.canvasCapture.maskRegionsFn is called once per canvas per captured frame, and the returned regions (CSS pixels, relative to the canvas) are painted black in the captured frame before it is encoded — letting apps that render into canvas (e.g. Flutter web via CanvasKit) mask content that DOM-based masking cannot see.
The return value decides what happens to that canvas's frame:
[] — nothing to mask; the frame is recorded as is.null — regions could not be computed; the frame is skipped rather than recorded unmasked.maskRegionsFn not set — canvases are recorded unmasked and canvas capture behavior is unchanged.Configuring maskRegionsFn also disables canvas pixel serialization in DOM full snapshots (rr_dataURL) — that path never sees the mask regions, so skipping it closes the route that could otherwise embed unmasked canvas stills in a snapshot; the canvas repaints from the masked frame stream instead. Every canvas the provider answers — with regions or [] — re-sends an unchanged frame as a keyframe every 30s, so after a full snapshot or a seek an idle canvas repaints within at most 30s.
An app whose real provider only exists once its runtime has booted chooses what happens in between by what it declares in posthog.init: a function covering the whole canvas blacks those frames out, () => null skips them, and declaring nothing records them. Client-side only, cannot be set via remote configuration. (2026-07-29)
One column per month.