chore(deps): update dependency posthog-js to v1.407.0#164
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
launchpad | be26dc4 | Commit Preview URL Branch Preview URL |
Jul 22 2026, 07:58 PM |
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
May 22, 2026 19:56
42478cb to
f251cc4
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
2 times, most recently
from
May 27, 2026 18:17
6b7755f to
1cab717
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
May 28, 2026 13:58
1cab717 to
213b568
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
May 29, 2026 02:45
213b568 to
97e061a
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
2 times, most recently
from
June 1, 2026 03:30
f27c7c2 to
2e586c6
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
June 13, 2026 18:31
2e586c6 to
4476dd5
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
June 15, 2026 13:01
4476dd5 to
19f1f85
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
June 16, 2026 18:40
19f1f85 to
b460fd9
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
June 17, 2026 18:04
b460fd9 to
82ab376
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
June 18, 2026 01:12
82ab376 to
a73ee33
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
2 times, most recently
from
June 19, 2026 12:45
04a5f21 to
40be235
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
June 19, 2026 18:54
40be235 to
682b1f4
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
June 25, 2026 14:14
bb5f626 to
f01f36b
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
June 26, 2026 14:03
f01f36b to
9e00d46
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
June 26, 2026 21:14
9e00d46 to
f0db7c0
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
June 29, 2026 10:55
f0db7c0 to
6cfb125
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
June 29, 2026 18:12
6cfb125 to
2079aca
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
June 30, 2026 19:00
2079aca to
b50b37b
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
July 1, 2026 22:51
b50b37b to
c6a5826
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
July 2, 2026 17:52
c6a5826 to
72c9f12
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
July 3, 2026 14:34
72c9f12 to
a7dfd85
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
July 6, 2026 09:10
a7dfd85 to
9dc2b9e
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
July 6, 2026 18:13
9dc2b9e to
21b5bb3
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
July 6, 2026 22:02
21b5bb3 to
71ad502
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
July 7, 2026 16:53
71ad502 to
7ef27b3
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
July 7, 2026 22:45
7ef27b3 to
89b0130
Compare
renovate
Bot
force-pushed
the
renovate/posthog-js-1.x-lockfile
branch
from
July 8, 2026 11:33
89b0130 to
469f1d3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.374.4→1.407.0Release Notes
PostHog/posthog-js (posthog-js)
v1.407.0Compare Source
1.407.0
Minor Changes
#4222
0f2407bThanks @turnipdabeets! - feat: add a default-value option toisFeatureEnabledisFeatureEnabled(key, { defaultValue: false })now returns the given default when the flag has no value — flags not loaded yet, or no flag with that key — and the return type narrows toboolean. The option name is the same in posthog-js, posthog-js-lite, and posthog-react-native. WithoutdefaultValue, behavior is unchanged:boolean | undefined. (2026-07-22)Patch Changes
#4203
90e7483Thanks @posthog! - fix(conversations): let users start a new conversation while a ticket is still openThe support widget now surfaces the ticket list navigation (and its "New conversation"
button) whenever the user has any ticket, instead of only when they have multiple tickets
or a single resolved one. Previously a user sitting on one open, unresolved ticket was
locked into that conversation with no way to raise a second issue. (2026-07-22)
#4221
da6e082Thanks @posthog! - fix(exception-autocapture): don't throw when the page's onerror handler is non-callableThe wrapped
window.onerror,window.onunhandledrejection, andconsole.errorhandlerschained to the page's original handler using optional chaining, which only guards against
null/undefined. When a page had one of these set to a truthy non-callable value (e.g.via
Object.defineProperty, or clobbered by another script/extension), our wrapper threw aTypeErrorfrom inside its own handler. We now check the original handler is actuallycallable before invoking it and fall back to
falseotherwise. (2026-07-22)#4209
569fc62Thanks @posthog! - Session recording no longer emits an uncaughtTypeError: Illegal invocationfrom the input observer's synchronous native-setter call. The previous fix only guarded the deferred hooked setter; the synchronousoriginal.set.call(this, value)still ran with a non-nativethis(a proxy, custom element, or cross-realm object) and threw inside the host page's own assignment. The recorder now probes the native getter — which fails the same internal-slot brand check as the setter — before forwarding: a non-nativethisis skipped, so the recorder no longer re-throws from its own frame, while genuine elements (including file inputs that legitimately throw on a programmatic value) keep their native behavior. The input event handler andgetInputTypeare similarly guarded against reading native accessors on a non-nativethis.(2026-07-22)
#4068
d5e1188Thanks @posthog! - Fix event-triggered surveys re-displaying in a fresh session without their trigger firing. A non-repeatable event/action-triggered survey that was shown but never dismissed or answered had its activation persisted indefinitely, so it kept being treated as "triggered" on later page loads. The persisted activation is now scoped to the triggering session: it still survives a reload within that session, but a brand-new session drops it until the trigger fires again. Repeatable surveys are unaffected.(2026-07-22)
#4205
de3ad61Thanks @posthog! - Warn when session recording masking options inposthog.initshadow the project-level "Privacy and masking" setting. Client-side masking still intentionally takes precedence, but previously the override was silent — a developer could set masking in the dashboard and see it quietly ignored because their SDK config diverged. The recorder now logs a console warning (in debug mode) naming the diverging fields so the precedence is self-explaining.(2026-07-22)
Updated dependencies [
0f2407b]:v1.406.2Compare Source
1.406.2
Patch Changes
#4206
a3112d9Thanks @posthog! - fix(surveys): stop recurring surveys re-showing off a stale internal targeting flagRecurring surveys could re-display and record a duplicate response when the eligibility
check ran against a cached internal targeting flag before fresh flags had loaded. The
display loop now waits for feature flags to actually load before trusting the internal
targeting flag, and forces a flag reload after a survey is completed so the flag recomputes
promptly. (2026-07-21)
v1.406.1Compare Source
1.406.1
Patch Changes
220fa2cThanks @sarmah-rup! - Don't let save_referrer overwrite a $referrer / $referring_domain that was explicitly set via posthog.register(), so registered attribution values survive pageviews in SPA and iframe contexts(2026-07-21)
v1.406.0Compare Source
1.406.0
Minor Changes
d39b903Thanks @dustinbyrne! - Move shared browser utility implementations into@posthog/browser-commonand consume them directly fromposthog-js.(2026-07-21)
Patch Changes
ba977d0Thanks @turnipdabeets! - Keep autocapture off when a remote config response omitsautocapture_opt_out. The SDK now retains the last known server value for the missing-field case, the same as when the config fetch fails, instead of enabling autocapture. Values persisted by earlier SDK versions are still trusted; a browser holding a stale value corrects itself on the first config response that includes the field.(2026-07-21)
d39b903]:v1.405.3Compare Source
1.405.3
Patch Changes
91505baThanks @pauldambra! - fix: apply the active full snapshot interval as soon as a recording trigger matches(2026-07-21)
v1.405.2Compare Source
1.405.2
Patch Changes
fbfc84fThanks @pauldambra! - feat: make the pending session recording trigger buffer interval configurable(2026-07-20)
fbfc84f]:v1.405.1Compare Source
1.405.1
Patch Changes
dec8fe7Thanks @turnipdabeets! - Internal restructuring of remote config failure handling across SDK extensions; no behavior change.(2026-07-20)
v1.405.0Compare Source
1.405.0
Minor Changes
#4172
9621830Thanks @haacked! - send minimal$feature_flag_calledevents when the server enables itWhen the v2
/flagsresponse carriesminimalFlagCalledEvents: true(or, for posthog-node local evaluation, the flag-definitions payload carriesminimal_flag_called_events: true) and the evaluated flag is not linked to an experiment ($feature_flag_has_experiment === false),$feature_flag_calledevents are rebuilt from a strict allowlist of flag-evaluation, processing-control, and SDK-identity properties. Super properties,$set/$set_once, the$feature/<key>enumeration,$active_feature_flags, and the context envelope are stripped. Any missing signal (no gate on the response, bootstrapped or locally injected flags,has_experimentunknown) falls back to the full event, and experiment-linked flags always send the full envelope. The gate is stored alongside the cached flags (posthog-js persistence, posthog-node poller state) and is server-controlled, with no SDK-side configuration.before_sendruns after the filter and may re-add stripped properties. (2026-07-20)Patch Changes
9621830]:v1.404.1Compare Source
1.404.1
Patch Changes
66c1666Thanks @turnipdabeets! - Honour the project-level autocapture opt-out when the remote config request fails. Previously a failed config fetch (network error, timeout, blocked request) enabled autocapture on opted-out projects and persisted that state for later page loads. Autocapture now keeps the last successfully received server value, and stays off until the first successful config response.(2026-07-17)
v1.404.0Compare Source
1.404.0
Minor Changes
607bf54Thanks @pauldambra! - Add dead swipe detection to dead clicks autocapture. When dead clicks autocapture is enabled, touch swipe gestures that produce no observable screen change (no scroll, mutation, selection or visibility change) are now captured as$dead_swipeevents, surfacing failed navigations on touch devices. Configurable viacapture_dead_swipes(defaulttrue) andswipe_threshold_px(default30) on thecapture_dead_clicksconfig. Swipes over surfaces whose response cannot be observed (canvas, video and other media elements under the finger) are skipped, and captures are limited per page load viamax_dead_swipes_per_page_load(default10).(2026-07-16)
Patch Changes
df17ddcThanks @posthog! - Catch synchronous throws from a monkey-patchedwindow.fetchso they no longer escape as unhandled exceptions. A synchronous throw is now routed through the same handling as an async rejection, so the request queue retries instead of the error leaking into error tracking.(2026-07-16)
607bf54]:v1.403.0Compare Source
1.403.0
Minor Changes
#4159
fad6d9aThanks @haacked! - add$feature_flag_has_experimentto$feature_flag_calledevents$feature_flag_calledevents now carry a$feature_flag_has_experimentboolean sourced from the server'shas_experimentflag metadata (the/flags?v=2response for remote evaluation, the/api/feature_flag/local_evaluationdefinitions for posthog-node local evaluation). The property is only sent when the server explicitly reportshas_experiment; it is omitted entirely when the value is unknown (older servers, missing metadata, bootstrapped or locally injected flags). (2026-07-16)Patch Changes
fad6d9a]:v1.402.3Compare Source
1.402.3
Patch Changes
#4157
4a2ecf5Thanks @posthog! - Session recording no longer emits an uncaughtNotAllowedError("Sharing constructed stylesheets in multiple documents is not allowed") when a page assigns aCSSStyleSheetconstructed in a different document toadoptedStyleSheets. That assignment is the host page's own invalid operation, but the recorder's patched setter sat on the call stack, so the exception was attributed to rrweb and churned fingerprints in error tracking. The recorder now contains this specific rejection (matched by its standardizedNotAllowedErrorname, so it works even when the setter throws from an iframe realm) and skips recording those sheets, while still re-throwing any other native-setter error so host-page behaviour is preserved.(2026-07-15)
#4158
0dc389eThanks @posthog! - fix(replay): session recording no longer throwsTypeError: Converting circular structure to JSONwhen replay event data contains a circular reference. The circular-reference guard now also detects cycles that pass through an array, and affected events are captured with[Circular]markers instead of surfacing an unhandled error and being dropped.(2026-07-15)
Updated dependencies [
fc2cb2e]:v1.402.2Compare Source
1.402.2
Patch Changes
81adbfdThanks @posthog! - Session recording no longer emits an uncaughtTypeError: Illegal invocationwhen a programmatic input-value change happens on an object that is not a genuine native input element (for example a proxy on the element prototype chain). The recorder drops that one replay update instead of throwing.(2026-07-15)
v1.402.1Compare Source
1.402.1
Patch Changes
#4117
1eddff7Thanks @DanielVisca! - add the posthog.metrics API (count, gauge, histogram) to posthog-node — alphaBackend services can now record metrics through the same statsd-style pre-aggregating client the browser SDK ships, with no OpenTelemetry setup:
Samples aggregate in memory and flush as OTLP/JSON to
/i/v1/metrics(one data point per series per window). Pending metrics are flushed onshutdown(). Core gains_sendMetricsBatchonPostHogCoreStateless(same outcome contract as_sendLogsBatch) and a sharedresolveMetricsConfig, so any core-based SDK can hostPostHogMetrics. (2026-07-15)Updated dependencies [
1eddff7]:v1.402.0Compare Source
1.402.0
Minor Changes
0e8ad14Thanks @robbie-c! - Stamp the current hostname as$snapshot_hoston every$snapshotevent the session recorder sends. The value is derived from the page URL after it passes through the existing replay URL masking pipeline (maskCapturedNetworkRequestFn/ deprecatedmaskNetworkRequestFn, hash stripping, personal-data query-param masking), so it cannot bypass a customer's masking config. When masking removes the URL or the masked result doesn't parse as a URL, the property is omitted entirely. This gives ingestion consumers a per-message host signal even for mid-session snapshot batches that contain no URL-bearing events.(2026-07-15)
v1.401.0Compare Source
1.401.0
Minor Changes
800af7cThanks @pauldambra! - feat: addsession_recording.attributeFilteroption that passes an attribute allowlist through to the native MutationObserver, so mutations to unlisted attributes (e.g. animation-driven inlinestylechurn) never cost recording CPU (port of upstream rrweb #1873)(2026-07-15)
Patch Changes
800af7c]:v1.400.1Compare Source
1.400.1
Patch Changes
6dd8827Thanks @lucasheriques! - chore: survey seen-key and repeat-activation helpers now live in @posthog/core, shared by the web and React Native SDKs. Core's survey enums are now const-object literal unions (matching the web SDK's existing pattern), so the same values type-check across both SDKs. No behavior change. Type-level note: enum members no longer work as standalone type annotations (e.g.SurveyType.Popoveras a type); use the exported union types instead. Runtime values are unchanged.(2026-07-14)
6dd8827]:v1.400.0Compare Source
1.400.0
Minor Changes
dc2aa5bThanks @posthog! - Normalize the error tracking rate-limiter config to first-class options. The browser SDK now readsexceptionRateLimiterRefillRate/exceptionRateLimiterBucketSizeonerror_tracking, with the previous double-underscore__exceptionRateLimiterRefillRate/__exceptionRateLimiterBucketSizeoptions deprecated but still honoured as a fallback. The option shape (ExceptionRateLimiterConfig) and default-resolution logic (resolveExceptionRateLimiterConfig) now live in@posthog/coreand are shared between the browser and Node SDKs.(2026-07-14)
Patch Changes
1eabd30Thanks @turnipdabeets! - HandlesendBeaconquota rejections instead of silently dropping events. A beacon rejected by the browser (over the page's shared ~64KiB in-flight keepalive quota) is now split in half and re-sent recursively so the batch delivers as far as the quota allows; a rejected payload that cannot be split falls back to a non-keepalive fetch and logs a warning. Previously the boolean return ofsendBeaconwas ignored and an over-quota unload batch was lost with no signal.(2026-07-14)
dc2aa5b]:v1.399.5Compare Source
1.399.5
Patch Changes
#4134
ab10064Thanks @posthog! - Bound autocapture's DOM ancestor walks against abnormal host-page DOM trees.autocapturePropertiesForElementandshouldCaptureElementnow stop climbing theparentNodechain after 1000 ancestors or if they revisit a node (only possible when a page patchesparentNode, since native DOMs cannot contain cycles), instead of walking indefinitely. WhenshouldCaptureElementcannot finish checking ancestors forph-no-capture/ph-sensitive, it fails closed and reports the element as not capturable. Behavior on normal DOM trees is unchanged.(2026-07-14)
#4141
17d956cThanks @posthog! - Log network-level fetch failures from posthog-js's own request layer (ad blocker, dropped connection, CORS, page teardown) atwarninstead oferror. The browser rejects these with a genericTypeError(Failed to fetch, Firefox'sNetworkError..., or Safari'sLoad failed); they are already caught and retried by the request queue, so they are expected noise rather than SDK errors —_fetchnow gives them the samewarntreatment as our own timeout aborts. Genuine, unexpected errors still log aterror.(2026-07-14)
v1.399.4Compare Source
1.399.4
Patch Changes
7c339beThanks @turnipdabeets! - Encode uncompressedsendBeaconbodies as base64 form data so the beacon keeps a CORS-simple content type. Previously an uncompressed unload beacon was sent asapplication/json, which forces a CORS preflight — a preflight cannot complete while the page unloads, so on cross-origin hosts the browser silently dropped the POST and the final batch of events was lost. Compression is inactive whenever the remote config request fails (flaky network, blocked endpoint), when the config response omitssupportedCompression, or withdisable_compression: true.(2026-07-13)
v1.399.3Compare Source
1.399.3
Patch Changes
4ebb618Thanks @mikenicholls88! - MakejsonStringifycircular-safe so event serialization never throws. Previously a captured property holding a circular value — most commonly a DOM node that retains a React fiber pointing back at the element — madeJSON.stringifythrowConverting circular structure to JSON; withcapture_exceptionsenabled that throw was recaptured as a new$exception, at times in a loop. On a throw we now fall back tosafeJsonStringifyfrom@posthog/core. The fast (non-circular) path is unchanged, and only true cycles become"[Circular]", so shared-but-acyclic references keep their real values.(2026-07-13)
v1.399.2Compare Source
1.399.2
Patch Changes
f630394Thanks @posthog! - Fix aRangeError: Maximum call stack size exceededoriginating from the shared rrwebpatch()helper. It patches shared globals such asElement.prototype.attachShadow(shadow-dom-manager) and the DOM/canvas observers, so multiple recorder instances or repeated start/stop cycles wrap the same global more than once. Previously an out-of-order restore silently no-op'd, leaving the wrapper in the call path; repeated cycles grew the wrapper chain without bound until a real call walked a chain deep enough to overflow the stack. Wrappers now delegate through a mutable per-layer link so any layer can be torn down even when newer wrappers sit on top of it, keeping the chain bounded. Recording behavior is unchanged. This applies the same fix as #4063 (fetch/XHR) to the shared helper so every rrweb-record caller inherits the bounded-chain behavior.(2026-07-10)
v1.399.1Compare Source
v1.399.0Compare Source
1.399.0
Minor Changes
#4115
86bb3a5Thanks @DanielVisca! - add the posthog.metrics API (count, gauge, histogram) — alphaA statsd-style pre-aggregating metrics client for the PostHog Metrics product (alpha). Samples are folded into per-series aggregates in memory (counts sum, gauges keep the last value, histograms accumulate buckets) and flushed periodically as OTLP/JSON to
/i/v1/metrics— one data point per series per flush window, no matter how many calls. No OpenTelemetry SDK setup required:Configure via
metrics: { serviceName, environment, flushIntervalMs, maxSeriesPerFlush, beforeSend, ... }. (2026-07-08)Patch Changes
86bb3a5]:v1.398.7Compare Source
1.398.7
Patch Changes
#4113
45f17eeThanks @TueHaulund! - fix session replay leaking a shadow-root observer when a same-origin iframe is removedFollow-up to the shadow-observer iframe-teardown fix:
takeFullSnapshot'sonSerializeregisters every shadow root with the top-level document, so a root nested in a same-origin iframe was keyed to the wrong document and its observer/buffer were not disconnected when that iframe was removed (they lingered until the next full snapshot).addShadowRootnow derives the owning document from the host element, so per-document teardown matches iframe-nested roots too. (2026-07-08)v1.398.6Compare Source
1.398.6
Patch Changes
c75c0baThanks @hpouillot! - fix: avoid throwing when rrweb recorder cleanup cannot remove a listener(2026-07-08)
v1.398.5Compare Source
1.398.5
Patch Changes
be8242aThanks @rafaeelaudibert! - Publish the code-split ESM toolbar bundle when the build emits one. The release tooling now recursively includesdist/toolbar/(with explicit JS content types for the strict-MIME ESM chunks) across the immutable, major-alias, and compatibility upload prefixes, and the workflow accepts the canonicaltoolbar.js/toolbar.csslayout. This is a no-op against today's single-file build.(2026-07-08)
v1.398.4Compare Source
v1.398.3Compare Source
1.398.3
Patch Changes
#4112
38bb185Thanks @TueHaulund! - fix session replay silently dropping shadow DOM mutations after an iframe teardownThe single shared ShadowDomManager observes every shadow root on the page, but MutationBuffer.reset() disconnected it. That reset fires whenever any one buffer is torn down, so an iframe being removed or navigating away disconnected every shadow-root observer page-wide. Shadow DOM content (for example a widget mounted in an open shadow root) then stopped recording until the next periodic full snapshot re-registered it. Buffer teardown now releases only its own resources; global shadow observation is reset by takeFullSnapshot and on recording stop. (2026-07-08)
v1.398.2Compare Source
1.398.2
Patch Changes
#4063
24aadd5Thanks @posthog! - Fix aRangeError: Maximum call stack size exceededthat could originate from the sharedpatch()fetch/XHR wrapper. posthog-js wrapswindow.fetchin two independent places (tracing headers and session-recording network capture), so their restores routinely ran out of order. Previously an out-of-order restore silently no-op'd, leaving the wrapper in the call path; repeated start/stop cycles grew the wrapper chain without bound until a realfetchwalked a chain deep enough to overflow the stack. Wrappers now delegate through a mutable link so any layer can be torn down even when newer wrappers sit on top of it, keeping the chain bounded. Header-injection and network-capture behavior is unchanged.(2026-07-07)
#4100
e250a24Thanks @marandaneto! - Stop adding the gzip compression query parameter to browser SDK requests.(2026-07-07)
#4083
f07e241Thanks @posthog! - fix(replay): harden session-replay network capture so instrumentation that throws (e.g.new Request()rejecting a URL/method) degrades gracefully and never breaks or misattributes the host application's ownxhr.open()/fetch()calls(2026-07-07)
v1.398.1Compare Source
1.398.1
Patch Changes
5013ab6Thanks @marandaneto! - Stop sending the deprecatedverquery parameter to capture and session recording endpoints.(2026-07-07)
v1.398.0Compare Source
v1.397.0Compare Source
1.397.0
Minor Changes
cc340dbThanks @bs1180! - feat(web): add aposthog-js/customizationssubpath entry point exposing the optional customizations (setAllPersonProfilePropertiesAsPersonPropertiesForFlags, thebefore-sendsampling helpers, and the redux/kea loggers) as a proper ES module with bundled types, replacing the internalposthog-js/lib/src/customizationsdeep import. Also fixes the TypeScript definitions sosetAllPersonProfilePropertiesAsPersonPropertiesForFlagsaccepts the instance passed to theloadedcallback (the documented usage), and theloadedcallback's instance type now includesconfig.(2026-07-06)
v1.396.9Compare Source
v1.396.8Compare Source
1.396.8
Patch Changes
2af0026Thanks @posthog! - fix(web): prevent an infinite-recursion stack overflow in the logs console capture. The console wrapper's own capture path can emit internal debug lines through PostHog's logger, which wrote back to the wrapped console and re-entered capture until the stack blew (RangeError: Maximum call stack size exceeded). The wrapper now exposes the original console method via__rrweb_original__(so the internal logger bypasses it) and guards against re-entrancy from any code that logs mid-capture.(2026-07-06)
v1.396.7Compare Source
v1.396.6Compare Source
1.396.6
Patch Changes
#4053
45d1b36Thanks @posthog! - feat(web): add a gracefulshutdown()to the browser client for parity with posthog-node, so isomorphic teardown code (e.g. the Nuxt module) that callsposthog.shutdown()on the client no longer throwsTypeError: shutdown is not a function. It best-effort flushes the queued events and always resolves.(2026-07-03)
#4054
f0657ebThanks @posthog! - fix(web): detect our own feature-flag request timeouts via atimedOutflag instead of the abort reason, so they are logged atwarn(noterror) on browsers that don't propagatecontroller.abort(reason)— keeping benign timeouts out of error tracking's console-error capture(2026-07-03)
#4031
94a0530Thanks @posthog! - Improve survey display reliability:$surveysdefinitions after a short TTL (stale-while-revalidate) so server-side changes such as switching a survey from popover to API propagate to long-lived tabs without a page reload.posthog.surveys.markSurveyAsSeen(surveyId, { iteration })so custom integrators that render surveys through their own backend can honour the "already seen" and wait-period checks.Modalnotifies its parent on close even when iOSModal.onDismissfails to fire, so the transparent full-screen modal can no longer stay mounted intercepting touches and freezing the app. (2026-07-03)Updated dependencies [
45d1b36]:v1.396.5Compare Source
1.396.5
Patch Changes
d7cf13bThanks @turnipdabeets! - Prevent uncaughtgetComputedStylecrashes in heatmaps and autocapture when the event target is a cross-realm element (e.g. from an iframe or synthetic event)(2026-07-02)
5e7e132]:v1.396.4Compare Source
1.396.4
Patch Changes
#4035
18e543bThanks @posthog! - fix(web): isolateonFeatureFlagscallbacks so a throwing user handler no longer breaks the remaining callback chain or gets misattributed as an SDK error(2026-07-01)
#4039
15bcb42Thanks @github-actions! - fix(replay): measure$snapshot_bytesas UTF-8 byte length instead of UTF-16 string length, so non-ASCII session replay payloads are counted accurately against the message size limit(2026-07-01)
v1.396.3Compare Source
1.396.3
Patch Changes
e0ad8efThanks @posthog! - FixTypeError: ....at is not a functionthrown by the bundledweb-vitalsdependency on browsers that predateArray.prototype.at()(Chrome <92, iOS Safari <15.4). The web-vitals entrypoints now install a tinyArray.prototype.atpolyfill before web-vitals runs, so web vitals capture works again on older browsers instead of crashing with an unhandled error.(2026-06-30)
v1.396.2Compare Source
1.396.2
Patch Changes
b6261e7Thanks @marandaneto! - Include a Promise polyfill in the IE11 bundle and avoid Promise-dependent async compression paths when Promise support is unavailable.(2026-06-29)
v1.396.1Compare Source
1.396.1
Patch Changes
cdeae17Thanks @marandaneto! - Fall back to uncompressed browser requests when gzip encoding fails.(2026-06-29)
v1.396.0Compare Source
1.396.0
Minor Changes
74cc6bbThanks @TueHaulund! - Add aget_current_urlconfig option that overrides the URL used for client-side URL targeting — session replay URL triggers, the session replay URL blocklist, survey URL display conditions, product tour URL conditions, web experiment URL conditions, and autocapture URL allow/ignore lists. These match againstwindow.location.hrefdirectly, which does not reflect a$current_urlrewritten inbefore_send. Apps where the browser URL is not meaningful for targeting (e.g. Electron/desktop builds served from a generated host) can now return the logical URL to match against. Defaults towindow.location.hrefwhen not set.(2026-06-29)
Patch Changes
74cc6bb]:v1.395.0Compare Source
1.395.0
Minor Changes
6200888Thanks @turnipdabeets! - AddgetAllFeatureFlags(), which returns all currently loaded feature flags as structuredFeatureFlagResults (key,enabled,variant,payload). It is a synchronous read of the cached flags and does not send a$feature_flag_calledevent.(2026-06-26)
Patch Changes
6200888]:v1.394.0Compare Source
1.394.0
Minor Changes
919abcaThanks @ioannisj! - Capture the$device_modelsuper-property on Android Chromium vianavigator.userAgentData.getHighEntropyValues(['model']). Resolved once during init and sent on subsequent events; opt out withdisableDeviceModel: true.(2026-06-26)
v1.393.6Compare Source
1.393.6
Patch Changes
6ef9179Thanks @marandaneto! - Handle request serialization errors without throwing or blocking queued requests.(2026-06-26)
v1.393.5Compare Source
1.393.5
Patch Changes
619d318Thanks @marandaneto! - Improve console log capture performance for truncated large objects.(2026-06-25)
v1.393.4Compare Source
1.393.4
Patch Changes
c9c8925Thanks @hpouillot! - Fix browser console log capture when session activity timestamps are missing and refresh session attributes for each log.(2026-06-24)
c9c8925]:v1.393.3Compare Source
1.393.3
Patch Changes
f94deafThanks @ioannisj! - fix(surveys): guard handlePageUnload against version-skewed surveys instance missing the method(2026-06-24)
[
v1.393.2](https://redirect.gitConfiguration
📅 Schedule: (in timezone Europe/Berlin)
* 8-17 * * 1-5)* 8-17 * * 1-5)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.