Skip to content

posthog-js@1.386.1

Choose a tag to compare

@github-actions github-actions released this 10 Jun 20:53
· 18 commits to main since this release
Immutable release. Only release title and notes can be modified.
defbc62

1.386.1

Patch Changes

  • #3780 93e0461 Thanks @dustinbyrne! - Fix stale sampled-in session replay decisions after the configured replay sample rate changes.
    (2026-06-10)

  • #3788 6da86d0 Thanks @TueHaulund! - fix(replay): never record or flush snapshots while the sampling decision is missing

    When the stored sampling decision was wiped while the recorder was running (e.g. by posthog.reset()), the undecided session reported an active status 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 ('!' + sessionId when 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 stale false decision 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