Packages

posthog-js

1.438.13 · 20 Oct 2026(Apache-2.0 AND MIT)10.1M / weekRepositoryHomepagenpmAtom feed

1421 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 1.438.13

    20 Oct 2026
    • Flush buffered web vitals immediately using a beacon when the page is hidden or unloaded.
      (2026-10-20)

  2. 1.438.12

    15 Oct 2026
    • Prevent backward device clock changes from subtracting client rate-limit tokens.
      (2026-10-15)

  3. 1.438.11

    15 Oct 2026
    • Capture WebMCP failures in Error Tracking when exception autocapture is enabled. With posthog-js/slim, add ErrorTrackingExtensions next to WebMCPExtensions to get these events.
      (2026-10-15)

  4. 1.438.10

    14 Oct 2026
    • Capture the Freebuff click identifier (bfcid) as a campaign parameter, so it is set on events and as $initial_bfcid like every other ad click ID.
      (2026-10-14)

  5. 1.438.9

    12 Oct 2026
    • Fix before_send callback types to accept non-null events while still allowing null returns to drop events.
      (2026-10-12)

  6. 1.438.8

    12 Oct 2026
    • Capture WebMCP error types and sanitized messages.
      (2026-10-12)

  7. 1.438.7

    9 Oct 2026
    • Share browser logging across SDKs with consistent initialization and cleanup; captureLog and logger calls before logging setup are now dropped instead of buffered.
      (2026-10-09)

  8. 1.438.6

    9 Oct 2026
    • Skip WebMCP intent and model injection for schemas with constraints that the extra fields could break.
      (2026-10-09)

    • Export WebMCPExtensions from the slim extension-bundles entry point.
      (2026-10-09)

  9. 1.438.5

    9 Oct 2026
    • Recognize native bundler debug IDs and build-time error tracking release IDs.
      (2026-10-09)

  10. 1.438.4

    9 Oct 2026
    • Fix type checking in posthog-js 1.438.2 by publishing the feature flag types it imports from @posthog/browser-common.
      (2026-10-09)

  11. 1.438.3

    8 Oct 2026
    • replay: add a private opt-in to preserve application stacks for failed fetch requests
      (2026-10-08)

  12. 1.438.2

    7 Oct 2026
    • Share feature flag functionality across browser SDKs while preserving existing behavior.
      (2026-10-07)

  13. 1.438.1

    6 Oct 2026
    • 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)

  14. 1.438.0

    6 Oct 2026
    • Capture WebMCP tool intent and model metadata by default.
      (2026-10-06)

  15. 1.437.0

    6 Oct 2026
    • Add opt-in WebMCP tool call capture for MCP Analytics.
      (2026-10-06)

  16. 1.436.1

    5 Oct 2026
    • Restore batching for events carrying pending Meta $fbc or $fbp identifiers to reduce races with preceding identify() calls.
      (2026-10-05)

  17. 1.436.0

    5 Oct 2026
    • Opt-in WebView bot heuristic for #2921.

  18. 1.435.9

    5 Oct 2026
    • Stop a SecurityError escaping the recorder when an iframe becomes cross-origin while shadow DOM observation starts.
      (2026-10-05)

  19. 1.435.8

    2 Oct 2026
    • Use the new PostHog logo in the survey footer branding
      (2026-10-02)

  20. 1.435.7

    2 Oct 2026
    • Preserve shared identity while consent is pending and clear it after shared rejection in cookieless mode.
      (2026-10-02)

  21. 1.435.6

    1 Oct 2026
    • Capture the OpenAI Ads click identifier (oppref) as a campaign parameter, so it is set on events and as $initial_oppref like every other ad click ID.
      (2026-10-01)

    • Fix cross-subdomain identity continuity when opting in after cookie consent.
      (2026-10-01)

  22. 1.435.5

    30 Sep 2026
    • Preserve session attribution and registered properties across initialization and configuration updates when persistence writes are debounced.
      (2026-09-30)

  23. 1.435.4

    30 Sep 2026
    • Fix a DataCloneError when session replay records network timing inside a cross-origin iframe.
      (2026-09-30)

  24. 1.435.3

    30 Sep 2026
    • Start session recording at DOMContentLoaded, so a page whose load event is late or never fires still records, and report $sdk_debug_rrweb_attached from rrweb's own recording state
      (2026-09-30)

  25. 1.435.2

    30 Sep 2026
    • Reduce replay debug properties on captured events while preserving recording status and capture diagnostics. Report cumulative mutation-drop counts and dropped bytes on $snapshot events only when greater than zero.
      (2026-09-30)

  26. 1.435.1

    29 Sep 2026
    • PostHogFeature without match shows the fallback when the flag evaluates to false.
      (2026-09-29)

  27. 1.435.0

    29 Sep 2026
    • Add onActiveMatchingSurveysChanged to subscribe to survey eligibility updates with safe unsubscribe and recoverable load-error reporting.
      (2026-09-29)

  28. 1.434.18

    29 Sep 2026
    • Prevent analytics persistence writes during initialization when persistence is disabled or opted out.
      (2026-09-29)

    • Isolate replay network masking callback errors so unrelated network records continue to be captured.
      (2026-09-29)

    • Preserve equals signs in survey URL prefill values and ignore malformed URL parameters without blocking surveys.
      (2026-09-29)

  29. 1.434.17

    28 Sep 2026
    • replay: keep a held recording epoch's buffered data when it hits the size cap
      (2026-09-28)

    • replay: keep CSS-in-JS styles after a large DOM change in the page head
      (2026-09-28)

  30. 1.434.16

    28 Sep 2026
    • deprecated

      Honor the modern replay network masking callback when both modern and deprecated hooks are configured.
      (2026-09-28)

  31. 1.434.15

    26 Sep 2026
    • Fix SPA $pageview events from pushState/replaceState navigations carrying the previous page's title
      (2026-09-26)

  32. 1.434.14

    25 Sep 2026
    • Fix useThumbSurvey from @posthog/react/surveys and posthog-js/react/surveys ignoring the client passed to PostHogProvider, which left it capturing no survey events.
      (2026-09-25)

  33. 1.434.13

    24 Sep 2026
    • Replay loads a recorded font under the replay iframe's content security policy, not the embedding page's.
      (2026-09-24)

  34. 1.434.12

    23 Sep 2026
    • The replayer no longer freezes the tab on a mutation that adds tens of thousands of nodes at once. It now applies a batch of 1,000 or more adds against a detached subtree, so the document updates style and layout once instead of per insert. A recorded batch of 25,746 style elements went from 92 seconds of blocked main thread to 1.5 seconds.
      (2026-09-23)

  35. 1.434.11

    23 Sep 2026
    • Avoid cross-domain cookie probes when cross-subdomain cookies are disabled.
      (2026-09-23)

  36. 1.434.10

    23 Sep 2026
    • Fix SDK initialization when a script loader pre-creates window.posthog as a placeholder object.
      (2026-09-23)

  37. 1.434.9

    22 Sep 2026
    • Session replay no longer defers its input setter hooks on zone.js's patched setTimeout. In Angular apps each of those timers ended a zone task and triggered another change detection, so any component writing an input property on every cycle drove the tab into an endless loop at 100% CPU.
      (2026-09-22)

  38. 1.434.8

    22 Sep 2026
    • dead-clicks: survive a denied property access in Firefox

      Firefox denies property access on a DOM node from another origin or from a realm that was torn down. The detector reads isConnected and nodeType on mutation records and on composed paths, and reads getRootNode on selection endpoints, so the denial escaped the MutationObserver callback and stopped the rest of the batch from refreshing the liveness timestamp. A node that cannot be read is now treated as a node that cannot be inspected. (2026-09-22)

  39. 1.434.7

    22 Sep 2026
    • Session replay network capture no longer fails to start in frames without PerformanceObserver or its supportedEntryTypes; those frames record without live network timing.
      (2026-09-22)

  40. 1.434.6

    22 Sep 2026
    • Keep session recording active when a cross-origin image or video taints a canvas.
      (2026-09-22)

  41. 1.434.5

    21 Sep 2026
    • Stop reporting dead clicks on controls inside open shadow roots (such as web components or micro-frontends) when the click updates content inside the shadow root.
      (2026-09-21)

  42. 1.434.4

    21 Sep 2026
    • Fix $session_id being sent as null when a sibling tab resets the session before this tab captures its first event
      (2026-09-21)

  43. 1.434.3

    21 Sep 2026
    • 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.
      (2026-09-21)

  44. 1.434.2

    18 Sep 2026
    • Share survey answer snapshots and response event properties with React Native for consistent partial response reporting.
      (2026-09-18)

  45. 1.434.1

    18 Sep 2026
    • Capture the document navigation timing in the replay network waterfall when recording starts after the page has loaded, and stop recording a partial duplicate of that entry when recording starts while the page is still loading
      (2026-09-18)

  46. 1.434.0

    17 Sep 2026
    • 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.
      (2026-09-17)

  47. 1.433.10

    17 Sep 2026
    • Log a console warning when session replay stops capturing canvas frames (browser without OffscreenCanvas, a CSP that blocks blob: workers, or a failing canvasCapture.maskRegionsFn), and stop changing WebGL and WebGPU canvas settings when canvas capture fails to start
      (2026-09-17)

    • Share survey choice and question shuffling between web and React Native through surveys core. Use Fisher-Yates for web questions, preserve Other-last choice ordering, and avoid mutating configured choices.
      (2026-09-17)

  48. 1.433.9

    17 Sep 2026
    • Add a session diagnostic when stale replay configuration cannot be refreshed, without changing recording behavior.
      (2026-09-17)

  49. 1.433.8

    17 Sep 2026
    • Prefer synchronous compression for events captured with send_instantly, including the initial $pageview, to avoid delaying request dispatch on asynchronous compression.
      (2026-09-17)

  50. 1.433.7

    16 Sep 2026
    • surveys: keep URL prefill working when localStorage is unavailable, such as on a page with an opaque origin or in private browsing
      (2026-09-16)