Compare Versions - posthog-js
npm / posthog-js / Compare Versions
1.376.4
Patch Changes
-
#3685
f59f35aThanks @ioannisj! - fix(cookieless): enable request queue when opting out inon_rejectmode. When usingcookieless_mode: "on_reject", callingopt_out_capturing()correctly switched the SDK into cookieless capturing but never enabled theRequestQueue— so batched events were enqueued but never flushed over the network. At init time the queue was not started because consent wasPENDINGandis_capturing()returnedfalse;opt_out_capturing()is the first moment capturing becomes active but was missing the_start_queue_if_opted_in()call thatopt_in_capturing()already had. (2026-05-28) -
#3692
f01cd93Thanks @ksvat! - fix(replay): take a fresh full snapshot after session ID rotates viaforcedIdleReset. Previously, when the session manager's idle enforcement timer rotated the session id, the recorder tore down rrweb and set_isIdle = 'unknown'before the new session id was observed. Neither restart path then fired (the_onSessionIdCallbackguard only restarted when_isIdle === true, and_updateWindowAndSessionIdscould not run with rrweb stopped), so the new session received only incremental mutations until a later snapshot — leaving the player stuck on "Buffering". The restart guard now also fires when rrweb isn't running. (2026-05-28) -
#3691
cc71f3fThanks @ksvat! - fix(replay): shipph-no-captureabsolute-position fix from #3678 toposthog-js. The original changeset only bumped@posthog/rrweband@posthog/rrweb-snapshot; becauseposthog-jsdepends on@posthog/rrwebviaworkspace:*, the cascade did not bumpposthog-js, so the rebuilt bundle containing the fix was not published. This changeset re-publishesposthog-jswith the fix. (2026-05-28) -
#3695
e1ff722Thanks @ksvat! - chore(replay): expose$sdk_debug_rrweb_attachedand$sdk_debug_rrweb_start_attempteddebug properties on captured events. Today the SDK already stamps several$sdk_debug_*properties (start reason, linked-flag trigger status, recording status) that report the SDK's intent to record — they all flip to "active" as soon as the state machine evaluates the configured triggers. None of them observe whether rrweb actually attached and is producing events. The new booleans close that gap:$sdk_debug_rrweb_start_attemptedis set when_startRecorder()is first entered, and$sdk_debug_rrweb_attachedreflects whether_stopRrwebis currently a non-falsy stop handle (i.e.rrwebRecord({...})returned successfully and the recorder has not been torn down). No behavior change — this only adds two booleans to the existingsdkDebugPropertieschannel, used to diagnose cases where a session reportstrigger_activated/recording_status: activebut no$snapshotdata is ever uploaded. (2026-05-28) -
Updated dependencies [
7b84b75]:- @posthog/core@1.29.13
- @posthog/types@1.376.4
1.376.3
Patch Changes
- #3649
9cac1f6Thanks @marandaneto! - Improve console log serialization performance for large objects. (2026-05-27) - Updated dependencies []:
- @posthog/types@1.376.3
- @posthog/core@1.29.12
1.376.2
Patch Changes
- #3667
cafa9ccThanks @pauldambra! - fix(replay): stop polling preload-as-style<link>elements forever. Session recorder treated<link rel="preload" as="style" href="*.css">as if it were a stylesheet and waited forlink.sheetto populate. Per spec preload links never instantiate aCSSStyleSheet, so the wait timed out, re-serialized the link, scheduled another wait, and leaked aloadlistener on every cycle — multiplying further on every realloadevent. Pages with Next.js-style CSS preloads accumulated thousands of active polling chains, saturating the main thread and freezing the tab on refocus (2026-05-26) - Updated dependencies []:
- @posthog/types@1.376.2
- @posthog/core@1.29.11
1.376.0
Minor Changes
- #3655
6e8d349Thanks @arnaudhillen! - Expose the in-repo@posthog/rrweb,@posthog/rrweb-types, and@posthog/rrweb-plugin-console-recordpackages as subpath entry points onposthog-js. Consumers can nowimport { Replayer } from 'posthog-js/rrweb',import type { eventWithTime } from 'posthog-js/rrweb-types', andimport { LogLevel } from 'posthog-js/rrweb-plugin-console-record'instead of installing the underlying rrweb packages directly. The rrweb worker sourcemap (image-bitmap-data-url-worker-*.js.map) is also shipped fromposthog-js/dist/so downstream bundlers no longer need to reach intonode_modules/@posthog/rrweb. (2026-05-22)
Patch Changes
- #3639
c806ccaThanks @marandaneto! - Use native async gzip compression for session recording events when CompressionStream is available. (2026-05-22) - Updated dependencies [
c806cca]:- @posthog/core@1.29.9
- @posthog/types@1.376.0
1.375.0
Minor Changes
- #3641
2e1d5f4Thanks @dustinbyrne! - Addflag_keysconfig to restrict browser feature flag remote evaluation to specific flag keys. (2026-05-21)
Patch Changes
- Updated dependencies [
2e1d5f4]:- @posthog/types@1.375.0
- @posthog/core@1.29.8
1.374.4
Patch Changes
-
#3638
87e2145Thanks @marandaneto! - Apply tracing headers to matching XMLHttpRequest requests (2026-05-21) -
#3646
4f87827Thanks @marandaneto! - Avoid throwing or initializing PostHogProvider when no API key or client is provided (2026-05-21) -
#3645
280832bThanks @TueHaulund! - Capture<link rel="stylesheet">URLs fromlink.sheet.hrefand trylink.sheetdirectly for inlining, so recordings survive SPAhistory.pushStatenavigations between routes of different path depths (wherelink.hrefre-resolves against a new baseURI butlink.sheet.hrefpreserves the URL the browser actually fetched).Ships the fix landed in #3635, which only bumped the internal
@posthog/rrweb-snapshotpackage — that package is bundled intoposthog-jsat build time but is not published to npm on its own, so aposthog-jsbump is needed to actually deliver the change. (2026-05-21) -
Updated dependencies []:
- @posthog/types@1.374.4
- @posthog/core@1.29.7
1.374.2
Patch Changes
-
#3550
df91995Thanks @TueHaulund! - Preserve session-recording remote config acrossposthog.reset().posthog.reset()was clearing the entire persistence store, which wiped$session_recording_remote_configalong with user state. On the next session rotation triggered by the reset,start('session_id_changed')would early-return because the remote config was missing — leaving rrweb torn down and the new session opening with no Meta + FullSnapshot until the next periodic 5-minute checkout.This affected any flow where an app calls
posthog.reset()mid-session (e.g. on sign-out / sign-in) and was particularly visible on Flutter Web recordings that depend on a fresh FullSnapshot to anchor the CanvasKit DOM. (2026-05-18) -
Updated dependencies []:
- @posthog/types@1.374.2
- @posthog/core@1.29.5
1.374.1
Patch Changes
- #3627
07a0f5fThanks @marandaneto! - Respect transport overrides passed to posthog.capture. (2026-05-18) - Updated dependencies []:
- @posthog/types@1.374.1
- @posthog/core@1.29.4
1.374.0
Minor Changes
- #3620
594ea11Thanks @pauldambra! - Dead clicks: add a.ph-no-deadclickCSS class (andcapture_dead_clicks.css_selector_ignorelistconfig option) to exclude specific elements from dead-click detection without affecting autocapture, session replay, or heatmaps. Mirrors the existing.ph-no-rageclickpattern. (2026-05-18)
Patch Changes
- #3621
3c0a09fThanks @pauldambra! - Dead clicks: a click on an<a>(or any element inside an<a>, including across shadow DOM) is no longer flagged as a dead click — the browser navigates / downloads / opens a new window and we can't observe that. Reuses autocapture's existing DOM walker for the ancestor walk. Direct clicks on<button>,<input>,<select>,<textarea>,<label>, and<form>(previously all skipped) are now eligible for dead-click detection: if their JS handler ran, the existing mutation / scroll / selection observers see the effect; if it didn't, dead-click correctly surfaces the bug. A broken<button>with no handler, or an<svg>icon inside one, will now flag — which is exactly the dead-click case we want to catch. (2026-05-18) - Updated dependencies [
594ea11]:- @posthog/types@1.374.0
- @posthog/core@1.29.3
1.373.5
Patch Changes
- #3613
221973eThanks @lucasheriques! - Surveys: submit open text questions with Cmd/Ctrl+Enter. The textarea still inserts a newline on plain Enter (native behaviour), matching the convention used by Slack, GitHub, Discord, and ChatGPT for multi-line inputs. Single-line "Other:" inputs continue to submit on plain Enter as before. (2026-05-15) - Updated dependencies []:
- @posthog/types@1.373.5
- @posthog/core@1.29.2
1.373.4
Patch Changes
- #3602
4b895bfThanks @marandaneto! - Validate gzip request bodies at the browser send boundary and fall back to JSON if the outgoing body is not gzip data. (2026-05-12) - Updated dependencies [
4b895bf]:- @posthog/core@1.29.1
- @posthog/types@1.373.4
1.373.2
Patch Changes
- #3568
223d925Thanks @marandaneto! - Validate native gzip output before sending requests and fall back when CompressionStream returns malformed data. (2026-05-11) - Updated dependencies [
223d925]:- @posthog/core@1.28.7
- @posthog/types@1.373.2
1.373.1
Patch Changes
- #3566
7d027bcThanks @dustinbyrne! - Prevent browser log capture from throwing when console arguments contain unreadable properties. (2026-05-11) - Updated dependencies []:
- @posthog/types@1.373.1
- @posthog/core@1.28.6
1.373.0
Minor Changes
- #3547
4c0c7d9Thanks @williamchong! -capture()now accepts an optionaluuidonCaptureOptions. (2026-05-11)
Patch Changes
-
#3561
3511848Thanks @marandaneto! - Handle invalid persisted session replay config JSON gracefully (2026-05-11) -
#3559
0a835faThanks @marandaneto! - Skip remote config background refreshes when no document is available. (2026-05-11) -
Updated dependencies [
4c0c7d9,0a835fa]:- @posthog/types@1.373.0
- @posthog/core@1.28.5
1.372.10
Patch Changes
-
#3544
d120042Thanks @ksvat! - fix: stop session recording before destroying sessionManager inopt_out_capturing()withcookieless_mode: "on_reject". Previously, queued/throttled rrweb events (e.g. mousemove) could fire after the sessionManager was set toundefinedand throw[SessionRecording] must be started with a valid sessionManager. Also adds a defensive early-return inonRRwebEmitso any remaining late events bail out instead of throwing. (2026-05-07) -
#3542
94a5ba0Thanks @TueHaulund! - Preserve<style>textContent when the browser's CSSOM serialization would emit empty longhands fromvar()inside a shorthand. When a stylesheet has e.g.padding: var(--p); padding-bottom: var(--pb);, browsers store the shorthand's longhands with empty token lists per the CSS Custom Properties spec, andCSSStyleRule.cssTextre-emits them aspadding-top: ; padding-right: ; padding-left: ;. The previous behavior replaced the<style>text with that corrupted output, silently dropping layout rules on replay. We now detect the empty-longhand pattern and keep the original textContent in that case. Affects users of any CSS-in-JS framework that combinesvar()with shorthands (Chakra UI v3, Panda CSS, Emotion, etc.). Same class of bug as rrweb-io/rrweb#1667. (2026-05-07) -
Updated dependencies []:
- @posthog/types@1.372.10
- @posthog/core@1.28.4
1.372.9
Patch Changes
- #3537
026e09dThanks @TueHaulund! - Pull in the canvas-manager fix from@posthog/rrweb0.0.61: skip canvas snapshots while the WebGL context is lost so transparent bitmaps don't poison the worker's fingerprint dedup map and silently kill canvas recording for the rest of the session. Also wrapsgetCanvas()in try/catch so DOM/shadow-root traversal errors can't cancel the rAF loop. See PR #3527 for context. (2026-05-05) - Updated dependencies []:
- @posthog/types@1.372.9
- @posthog/core@1.28.3
1.372.8
Patch Changes
- #3515
255b273Thanks @marandaneto! - Gate survey translation logs behind SDK debug logging to avoid production console spam. (2026-05-04) - Updated dependencies [
220cd61,255b273]:- @posthog/core@1.28.2
- @posthog/types@1.372.8
1.372.6
Patch Changes
- #3492
cf56753Thanks @lucasheriques! - Add translated survey rendering support in React Native and share survey translation logic through@posthog/core. (2026-05-01) - Updated dependencies [
cf56753,04db756]:- @posthog/core@1.28.0
- @posthog/types@1.372.6
1.372.3
Patch Changes
- #3488
5b8efc3Thanks @lucasheriques! - Add browser survey translation rendering and language tracking. (2026-04-27) - Updated dependencies []:
- @posthog/types@1.372.3
- @posthog/core@1.27.7
1.372.2
Patch Changes
- #3484
cba2570Thanks @veryayskiy! - Fix autofocus (2026-04-27) - Updated dependencies []:
- @posthog/types@1.372.2
- @posthog/core@1.27.6
1.372.1
Patch Changes
- #3464
70508dfThanks @dustinbyrne! - Avoid usingBlob.stream()for native async gzip compression to prevent SafariNotReadableErrorstream failures. (2026-04-24) - Updated dependencies [
70508df]:- @posthog/core@1.27.5
- @posthog/types@1.372.1
1.372.0
Minor Changes
- #3470
eaa1322Thanks @veryayskiy! - You cannot write to a resolve ticket. Start a new one. (2026-04-24)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.372.0
- @posthog/core@1.27.4
1.371.3
Patch Changes
- #3445
61cf83eThanks @dustinbyrne! - Fix session recording in the full no-external browser bundles (2026-04-24) - Updated dependencies [
daf028d]:- @posthog/core@1.27.2
- @posthog/types@1.371.3
1.371.2
Patch Changes
- #3453
96f19b7Thanks @turnipdabeets! - Lift OTLP log serialization helpers from posthog-js into @posthog/core so the upcoming React Native logs feature consumes the same builders. Browser gains two fixes as a side effect: NaN and ±Infinity attribute values no longer get silently dropped during JSON encoding, and the scope.version OTLP field is now populated with the SDK version (changes the server's instrumentation_scope column from "posthog-js@" to "posthog-js@"). (2026-04-23) - Updated dependencies [
96f19b7]:- @posthog/types@1.371.2
- @posthog/core@1.27.1
1.371.1
Patch Changes
- #3425
2da17e8Thanks @marandaneto! - Classify SDK-owned persistence keys with an explicit event exposure policy so new internal persistence state must be intentionally marked as event-visible, hidden, or derived. (2026-04-23) - Updated dependencies []:
- @posthog/types@1.371.1
1.371.0
Patch Changes
-
#3432
1a8b727Thanks @richardsolomou! - refactor: rename__add_tracing_headerstoaddTracingHeaders. The__prefix signalled an internal/experimental option, but the config is a public API (documented for linking LLM traces to session replays).__add_tracing_headerscontinues to work as a deprecated alias on the browser SDK.Also exposes
patchFetchForTracingHeadersfrom@posthog/coreso non-browser SDKs can reuse the implementation. (2026-04-23) -
Updated dependencies [
1a8b727]:- @posthog/core@1.27.0
- @posthog/types@1.371.0
1.370.1
Patch Changes
- #3442
6f19ce8Thanks @marandaneto! - fix(surveys): guard survey seen localStorage access (2026-04-22) - Updated dependencies []:
- @posthog/types@1.370.1
1.370.0
Minor Changes
- #3389
922a1c1Thanks @hpouillot! - Add exception steps to error tracking (aka breadcrumbs) (2026-04-22)
Patch Changes
- Updated dependencies [
922a1c1]:- @posthog/types@1.370.0
- @posthog/core@1.26.0
1.369.4
Patch Changes
- #3362
d61bce1Thanks @sampennington! - fix(cookieless): start in cookieless mode when opt_out_capturing_by_default is set (2026-04-21) - Updated dependencies []:
- @posthog/types@1.369.4
1.369.2
Patch Changes
- #3386
4a65604Thanks @dustinbyrne! - Add a preview flag for versioned browser lazy bundle asset paths. (2026-04-16) - Updated dependencies [
4a65604]:- @posthog/types@1.369.2
1.369.1
Patch Changes
-
#3393
85ae4d9Thanks @haacked! - Exclude active feature flag payloads from event properties (2026-04-16) -
#3392
00cd1ceThanks @haacked! - Fix unnecessary persisted config and activation properties (including product tours, surveys, and session recording config) added to captured events (2026-04-16) -
Updated dependencies []:
- @posthog/types@1.369.1
1.368.2
Patch Changes
- #3378
f1bea33Thanks @marandaneto! - Disable native gzip compression after a NotReadableError in the browser SDK (2026-04-14) - Updated dependencies []:
- @posthog/types@1.368.2
1.368.1
Patch Changes
- #3379
d7c71b1Thanks @dmarticus! - Fix bootstrapped feature flags being overwritten by partial /flags response whenadvanced_only_evaluate_survey_feature_flagsis enabled (2026-04-14) - Updated dependencies []:
- @posthog/types@1.368.1
1.367.0
Minor Changes
- #3242
353be9aThanks @dustinbyrne! - feat: Add support for pre-loaded remote-config (2026-04-09)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.367.0
1.366.2
Patch Changes
- #3364
575e354Thanks @lucasheriques! - Add a hover state to numeric survey rating options so they provide clearer pointer feedback before selection. (2026-04-09) - Updated dependencies []:
- @posthog/types@1.366.2
1.366.1
Patch Changes
- #3360
802bf39Thanks @jabahamondes! - Re-evaluate consent persistent store when config changes to support cross-subdomain consent sharing (2026-04-09) - Updated dependencies []:
- @posthog/types@1.366.1
1.366.0
Minor Changes
- #3305
b599672Thanks @veryayskiy! - Add customer side identification (2026-04-09)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.366.0
1.365.4
Patch Changes
- #3353
3939856Thanks @lucasheriques! - Expose the current question index on.survey-boxvia adata-question-indexattribute. This gives consumers rendering surveys via the API a reliable way to know which question is currently displayed without parsing input ids or class names — works for every question type, including link questions which render no input or rating element. (2026-04-08) - Updated dependencies []:
- @posthog/types@1.365.4
1.365.3
Patch Changes
- #3357
dbdddcaThanks @pauldambra! - Bump @posthog/rrweb packages to 0.0.56, which includes:- PostHog/posthog-rrweb#157: fix: clear mutation buffer on iframe pagehide to prevent recording corruption
- PostHog/posthog-rrweb#158: fix: skip unchanged setAttribute calls to prevent replay flicker
- PostHog/posthog-rrweb#159: fix: prevent iframe leak in untainted prototype and avoid unnecessary iframe creation
- PostHog/posthog-rrweb#163: fix: handle SecurityError in IframeManager destroy and removeIframeById
- PostHog/posthog-rrweb#166: fix: remove postcss from @posthog/rrweb-record bundle (420KB → 170KB) (2026-04-08)
- Updated dependencies []:
- @posthog/types@1.365.3
1.365.2
Patch Changes
- #3323
c387f6dThanks @pauldambra! - perf(replay): reduce memory and CPU cost of event compression by caching gzipped empty arrays and eliminating redundant JSON.stringify for size estimation (2026-04-08) - Updated dependencies [
c387f6d]:- @posthog/types@1.365.2
1.365.0
Minor Changes
- #3302
fc5589fThanks @dmarticus! - preserve $set_once semantics in local flag evaluation cache (2026-04-07)
Patch Changes
- Updated dependencies [
fc5589f]:- @posthog/core@1.25.0
- @posthog/types@1.365.0
1.364.7
Patch Changes
- #3319
b25b689Thanks @dustinbyrne! - fix: send $groupidentify for new groups even when no properties are provided (2026-04-03) - Updated dependencies []:
- @posthog/types@1.364.7
1.364.6
Patch Changes
- #3316
68cd4e5Thanks @dustinbyrne! - Fix slim bundle + extension bundles crash caused by inconsistent property mangling (2026-04-02) - Updated dependencies [
a01a3d5]:- @posthog/core@1.24.6
- @posthog/types@1.364.6
1.364.5
Patch Changes
-
#3309
197eedaThanks @marandaneto! - Extract CLI and sourcemap utilities from @posthog/core into @posthog/plugin-utils to remove cross-spawn from React Native dependencies (2026-04-01) -
#3312
c5feb5cThanks @TueHaulund! - Bump @posthog/rrweb-* to 0.0.52 — adds error recovery to the canvas FPS snapshot pipeline, preventing canvas recording from permanently stopping when createImageBitmap or the worker encounters an error (2026-04-01) -
#3315
7b944fcThanks @TueHaulund! - Bump @posthog/rrweb-* to 0.0.53 — fixes infinite recursion crash ("Maximum call stack size exceeded") when calling posthog.reset() or restarting the recorder on pages with shadow DOM elements (e.g. CometChat) (2026-04-01) -
Updated dependencies [
197eeda]:- @posthog/core@1.24.5
- @posthog/types@1.364.5
1.364.4
Patch Changes
- #3298
2365df5Thanks @TueHaulund! - fix: skip deep copy for snapshot/exception events to prevent stack overflow on deeply nested DOM trees (2026-03-31) - Updated dependencies []:
- @posthog/types@1.364.4
1.364.3
Patch Changes
- #3300
bab5f3aThanks @dustinbyrne! - Strip workspace:* references from lib/package.json after build (2026-03-31) - Updated dependencies []:
- @posthog/types@1.364.3
1.364.2
Patch Changes
- #3297
341caafThanks @marandaneto! - fix: wrap sendBeacon body in Blob to ensure Content-Type header is set (2026-03-30) - Updated dependencies [
a863914]:- @posthog/core@1.24.4
- @posthog/types@1.364.2
1.364.0
Minor Changes
- #3285
00a5079Thanks @pauldambra! - Reject the strings "undefined" and "null" in posthog.identify(). All invalid distinct IDs now log a critical console error (always visible, not debug-only). (2026-03-27)
Patch Changes
- #3286
8d34289Thanks @marandaneto! - Use async native CompressionStream for gzip compression to avoid blocking the main thread (2026-03-27) - Updated dependencies [
8d34289]:- @posthog/core@1.24.2
- @posthog/types@1.364.0
1.363.6
Patch Changes
- #3279
32edaadThanks @pauldambra! - Bump @posthog/rrweb packages to 0.0.51, which includes:- PostHog/posthog-rrweb#145: fix: handle cross-origin iframe errors during stop handler cleanup
- PostHog/posthog-rrweb#148: fix: mask textarea innerText mutations
- PostHog/posthog-rrweb#150: fix: guard WebGLRenderingContext access for iOS compatibility
- PostHog/posthog-rrweb#151: refactor: extract slimDOMDefaults into shared function
- PostHog/posthog-rrweb#152: fix: improve nested CSS rule handling
- PostHog/posthog-rrweb#153: fix: allow clearing adopted stylesheets with empty strings
- PostHog/posthog-rrweb#154: fix: prevent object reference mutation breaking remote CSS replay
- PostHog/posthog-rrweb#156: fix: catch all SecurityError variants in stop handler cleanup (2026-03-26)
- Updated dependencies []:
- @posthog/types@1.363.6
1.363.5
Patch Changes
-
#3278
c59dc90Thanks @dustinbyrne! - Add tree-shakeable ESM extension-bundles entry point for slim builds (2026-03-25) -
#3274
ba08262Thanks @pauldambra! - fix: document visibility change shoudln't capture dead click (2026-03-25) -
Updated dependencies [
ba08262]:- @posthog/types@1.363.5
1.363.3
Patch Changes
- #3253
42fbd41Thanks @marandaneto! - Reduce browser SDK bundle size by ~6.6 KB (-3.7%) through code modernization, build config tuning, string deduplication, enum-to-const conversions, and property access shorthand getters. (2026-03-23) - Updated dependencies []:
- @posthog/types@1.363.3
1.363.0
Minor Changes
- #3247
7efa558Thanks @dmarticus! - prevent silent identity switch during bootstrap and auto-identify anonymous users (2026-03-20)
Patch Changes
- #3245
1acd6fdThanks @dmarticus! - handle plain array and object forms in overrideFeatureFlags (2026-03-20) - Updated dependencies [
1acd6fd]:- @posthog/types@1.363.0
1.362.0
Minor Changes
- #3244
ff8a93eThanks @sampennington! - Fixed $set_once initial person properties (e.g. $initial_current_url) not being included with $identify calls when they had already been sent with a prior event. This ensures initial properties are reliably set when identifying users across subdomains, even if an anonymous event was captured first. (2026-03-18)
Patch Changes
- Updated dependencies [
9cd2313]:- @posthog/core@1.24.0
- @posthog/types@1.362.0
1.361.1
Patch Changes
- #3249
c265d62Thanks @marandaneto! - fix: preserve_overrideSDKInfofrom terser mangling so wrapper SDKs can call it (2026-03-18) - Updated dependencies []:
- @posthog/types@1.361.1
1.361.0
Minor Changes
-
#3201
552c018Thanks @frankh! - Add a serviceName config option to logs config (2026-03-18) -
#3240
e4a58d0Thanks @marandaneto! - Add internal_overrideSDKInfomethod to allow wrapper SDKs to override$liband$lib_versionevent properties (2026-03-18) -
#3241
fe1fd7bThanks @dustinbyrne! - feat: addadvanced_feature_flags_dedup_per_sessionconfig option to scope$feature_flag_calleddeduplication to the current session (2026-03-18)
Patch Changes
-
#3239
bf4f078Thanks @jonathanlab! - fix: debug mode not persisting across page navigations (2026-03-18) -
#3228
8773fdfThanks @TueHaulund! - fix: restart session recorder when session rotates externally while idle, preventing "Recording not found" for sessions where analytics events triggered session rotation (2026-03-18) -
Updated dependencies [
552c018,fe1fd7b]:- @posthog/types@1.361.0
1.360.2
Patch Changes
- #3236
bc30c2dThanks @dustinbyrne! - fix: Calling reset() now automatically reloads feature flags (2026-03-13) - Updated dependencies [
bc30c2d,bc30c2d]:- @posthog/core@1.23.4
- @posthog/types@1.360.2
1.360.0
Patch Changes
-
#3213
db089fdThanks @TueHaulund! - fix(replay): treat legacy configs without cache_timestamp as freshConfigs persisted by older SDK versions never include a cache_timestamp. Defaulting to 0 treats them as always stale, causing the persisted config to be cleared before start() runs — so recording never starts for customers on older core SDK versions paired with the latest CDN recorder. (2026-03-09)
-
#3207
c5a37cbThanks @dustinbyrne! - fix: PostHogFeatureFlags uses a TreeShakeabletype (2026-03-09) -
Updated dependencies [
c5a37cb]:- @posthog/types@1.360.0
1.359.1
Patch Changes
- #3204
2b0cd52Thanks @marandaneto! - chore: upgrade dompurify to 3.3.2 (2026-03-06) - Updated dependencies []:
- @posthog/types@1.359.1
1.359.0
Minor Changes
- #3166
9180726Thanks @dustinbyrne! - feat: Tree-shake feature flags (2026-03-05)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.359.0
1.358.1
Patch Changes
-
#3191
9f41d26Thanks @TueHaulund! - fix(replay): fall back to persisted config when remote config fetch failsWhen the remote config fetch failed (network error, ad blocker, CDN outage), the SDK received an empty
{}response with nosessionRecordingkey. TheonRemoteConfighandler returned early without ever setting_receivedFlags = true, leaving the recording permanently stuck inpending_configstatus for the entire page session.This removes the
_receivedFlagsgate entirely. The 1-hour TTL on persisted config (added in #3051, increased from 5 minutes) and the stale-config retry in_onScriptLoaded(added in #3093) already prevent recording from starting with outdated config. The additional gate was redundant and created a deadlock when the config fetch failed.Now when the config fetch fails,
startIfEnabledOrStop()is called and falls back to persisted config from a previous page load. If no persisted config exists (first-ever visit), recording is correctly disabled rather than silently stuck. (2026-03-04) -
#3198
9d0df0eThanks @TueHaulund! - Reduce session replay memory pressure by tracking per-event sizes in SnapshotBuffer, eliminating redundant JSON.stringify calls during buffer operations. Also bumps @posthog/rrweb to 0.0.46 which uses FNV-1a hash-based canvas frame deduplication instead of storing full base64 strings. (2026-03-04) -
Updated dependencies []:
- @posthog/types@1.358.1
1.358.0
Minor Changes
- #3165
0e08337Thanks @dustinbyrne! - feat: Tree-shake surveys, toolbar, exceptions, conversations, logs, experiments (2026-03-03)
Patch Changes
- #3164
20c1ff2Thanks @dustinbyrne! - Add Extension interface for tree-shakable extensions (2026-03-03) - Updated dependencies []:
- @posthog/types@1.358.0
1.357.0
Minor Changes
- #3169
4f885c0Thanks @marandaneto! - feat: add local sampleRate config for session recording (2026-03-02)
Patch Changes
- #3179
0dce119Thanks @TueHaulund! - Bump @posthog/rrweb-* to 0.0.45 — reuses a single OffscreenCanvas in the canvas recording worker instead of allocating a new one per frame, fixing a memory leak in Safari where GPU-backed canvas resources were not being garbage collected promptly (2026-03-02) - Updated dependencies [
4f885c0]:- @posthog/types@1.357.0
1.356.2
Patch Changes
-
#3174
e9127d8Thanks @TueHaulund! - Detect and report when rrweb fails to initialize. rrweb'srecord()silently swallows startup errors and returnsundefined, which previously left the SDK reporting an active recording status while capturing zero data. The SDK now checks the return value and reports a newrrweb_errorstatus, making the failure visible in debug properties. (2026-03-02) -
#3175
6ee5f12Thanks @TueHaulund! - Fix memory leak in canvas recording on Safari < 16.4 where ImageBitmaps were never closed when OffscreenCanvas was unavailable in the web worker. (2026-03-02) -
#3178
186871aThanks @TueHaulund! - Skip canvas FPS recording entirely on browsers without OffscreenCanvas support (Safari < 16.4) instead of running a wasteful requestAnimationFrame loop that can never produce data. Also includes displayWidth/displayHeight in canvas mutation data for correct replay sizing. (2026-03-02) -
#3176
87bae20Thanks @dustinbyrne! - fix: Drop explicit exports (2026-03-02) -
#3172
2e46959Thanks @dustinbyrne! - fix: Compressed requests use ArrayBuffer (2026-03-02) -
Updated dependencies []:
- @posthog/types@1.356.2
1.356.0
Minor Changes
- #3142
ec54fd8Thanks @dmarticus! - Add feature_flag_cache_ttl_ms config to prevent stale flag values (2026-02-26)
Patch Changes
-
#3154
a47179cThanks @slshults! - fix: Improve tablet device type detection when Chrome sends desktop-like UA stringsChrome on Android tablets defaults to "request desktop site" mode, sending a UA string indistinguishable from desktop Linux. This uses the Client Hints API (navigator.userAgentData.platform) and touch capability (navigator.maxTouchPoints) to correctly classify these devices as Tablet or Mobile when UA-based detection falls through to the Desktop default. (2026-02-26)
-
#3145
d741668Thanks @dmarticus! - Adds a remote_config_refresh_interval_ms config option to control how often feature flags are automatically refreshed in long-running sessions. (2026-02-26) -
Updated dependencies [
ec54fd8,d741668]:- @posthog/types@1.356.0
1.354.2
Patch Changes
- #3153
67cf41eThanks @dustinbyrne! - fix: Add additional legacy exports for fully qualified dist and lib exports (2026-02-25) - Updated dependencies []:
- @posthog/types@1.354.2
1.354.1
Patch Changes
- #3148
9ae20e7Thanks @dustinbyrne! - fix: Expose all export paths (2026-02-25) - Updated dependencies []:
- @posthog/types@1.354.1
1.354.0
Minor Changes
- #3080
4d0c783Thanks @dustinbyrne! - feat: Introduce internal config to improve tree-shaking (2026-02-25)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.354.0
1.353.0
Minor Changes
- #3135
fba7e5bThanks @dustinbyrne! - feat: Persist $user_state to cookie for server-side access (2026-02-23)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.353.0
1.352.1
Patch Changes
-
#3129
6bfa003Thanks @pauldambra! - fix: no need to put rrweb and friends directly on window in posthog-recorder (2026-02-23) -
#3131
ad26474Thanks @veryayskiy! - Fix issue with toolbar interferring distinct id in conversations (2026-02-23) -
Updated dependencies []:
- @posthog/types@1.352.1
1.352.0
Minor Changes
- #3121
c3c9780Thanks @veryayskiy! - Ability to retrieve previous conversations (2026-02-20)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.352.0
1.351.4
Patch Changes
- #3119
2649a9aThanks @dmarticus! - Adds a fresh option to getFeatureFlag(), getFeatureFlagResult(), and isFeatureEnabled() that only returns values loaded from the server, not cached localStorage values. (2026-02-19) - Updated dependencies [
2649a9a]:- @posthog/types@1.351.4
1.351.0
Minor Changes
- #3115
8655261Thanks @veryayskiy! - Strip markdown in tickets list (2026-02-18)
Patch Changes
- #3107
9dbc05eThanks @ablaszkiewicz! - warning on manual capture('$exception') (2026-02-18) - Updated dependencies [
9dbc05e]:- @posthog/types@1.351.0
- @posthog/core@1.23.1
1.350.0
Minor Changes
- #2895
1b47203Thanks @benjackwhite! - RemoteConfig (config.js) has been loaded for ages and is in use by us in production. This PR makes it the sole config loading mechanism for posthog-js, removing the legacy /flags/?v=2&config=true path and the __preview_remote_config gate. (2026-02-17)
Patch Changes
- Updated dependencies [
1b47203]:- @posthog/types@1.350.0
1.348.0
Minor Changes
- #3108
c4ca045Thanks @veryayskiy! - Support multiple tickets (2026-02-17)
Patch Changes
1.347.2
Patch Changes
-
#3094
0d30218Thanks @TueHaulund! - feat(replay): add $snapshot_max_depth_exceeded debug property and bump rrweb to 0.0.42 with DOM depth limit (2026-02-13) -
#3093
f19b7f2Thanks @TueHaulund! - fix(replay): retry session recording start when persisted remote config is stale (2026-02-13) -
Updated dependencies []:
- @posthog/types@1.347.2
1.345.5
Patch Changes
- #3060
7437982Thanks @pauldambra! - Add missingfeatureFlagsproperty andOverrideFeatureFlagsOptionstype toPostHoginterface, restoreset_configto the loaded callback type, and addfeatureFlagsReloadingtoon()event types (2026-02-11) - Updated dependencies [
7437982]:- @posthog/types@1.345.5
1.345.4
Patch Changes
- #3074
4e7fda9Thanks @marandaneto! - fix: session replay respects the network_timing remote config (2026-02-11) - Updated dependencies []:
- @posthog/types@1.345.4
1.345.3
Patch Changes
- #3064
50ebdfbThanks @jordanm-posthog! - Fixed an issue where Dead Clicks could continue being captured after being disabled via remote config. (2026-02-10) - Updated dependencies [
0acf16f]:- @posthog/core@1.22.0
- @posthog/types@1.345.3
1.345.0
Minor Changes
- #2919
fe8090cThanks @dustinbyrne! - Add$feature_flag_errorproperty to$feature_flag_calledevents (2026-02-09)
Patch Changes
- #3066
90db5d4Thanks @pauldambra! - fix: remote config cache invalidation was too aggressive (2026-02-09) - Updated dependencies [
fe8090c]:- @posthog/types@1.345.0
1.343.1
Patch Changes
- #3051
aa712a3Thanks @pauldambra! - fix: replay remote config cache should be invalidated periodically (2026-02-09) - Updated dependencies []:
- @posthog/types@1.343.1
1.343.0
Minor Changes
- #3048
dd3328fThanks @veryayskiy! - Do not show identification form if user is identified (2026-02-09)
Patch Changes
- #3049
8d9bb16Thanks @pauldambra! - fix: sampled: true in persistence if legacy and should be ignored (2026-02-09) - Updated dependencies []:
- @posthog/types@1.343.0
1.342.1
Patch Changes
- #3039
8f75daeThanks @hpouillot! - fix(err): fix console error capturing (2026-02-06) - Updated dependencies [
8f75dae]:- @posthog/core@1.20.1
- @posthog/types@1.342.1
1.342.0
Minor Changes
- #3032
19d59eaThanks @dmarticus! - add featureFlagsReloading event for tracking flag reload state (2026-02-05)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.342.0
1.340.0
Minor Changes
- #3024
2b2725eThanks @veryayskiy! - Support widget position (2026-02-04)
Patch Changes
- Updated dependencies [
bb62809]:- @posthog/core@1.20.0
- @posthog/types@1.340.0
1.338.0
Minor Changes
- #3020
5ccf27eThanks @veryayskiy! - Fix issue with contrast colors in support widget (2026-02-03)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.338.0
1.337.0
Minor Changes
-
#2996
7768010Thanks @matheus-vb! - Filter out flags marked as failed before merging with cached values, preventing transient backend errors from overwriting previously evaluated flag states (2026-02-03) -
#3000
4a1af3bThanks @veryayskiy! - Render markdown in support product (2026-02-03)
Patch Changes
1.336.2
Patch Changes
-
#2985
2ed9623Thanks @adboio! - support custom banner container for product tours (2026-01-29) -
#2991
2b32a60Thanks @lricoy! - treat undefined and null the same when receiving config (2026-01-29) -
#2973
c1aa45cThanks @lricoy! - make attribution opt-in by default to reduce memory usage (2026-01-29) -
Updated dependencies []:
- @posthog/types@1.336.2
1.336.0
Minor Changes
- #2954
228930aThanks @dustinbyrne! - feat: AddgetFeatureFlagResultmethod (2026-01-28)
Patch Changes
- Updated dependencies [
228930a]:- @posthog/types@1.336.0
1.334.0
Minor Changes
- #2802
f8c17bcThanks @pauldambra! - feat: add external_scripts_inject_target config to control script injection location (2026-01-22)
Patch Changes
-
#2950
8543f0fThanks @fuziontech! - fix(web-vitals): reduce memory leak in SPAs- Upgrade web-vitals from v4.2.4 to v5.1.0 (includes internal memory fixes from v5.0.3)
- Remove duplicate observer creation on URL change
Note: web-vitals has inherent memory accumulation in SPAs due to internal state. The v5 upgrade reduces this but doesn't fully eliminate it since web-vitals doesn't provide cleanup functions (Issue #629 was closed as "not planned"). (2026-01-22)
-
Updated dependencies []:
- @posthog/types@1.334.0
1.333.0
Minor Changes
- #2942
994206dThanks @veryayskiy! - Send context on sendMessage (2026-01-21)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.333.0
1.331.2
Patch Changes
- #2939
6442f5dThanks @dustinbyrne! - fix: Rate limiting configuration changes are respected (2026-01-20) - Updated dependencies []:
- @posthog/types@1.331.2
1.331.0
Minor Changes
-
#2900
23770e9Thanks @dmarticus! - RenamedevaluationEnvironmentstoevaluationContextsfor clearer semantics. The term "contexts" better reflects that this feature is for specifying evaluation contexts (e.g., "web", "mobile", "checkout") rather than deployment environments (e.g., "staging", "production").Deprecated
posthog.initoptionevaluationEnvironmentsis now deprecated in favor ofevaluationContexts. The old property will continue to work and will log a deprecation warning. It will be removed in a future major version.
Migration Guide
// Before posthog.init('<ph_project_api_key>', { evaluationEnvironments: ['production', 'web', 'checkout'], }) // After posthog.init('<ph_project_api_key>', { evaluationContexts: ['production', 'web', 'checkout'], }) ``` (2026-01-19)
Patch Changes
- Updated dependencies [
23770e9]:- @posthog/core@1.11.0
- @posthog/types@1.331.0
1.330.0
Minor Changes
- #2929
6695383Thanks @veryayskiy! - Add more context to a ticket when created (2026-01-19)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.330.0
1.329.0
Minor Changes
- #2927
da78b8cThanks @veryayskiy! - Remove loading state in support product (2026-01-19)
Patch Changes
- #2926
3676972Thanks @pawel-cebula! - Fix TypeError when logging objects with null/undefined property values in flattenObject (2026-01-19) - Updated dependencies []:
- @posthog/types@1.329.0
1.328.0
Minor Changes
- #2925
ce4566dThanks @TueHaulund! - Restore fetch wrappers to most recent working version (2026-01-17)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.328.0
1.327.0
Minor Changes
- #2923
b8b7f90Thanks @TueHaulund! - Fixed issue with fetch wrappers reconsuming request bodies and generating mismatched FormData boundaries (2026-01-17)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.327.0
1.325.0
Minor Changes
- #2913
262cb4bThanks @TueHaulund! - Ensure we always pass RequestInit object to wrapped fetch (2026-01-16)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.325.0
1.323.0
Minor Changes
- #2902
584657aThanks @TueHaulund! - Ensure wrapped fetch() passes duplex option when required (2026-01-15)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.323.0
1.322.0
Minor Changes
- #2904
b9fb2e2Thanks @veryayskiy! - Fix the issue with _currentTicketId (2026-01-15)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.322.0
1.320.0
Minor Changes
- #2875
7662025Thanks @lucasheriques! - chore(deps): bump preact from 10.19.3 to 10.28.0 to fix security vulnerability (2026-01-13)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.320.0
1.319.2
Patch Changes
- #2864
f64ebefThanks @rafaeelaudibert! - We were missing some public definitions inside@posthog/typesso let's fix them here. We've also fixed the typing inside theloadedcallback (2026-01-13) - Updated dependencies [
f64ebef]:- @posthog/types@1.319.2
1.319.0
Minor Changes
Patch Changes
- #2873
ec5b64bThanks @pauldambra! - fix: use property based testing to expose another edge case bug in checkAndGetSessionAndWindowId (2026-01-12) - Updated dependencies []:
- @posthog/types@1.319.0
1.318.2
Patch Changes
- #2871
4f73495Thanks @pauldambra! - fix: detecting activity timestamp should not compare null to numbers (2026-01-12) - Updated dependencies []:
- @posthog/types@1.318.2
1.316.1
Patch Changes
-
#2846
5ce7252Thanks @ordehi! - Fix survey URL prefill to respect branching/skip logicWhen using URL parameters to prefill survey responses (e.g.,
?q0=9), the SDK now correctly respects the survey's branching configuration. Previously, prefilled answers would always advance to the next sequential question, ignoring any skip logic. (2026-01-09) -
Updated dependencies []:
- @posthog/types@1.316.1
1.316.0
Minor Changes
- #2851
d4bf005Thanks @veryayskiy! - Expose Conversations API Methods for Custom UI (2026-01-08)
Patch Changes
- #2856
c1ed63bThanks @marandaneto! - chore: expose default stack parser creator (2026-01-08) - Updated dependencies [
fba9fb2,c1ed63b]:- @posthog/core@1.9.1
- @posthog/types@1.316.0
1.315.0
Minor Changes
-
#2849
8ddf472Thanks @veryayskiy! - separate enable conversation with enable conversations widget (2026-01-06) -
#2839
83b03feThanks @rafaeelaudibert! - Release new @posthog/types library to make it easy for those using the script version ofposthog-jsto properly typewindow.posthog(2026-01-06)
Patch Changes
- Updated dependencies [
83b03fe]:- @posthog/types@1.315.0
1.313.0
Minor Changes
- #2832
f050f6cThanks @rafaeelaudibert! - Introduce custom cookie properties for localStorage+cookie persistence using the newcookie_persisted_propertiesproperty. This allows people to opt-in to store properties in cookies even inlocalstorage+cookiesmode (2026-01-01)
1.312.0
Minor Changes
-
#2834
548b466Thanks @ordehi! - fix: ClearPageViewManagerstate on session rotation to prevent cross-session duration pollutionWhen a browser tab is backgrounded and the session rotates (30 min idle or 24 hour max),
PageViewManagernow clears its state. This prevents$prev_pageview_durationfrom spanning session boundaries, which was causing impossibly large values (94+ hours observed) in web analytics "Average Time on Page" metrics.Users who implemented workarounds for inflated
$prev_pageview_durationvalues (e.g., capping at 30 minutes) may want to review those after upgrading, as the root cause is now fixed. (2025-12-31)
1.311.0
Minor Changes
-
#2813
4b7443cThanks @ordehi! - feat(flags): add updateFlags() method for injecting flags without network requestAdds
posthog.updateFlags(flags, payloads?, options?)to inject feature flag values from an external source (e.g., server-side evaluation, edge middleware) without making a network request. Supports{ merge: true }option to merge with existing flags instead of replacing. (2025-12-29)
1.310.2
Patch Changes
-
#2812
ad42eaeThanks @lucasheriques! - fix(surveys): queue callbacks when fetch is in progress instead of returning error (2025-12-29) -
#2814
3da6a4cThanks @jurajmajerik! - Persist $device_id to cookies so it survives localStorage clears (2025-12-29)
1.310.0
Minor Changes
-
#2770
6851061Thanks @daibhin! - feat: allow exception autocapture to be programatically enabled / disabled (2025-12-22) -
#2792
f7372c8Thanks @adboio! - add event/action triggers for product tours (2025-12-22) -
#2790
96f42beThanks @adboio! - fix: hosted survey auto-submit behavior only submits skipped questions (2025-12-22) -
#2786
2c54d15Thanks @adboio! - emit new "survey abandoned" event on pageleave (2025-12-22) -
#2787
b676b4dThanks @lucasheriques! - feat: allow customizing text colors on web and react native (2025-12-22)
Patch Changes
- Updated dependencies [
b676b4d]:- @posthog/core@1.9.0
1.306.2
Patch Changes
- #2730
79184bdThanks @ablaszkiewicz! - include synthetic exception in console.error capture (2025-12-15)
1.301.2
Patch Changes
-
#2690
e9c00fdThanks @robbie-c! - Related to https://www.wiz.io/blog/critical-vulnerability-in-react-cve-2025-55182We didn't include any of the vulnerable deps in any of our packages, however we did have them as dev / test / example project dependencies.
There was no way that any of these vulnerable packages were included in any of our published packages.
We've now patched out those dependencies.
Out of an abundance of caution, let's create a new release of all of our packages. (2025-12-04)
-
Updated dependencies [
e9c00fd]:- @posthog/core@1.7.1
1.301.1
Patch Changes
- #2666
2004d36Thanks @pauldambra! - fix: session id rotation relied on in-memory cache which would be stale after log idle periods - particularly with multiple windows in play (2025-12-04)
1.300.0
Minor Changes
- #2603
e1617d9Thanks @dmarticus! - add $feature_flag_evaluated_at properties to $feature_flag_called events (2025-12-03)
Patch Changes
-
#2670
4487d6bThanks @pauldambra! - A click while holding a modifier key (CTRL, ALT, CMD, Windows) shouldn't ever count as a dead click - so that we don't pick up e.g. open in a new tab as a dead click (2025-12-03) -
#2677
0e67750Thanks @lucasheriques! - chore: allow customizing text input and background for surveys (2025-12-03) -
Updated dependencies [
e1617d9]:- @posthog/core@1.7.0
1.299.0
Minor Changes
-
#2641
f9c4dbaThanks @adboio! - add survey cancellation events (2025-12-01) -
#2642
37e4f76Thanks @rafaeelaudibert! - Add newpayloadentry to theEarlyAccessFeaturetype (2025-12-01) -
#2661
aaad806Thanks @adboio! - add support for surveys triggered by actions with event property filters (2025-12-01)
Patch Changes
- #2582
21365ffThanks @pauldambra! - fix: properly cleanup in network plugin (2025-12-01)
1.298.1
Patch Changes
- #2592
7782dd9Thanks @marandaneto! - fix: session replay on react native web (2025-11-24)
1.298.0
Minor Changes
- #2619
86dab38Thanks @hpouillot! - package deprecation (2025-11-24)
Patch Changes
- Updated dependencies [
86dab38]:- @posthog/core@1.6.0
1.297.0
Minor Changes
- #2578
91f41eeThanks @rafaeelaudibert! - Output confirmation log message to the user when overriding feature flags to improve user feedback on whether the action actually did something or not (2025-11-19)
Patch Changes
- #2575
8acd88fThanks @hpouillot! - fix frame platform property for $exception events (2025-11-19) - Updated dependencies [
8acd88f]:- @posthog/core@1.5.3
1.296.1
Patch Changes
- #2590
ab85422Thanks @pauldambra! - fix: don't rely on order of method calls to gate calling url
1.293.0
Minor Changes
- #2565
f2426dbThanks @pauldambra! - feat: ignore rageclicks by content.
Patch Changes
- #2570
de80a41Thanks @pauldambra! - fix: rageclick detection should use event timestamp not current time
1.292.0
Minor Changes
- #2519
7c16ff7Thanks @rodrigomarcolin! - Made rageclick detection fully parametrizable with configurable threshold_px, timeout_ms, and click_count, while preserving previous default behavior.
1.291.0
Minor Changes
- #2557
c8c7de2Thanks @pauldambra! - feat: support strict minimum duration (more accurate on full page load)
1.290.0
Minor Changes
- #2553
8a2b790Thanks @pauldambra! - feat: yield to the main thread during posthog init
1.289.0
Minor Changes
- #2551
10be1b0Thanks @dmarticus! - Support bootstrapping feature flags during SSR in ReactJS
1.286.0
Minor Changes
- #2547
cd8bcd7Thanks @TueHaulund! - Fixed a bug where configuration overrides for session recording would not be applied if the recorder module was still loading
1.285.1
Patch Changes
- #2545
c26a12cThanks @pauldambra! - fix: allow session ending payload when recording is idle
1.285.0
Minor Changes
- #2503
e95a9d5Thanks @pauldambra! - feat: store previous and next session id in session recording
1.284.0
Minor Changes
-
#2529
882d823Thanks @MattBro! - feat(surveys): add URL prefill and auto-submit supportSurveys can now be prefilled and automatically submitted via URL parameters.
New configuration options:
posthog.init('token', { surveys: { prefillFromUrl: true, autoSubmitIfComplete: true, autoSubmitDelay: 800, }, })URL format:
?q0=1&q1=8&auto_submit=trueq{N}= question index (0-based)- Value = choice index or rating value
auto_submit=trueenables auto-submission
Supported question types:
- Single choice (choice index)
- Multiple choice (multiple q{N} params)
- Rating (numeric value, validated against scale)
Use cases:
- Pre-filled NPS surveys from email campaigns
- One-click survey responses from notifications
- SMS surveys with embedded feedback
- QR code surveys at events
1.282.0
Minor Changes
- #2517
46e3ca6Thanks @pauldambra! - feat: add a component that will wrap your components and capture an event when they are in view in the browser
Patch Changes
- #2517
46e3ca6Thanks @pauldambra! - fix: complete react sdk featureflag component refactor
1.281.0
Minor Changes
- #2502
751b440Thanks @pauldambra! - fix: bucketed rate limiter can calculate tokens without a timer
Patch Changes
-
#2500
71ae0d2Thanks @pauldambra! - fix: don't poll surveys while the page is hidden -
Updated dependencies [
751b440]:- @posthog/core@1.4.0
1.280.1
Patch Changes
-
#2492
2b13291Thanks @pauldambra! - fix: extendUrlParams should always replace unless the caller says otherwise -
#2491
130c9e0Thanks @pauldambra! - fix: correctly update the retry count URL parameter -
#2485
d7dced1Thanks @pauldambra! - fix: stop polling when the retry queue is empty
1.279.3
Patch Changes
1.279.1
Patch Changes
- #2469
b161bb3Thanks @pauldambra! - fix: stop heatmap buffer interval when hidden
1.279.0
Minor Changes
- #2463
3075888Thanks @pauldambra! - fix: remove rrweb types as a peer dependency
1.276.0
Minor Changes
- #2444
d50899eThanks @pauldambra! - chore: bump posthog rrweb version - not generally used yet
1.275.2
Patch Changes
-
#2431
7d45a7aThanks @marandaneto! - fix: remove deprecated attribute $exception_personURL from exception events -
Updated dependencies [
daf919b,7d45a7a]:- @posthog/core@1.3.0
1.275.1
Patch Changes
- #2422
4e15fdaThanks @pauldambra! - fix: possible memory leak in session id replacement in cookieless mode
1.275.0
Minor Changes
- #2426
ae941c2Thanks @thmsobrmlr! - Apply $current_url masking in web vitals and heatmaps extensions.
1.274.3
Patch Changes
- #2423
2d4eac4Thanks @pauldambra! - fix: another small potential memory leak in the recorder wrapping code"
1.274.2
Patch Changes
- #2421
43b8029Thanks @pauldambra! - fix: potential source of memory leak in recorder mutation throttler
1.274.0
Minor Changes
- #2404
39ace01Thanks @pauldambra! - feat: remove eager loaded replay and reduce bundle size by 14.8%
Patch Changes
- Updated dependencies [
e19a384]:- @posthog/core@1.2.3
1.273.1
Patch Changes
- #2412
25a8846Thanks @pauldambra! - fix: rely on 'state' less when reporting replay status
1.273.0
Minor Changes
- #2408
66b12f8Thanks @thmsobrmlr! - Fixes an issue where the event queue was not started until a page reload after callingopt_in_capturing()
1.272.1
Patch Changes
- #2395
4a39a10Thanks @pauldambra! - fix: increase max depth for app state diffing
1.272.0
Minor Changes
- #2405
cdfbd6dThanks @pauldambra! - fix: session recording config can be false, correct the types
1.271.0
Minor Changes
- #2385
7373238Thanks @pauldambra! - feat: switch replay to lazy loaded by default"
1.270.1
Patch Changes
- #2390
244b3adThanks @hpouillot! - fix react sourcemaps - revert: #2390 to fix persistence bug with surveys
1.270.0
Minor Changes
- #2355
9eccbabThanks @lucasheriques! - fix: use persistence for surveys if localStorage usage is enabled
Patch Changes
- #2396
13c6667Thanks @pauldambra! - fix: no need to estimate the size of all rrweb events before compressing some of them
1.269.1
Patch Changes
- #2393
a3b64e6Thanks @pauldambra! - chore: variable rename so i can trigger a releas
1.269.0
Minor Changes
- #2369
2a6ea65Thanks @dmarticus! - This PR implements support for evaluation environments in the posthog-js SDK, allowing users to specify which environment tags their SDK instance should use when evaluating feature flags.
1.268.9
Patch Changes
-
#2378
b920bacThanks @pauldambra! - fix: don't mangle to $ in no external or es5 builds -
#2376
b5eb605Thanks @pauldambra! - fix: rotating buffer while trigger pending
1.268.6
Patch Changes
- #2368
2102ee4Thanks @pauldambra! - fix: recorder behaviour when idle session is force terminated then restarted
1.268.5
Patch Changes
- #2362
8b570b8Thanks @pauldambra! - fix: over eager rename left a couple of old versions trying to call onRemoteConfig that doesn't exist
1.268.1
Patch Changes
- #2315
fd2c51dThanks @pauldambra! - fix: lazy loaded replay relies on remote config having been persisted in storage to avoid race with config on restart
1.268.0
Minor Changes
- #2345
4f37e77Thanks @lucasheriques! - feat: surveys matching on event properties
1.267.0
Minor Changes
- #2347
5d13bedThanks @pauldambra! - feat: allow ignoring rageclicks on elements by css selector
1.266.1
Patch Changes
-
#2330
da07e41Thanks @hpouillot! - use error tracking processing from core -
Updated dependencies [
da07e41]:- @posthog/core@1.1.0
1.266.0
Minor Changes
- #2321
b81e152Thanks @pauldambra! - feat: expose rrweb custom events on the public interface of the recorder. not intended for arbitrary public use but useful for internal purposes
1.265.0
Minor Changes
- #2032
822d8dfThanks @lucasheriques! - feat: allow display surveys popups on demand
1.263.0
Minor Changes
- #2294
5137440Thanks @pauldambra! - feat: add a redux logging middleware to posthog-js
1.262.1
Patch Changes
- #2309
28223c1Thanks @pauldambra! - fix: default to eager loading replay while investigating trigger bug reports
1.262.0
Minor Changes
- #2296
f9fe3baThanks @pauldambra! - feat: switch replay default to lazy loading
1.261.8
Patch Changes
- #2276
97961e4Thanks @dustinbyrne! -isFeatureEnablednow returnsundefined(instead offalse) for missing or disabled feature flags, aligning with the documentation. Previously,undefinedwas returned only before flags had loaded, and missing/disabled flags returnedfalse. This change clarifies the difference between flags that exist but don't match (false) and flags that don’t exist or are disabled (undefined).
1.261.7
Patch Changes
- #2284
bdfe450Thanks @pauldambra! - fix: order of operations when replay does pageview fallback
1.261.5
Patch Changes
- #2270
980f5c4Thanks @lucasheriques! - fix: hosted surveys should ignore any delays
1.261.4
Patch Changes
- #2268
999c63fThanks @pauldambra! - fix: session recorder wrapper had private field that should be public"
1.261.3
Patch Changes
- #2267
f2ac956Thanks @pauldambra! - feat: allow testing of the new lazy loaded session recorder
1.261.2
Patch Changes
-
#2266
9470d97Thanks @pauldambra! - fix: don't mangle variables to `# posthog-js -
#2265
2487d12Thanks @pauldambra! - chore: update to latest rollup and terser
1.261.1
Patch Changes
- #2263
41d3890Thanks @pauldambra! - chore: add unused lazy loaded session recorder to prime CDN
1.260.2
Patch Changes
- #2236
f3269f3Thanks @lucasheriques! - fix: set survey person properties on SDK <1.249.2
1.260.1
Patch Changes
- #2215
1e95d47Thanks @lucasheriques! - fix: always set surveySeen on local storage for old posthog-js versions
1.258.5
Patch Changes
- #2178
db569faThanks @lucasheriques! - - Fix surveys loading with advanced_enable_surveys config
1.258.4
Patch Changes
- #2172
ac254d9Thanks @lucasheriques! - Adds a new config,advanced_enable_surveys, to always enable surveys funcionality in the SDK
1.258.3
Patch Changes
-
#2171
14adc01Thanks @lucasheriques! - Fix early access features accumulation in persistence -
#2170
262cc5cThanks @lucasheriques! - Removes the_renderExternalSurveymethod which is not needed anymore
1.258.2
Patch Changes
- #2111
7114593Thanks @pauldambra! - checks for session activity in other windows when timing out in any particular window, avoids a race condition when proactively marking a session as idle
1.258.1
Patch Changes
- #2120
c7b03cdThanks @lucasheriques! - Updates the renderSurvey and getActiveMatchingSurveys methods to not take any external surveys into consideration