github PostHog/posthog-js posthog-js@1.386.1

latest releases: posthog-react-native@4.46.30, @posthog/ai@8.1.9, @posthog/webpack-plugin@1.5.20...
6 hours ago

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

Don't miss a new posthog-js release

NewReleases is sending notifications on new releases.