posthog-js@1.386.1
1.386.1
Patch Changes
-
#3780
93e0461Thanks @dustinbyrne! - Fix stale sampled-in session replay decisions after the configured replay sample rate changes.
(2026-06-10) -
#3788
6da86d0Thanks @TueHaulund! - fix(replay): never record or flush snapshots while the sampling decision is missingWhen the stored sampling decision was wiped while the recorder was running (e.g. by
posthog.reset()), the undecided session reported anactivestatus and could leak short junk recordings from sessions that then decided not to record. Sampling decisions are now persisted tagged with the session id they were made for ('!' + sessionIdwhen sampled out), are re-made on every session id change regardless of config availability, and a buffer is never flushed without a decision when sampling is configured. Because the decision is a deterministic hash of the session id, re-deciding never flips the outcome for the same session. This also stops a stalefalsedecision from a previous session being inherited by a new session, which chronically under-recorded returning visitors. (2026-06-10) -
Updated dependencies []:
- @posthog/types@1.386.1
- @posthog/core@1.32.1