NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3291 most downloaded on npm
Last release today
17 Sep 2026
Ships on a steady schedule
a new release about every 8 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
204 releases · first in 2025
One column per month.
Updated dependencies [`dc2aa5b`]:
dc2aa5b Thanks @posthog! - Normalize the error tracking rate-limiter config to first-class options. The browser SDK now reads exceptionRateLimiterRefillRate / exceptionRateLimiterBucketSize on error_tracking, with the previous double-underscore __exceptionRateLimiterRefillRate / __exceptionRateLimiterBucketSize options deprecated but still honoured as a fallback. The option shape (ExceptionRateLimiterConfig) and default-resolution logic (resolveExceptionRateLimiterConfig) now live in @posthog/core and are shared between the browser and Node SDKs.
(2026-07-14)dc2aa5b]:
## 1.40.2 ### Patch Changes - #4105 `203284a` Thanks @eli-r-ph! - Extract the /batch/ submission out of _flush() and sendImmediate() into a single ove
203284a Thanks @eli-r-ph! - Extract the /batch/ submission out of _flush() and sendImmediate() into a single overridable protected sendBatch() seam on PostHogCoreStateless, and widen requestTimeout/historicalMigration to protected. Add an overridable queue-route seam (getQueueRouteKey, persistedQueueKeyForRoute, getActiveQueueRoutes) so a subclass can partition events across independent queues that batch, flush, retry, and persist separately, plus an AiQueue persisted-property key and a route argument on sendBatch. This is an internal, behavior-preserving refactor — with the default single route the enqueue/flush/shutdown/reset paths are byte-identical (v0 request shape, retry, 413 handling, and error surfacing unchanged), so browser and React Native are unaffected. Groundwork for opt-in Capture V1 support in posthog-node, where $ai_* events stay on the legacy transport isolated from the V1 route.
(2026-07-11)## 1.40.1 ### Patch Changes - #4121 `e6b5ab2` Thanks @dustinbyrne! - Prevent shutdown from looping forever when a flush makes no queue progress. (2026
#4121 e6b5ab2 Thanks @dustinbyrne! - Prevent shutdown from looping forever when a flush makes no queue progress.
(2026-07-09)
#4120 d0e531a Thanks @dustinbyrne! - Coalesce concurrent flush requests to avoid chaining redundant flushes while offline.
(2026-07-09)
A statsd-style pre-aggregating metrics client for the PostHog Metrics product (alpha). Samples are folded into per-series aggregates in memory (counts
#4115 86bb3a5 Thanks @DanielVisca! - add the posthog.metrics API (count, gauge, histogram) — alpha
A statsd-style pre-aggregating metrics client for the PostHog Metrics product (alpha). Samples are folded into per-series aggregates in memory (counts sum, gauges keep the last value, histograms accumulate buckets) and flushed periodically as OTLP/JSON to /i/v1/metrics — one data point per series per flush window, no matter how many calls. No OpenTelemetry SDK setup required:
posthog.metrics.count('orders_created', 1)
posthog.metrics.gauge('active_connections', 42)
posthog.metrics.histogram('api_latency', 187, { unit: 'ms' })
Configure via metrics: { serviceName, environment, flushIntervalMs, maxSeriesPerFlush, beforeSend, ... }. (2026-07-08)
86bb3a5]:
## 1.39.6 ### Patch Changes - #4059 `532f2c3` Thanks @jiuyige! - Add per-call sendEvent option support to React Native feature flag helpers. (2026-07-
## 1.39.5 ### Patch Changes - #4048 `5e7e132` Thanks @turnipdabeets! - fix: feature-flag properties ($feature/* and $active_feature_flags) passed expl
5e7e132 Thanks @turnipdabeets! - fix: feature-flag properties ($feature/* and $active_feature_flags) passed explicitly to capture() now take precedence over the SDK's cached flag values, matching posthog-js (web) and posthog-android
(2026-07-02)## 1.39.4 ### Patch Changes - #4055 `64e04ba` Thanks @marandaneto! - Retry /flags requests that receive HTTP 502 or 504 responses across SDKs that use
64e04ba Thanks @marandaneto! - Retry /flags requests that receive HTTP 502 or 504 responses across SDKs that use the shared core flags client.
(2026-07-02)## 1.39.3 ### Patch Changes - #4028 `a664b81` Thanks @marandaneto! - Make Node flush() wait for pending asynchronous SDK work before draining the even
a664b81 Thanks @marandaneto! - Make Node flush() wait for pending asynchronous SDK work before draining the event queue, so events produced by helpers like captureException() are not missed. Pending work rejections no longer prevent queued events from flushing.
(2026-07-01)### Patch Changes - #4027 `ab118d2` Thanks @marandaneto! - Safely serialize event batches with circular property references instead of crashing during
ab118d2 Thanks @marandaneto! - Safely serialize event batches with circular property references instead of crashing during flush.
(2026-06-30)### Patch Changes - #3998 `0c95bce` Thanks @marandaneto! - Retry capture and logs requests on transient HTTP errors such as 408, 429, and 5xx while co
0c95bce Thanks @marandaneto! - Retry capture and logs requests on transient HTTP errors such as 408, 429, and 5xx while continuing to avoid retries for non-retryable 4xx responses.
(2026-06-30)### Minor Changes - #4006 `0063128` Thanks @github-actions! - Add groupIdentifyImmediate() to await the network request when identifying a group, mirr
0063128 Thanks @github-actions! - Add groupIdentifyImmediate() to await the network request when identifying a group, mirroring captureImmediate/identifyImmediate/aliasImmediate. Useful in edge/serverless environments where the background queue may not flush. The Convex integration now uses it directly instead of routing $groupidentify through captureImmediate.
(2026-06-30)### Patch Changes - #3961 `619a25c` Thanks @marandaneto! - Retry feature flag requests after transient network errors only. The feature flag request r
619a25c Thanks @marandaneto! - Retry feature flag requests after transient network errors only. The feature flag request retry count defaults to 1 and can be set to 0 to disable retries.
(2026-06-29)### Minor Changes - #3977 `6200888` Thanks @turnipdabeets! - Add getAllFeatureFlags(), which returns all currently loaded feature flags as structured
6200888 Thanks @turnipdabeets! - Add getAllFeatureFlags(), which returns all currently loaded feature flags as structured FeatureFlagResults (key, enabled, variant, payload). It is a synchronous read of the cached flags and does not send a $feature_flag_called event.
(2026-06-26)### Patch Changes - #3955 `8e9689a` Thanks @marandaneto! - Dedupe feature flag called events per returned flag value. (2026-06-24)
8e9689a Thanks @marandaneto! - Dedupe feature flag called events per returned flag value.
(2026-06-24)### Patch Changes - #3942 `c9c8925` Thanks @hpouillot! - Fix browser console log capture when session activity timestamps are missing and refresh sess
c9c8925 Thanks @hpouillot! - Fix browser console log capture when session activity timestamps are missing and refresh session attributes for each log.
(2026-06-24)### Patch Changes - #3932 `bf6947d` Thanks @ioannisj! - Support session replay event triggers in React Native. Recording stays paused until the client
bf6947d Thanks @ioannisj! - Support session replay event triggers in React Native. Recording stays paused until the client captures an event whose name matches a server-configured sessionRecording.eventTriggers entry, then records for the rest of that session; it re-arms on session rotation and AND-combines with the linked-flag gate. Requires @posthog/react-native-plugin >= 2.1.1 (which pins the native SDKs that defer event-trigger gating to the JS layer).
(2026-06-23)### Minor Changes - #3879 `440e370` Thanks @ioannisj! - Deprecate disableRemoteConfig. Remote config is now always loaded and the option is a no-op. I
If you only want to capture some hashes, leave hash capture enabled and use before_send to remove or redact sensitive hash values before events are se
#3921 c28b161 Thanks @marandaneto! - Add disable_capture_url_hashes to strip URL fragments from automatically captured URLs. It is disabled by default for backwards compatibility, and enabled automatically when config.defaults is '2026-06-25' or later. Enabling it (either explicitly or via the '2026-06-25' defaults) is a breaking behavior change for SPAs that rely on URL hashes for routing or analytics, because hash-based routes will be collapsed to the same URL without the fragment in fields such as $current_url, $initial_current_url, $session_entry_url, autocapture $elements[*].attr__href, $external_click_url, replay href URLs, heatmaps, web vitals $current_url, logs url.full, conversations current_url/request_url, or Next.js Pages Router $pageview $current_url.
If you only want to capture some hashes, leave hash capture enabled and use before_send to remove or redact sensitive hash values before events are sent. (2026-06-23)
c28b161]:
the bundled OpenTelemetry dependencies are removed, shrinking the lazily-loaded logs chunk
#3895 ce528ed Thanks @turnipdabeets! - Console log auto-capture (logs: { captureConsoleLogs: true }) now flows through the same pipeline as posthog.captureLog(), posthog.logger.*, and PostHog's other SDKs, instead of OpenTelemetry. As a result:
logs.beforeSend (the same hook as captureLog/logger.*), so you can redact or drop sensitive console output before it's sent. To treat console logs differently from manual logs, branch on the record's log.source attribute: auto-captured console logs set it to console.<method> (e.g. console.error), while manual captureLog/logger.* logs leave it unsetposthogDistinctId, the attribute PostHog uses to associate logs with a person (docs). The old path used distinct_id, which isn't used for person linking by default, so console logs previously didn't appear on person profiles unless you'd configured a custom key.Console logs keep their posthog-browser-logs service.name, their console instrumentation scope, and their log.source: console.<level> attribute.
As part of moving onto the shared pipeline, console records now use PostHog's standard log field names — the same ones programmatic web logs and other SDKs use, and the ones the Logs UI surfaces. For the fields below the values are unchanged — only the attribute names/locations differ:
distinct_id → posthogDistinctId (record attribute)location.href → url.full (record attribute; same value — the page URL)session.id (resource attribute) → sessionId (record attribute) — renamed and movedhost and window.id move from resource attributes to record attributes (names unchanged)feature_flagsFor most projects this needs no action — these are already the canonical log fields. The only thing to update is a saved Logs query or dashboard built specifically on an old console attribute name, for example:
attributes.distinct_id → attributes.posthogDistinctIdattributes.location.href → attributes.url.fullresource.attributes.session.id → attributes.sessionIdresource.attributes.host / resource.attributes.window.id → attributes.host / attributes.window.id (2026-06-22)Updated dependencies [`6b21f77`]:
6b21f77 Thanks @marandaneto! - Validate custom event UUID overrides and generate new UUIDs when invalid.
(2026-06-19)6b21f77]:
### Patch Changes - #3886 `e6d7fe2` Thanks @marandaneto! - Stop sending deprecated no-op top-level type, library, and library_version fields in event
e6d7fe2 Thanks @marandaneto! - Stop sending deprecated no-op top-level type, library, and library_version fields in event batch payloads. Use properties.$lib and properties.$lib_version for SDK metadata; legacy queued library and library_version values are used as fallbacks when the official $ properties are missing.
(2026-06-18)### Patch Changes - #3876 `d7b1a03` Thanks @turnipdabeets! - Deprecate getFeatureFlagPayload in favor of getFeatureFlagResult, which returns the flag
d7b1a03 Thanks @turnipdabeets! - Deprecate getFeatureFlagPayload in favor of getFeatureFlagResult, which returns the flag value and payload from a single evaluation. getFeatureFlagPayload continues to work.
(2026-06-17)Updated dependencies [`b469830`]:
b469830 Thanks @turnipdabeets! - The browser's programmatic logs API (posthog.captureLog() / posthog.logger.*) now runs through the shared @posthog/core logs pipeline that React Native already uses — no change to the public API or existing behavior. Log delivery is more resilient as a result: oversized batches are split automatically, failed sends retry with exponential backoff, and delivery resumes when the browser comes back online.
(2026-06-17)b469830]:
With disableRemoteFeatureFlags: true, the SDK no longer fetches or evaluates feature flags from PostHog — identify(), group(), and reset() stop trigge
#3848 bd07ec4 Thanks @turnipdabeets! - Add a disableRemoteFeatureFlags option and a public updateFlags(flags, payloads?, { merge }) method, for apps that evaluate feature flags outside the SDK (for example on their own backend) and want to supply the results at runtime instead of having the SDK fetch them.
With disableRemoteFeatureFlags: true, the SDK no longer fetches or evaluates feature flags from PostHog — identify(), group(), and reset() stop triggering /flags requests — while getFeatureFlag() and getFeatureFlagPayload() keep working against the values you supply. Provide those values (with optional payloads) at runtime via updateFlags(flags, payloads?, { merge }); they persist across restarts. This mirrors the web SDK's advanced_disable_feature_flags and updateFlags. (2026-06-17)
Updated dependencies [`c9c7df1`, `c6c163a`]:
### Patch Changes - #3828 `8464c92` Thanks @turnipdabeets! - fix: persist the session replay config from a /flags response before emitting the feature
8464c92 Thanks @turnipdabeets! - fix: persist the session replay config from a /flags response before emitting the featureflags event, so listeners (e.g. React Native session replay linked-flag re-evaluation) read a recording config consistent with the new flag values. This only reorders two adjacent synchronous writes in the stateful core client (used by posthog-react-native and @posthog/web); the event payload is unchanged, and posthog-node and the browser posthog-js package do not use this code path.
(2026-06-15)Updated dependencies [`29bf8e3`]:
29bf8e3 Thanks @marandaneto! - Add missing bugs metadata to package manifests.
(2026-06-15)29bf8e3]:
Updated dependencies [`dbf2377`]:
dbf2377]:
### Patch Changes - #3799 `25822ac` Thanks @turnipdabeets! - fix(logs): when a logs beforeSend hook throws, log the error and drop the record (fail cl
25822ac Thanks @turnipdabeets! - fix(logs): when a logs beforeSend hook throws, log the error and drop the record (fail closed) instead of continuing the chain and enqueuing it — a buggy redaction hook must not leak an unredacted log record.
(2026-06-11)### Patch Changes - Updated dependencies []: - @posthog/types@1.386.1
Renders a "Back" button on web surveys after the first question. Default is off — existing surveys are unchanged. Uses a visited-index history stack s
#3634 612f97a Thanks @lucasheriques! - feat(surveys): add opt-in appearance.allowGoBack for multi-question surveys, and make button labels translatable
Renders a "Back" button on web surveys after the first question. Default is off — existing surveys are unchanged. Uses a visited-index history stack so back-navigation respects branching paths (response_based, specific_question), and abandoned-branch responses are pruned before submission so analytics aren't polluted. Returning to a question pre-fills the prior answer. appearance.backButtonText overrides the default label. The button uses the survey's text color so it stays readable on any background, and it also shows in survey previews.
Also adds submitButtonText and backButtonText to survey-level translations, so both the submit and back button labels can be localized via appearance translations (previously only the per-question button text was translatable). (2026-06-10)
Updated dependencies [`c11794d`, `f601c49`]:
Updated dependencies [`2d21ada`]:
2d21ada]:
Updated dependencies [`d9462b3`]:
d9462b3]:
### Patch Changes - Updated dependencies []: - @posthog/types@1.384.1
Note: $browser_version for Google Search App is not comparable across platforms — iOS yields a version like 284.0 (from GSA/284.0.564099828) while And
#3782 0c2acb9 Thanks @pauldambra! - Detect the Google Search App (GSA) as its own $browser value (Google Search App) via the cross-platform GSA/ UA marker, instead of reporting the embedded webview as Mobile Safari (iOS) or Chrome (Android). Gated behind the new detect_google_search_app config option, which the 2026-05-30 config defaults opt into automatically — left off otherwise to keep existing browser attribution backwards-compatible.
Note: $browser_version for Google Search App is not comparable across platforms — iOS yields a version like 284.0 (from GSA/284.0.564099828) while Android yields a version like 14.21 (from GSA/14.21.20.28.arm64), since Google maintains separate versioning schemes for the two apps. Avoid building cross-platform version dashboards on $browser_version for this browser. (2026-06-10)
0c2acb9]:
Updated dependencies [`783ba46`]:
783ba46]:
### Patch Changes - Updated dependencies []: - @posthog/types@1.383.2
### Patch Changes - Updated dependencies []: - @posthog/types@1.383.1
Updated dependencies [`227c9b0`, `393f9e2`]:
### Patch Changes - Updated dependencies []: - @posthog/types@1.382.0
Updated dependencies [`a7bd828`]:
a7bd828]:
### Patch Changes - Updated dependencies []: - @posthog/types@1.380.1
Updated dependencies [`2387084`]:
2387084]:
### Patch Changes - Updated dependencies []: - @posthog/types@1.379.3
### Patch Changes - Updated dependencies []: - @posthog/types@1.379.2
### Patch Changes - Updated dependencies []: - @posthog/types@1.379.1
### Patch Changes - Updated dependencies []: - @posthog/types@1.379.0
### Patch Changes - Updated dependencies []: - @posthog/types@1.378.1
Updated dependencies [`8181354`]:
8181354]:
detectBrowser / detectBrowserVersion now accept an optional third argument, BrowserDetectionHints, with a brave flag (set when navigator.brave exists)
#3708 3d4a76f Thanks @pauldambra! - Detect Brave (desktop, Android, iOS), Vivaldi, Yandex, Naver Whale, DuckDuckGo, Pale Moon, and Waterfox so users on these browsers no longer get bucketed as Chrome or Firefox.
detectBrowser / detectBrowserVersion now accept an optional third argument, BrowserDetectionHints, with a brave flag (set when navigator.brave exists). The browser SDK populates this automatically to catch desktop / Android Brave, which is Chromium-based and carries no UA marker. Brave on iOS is picked up purely from the Brave/ UA marker — WebKit doesn't ship navigator.brave. The original two-argument signature still works for non-DOM callers. (2026-06-01)
### Patch Changes - Updated dependencies []: - @posthog/types@1.376.6
### Patch Changes - #3694 `d9ad199` Thanks @gustavohstrassburger! - fix(react-native): preserve non-string property types (booleans, arrays, numbers,
d9ad199 Thanks @gustavohstrassburger! - fix(react-native): preserve non-string property types (booleans, arrays, numbers, objects) when caching person and group properties for feature flag evaluation. Previously these were force-coerced to strings via String(value), causing flag conditions using boolean equality or array contains to fail on device while the PostHog UI still evaluated correctly.
(2026-05-31)### Patch Changes - #3681 `7b84b75` Thanks @ablaszkiewicz! - unify captureException in posthog core (2026-05-28) - Updated dependencies []: - @posthog
7b84b75 Thanks @ablaszkiewicz! - unify captureException in posthog core
(2026-05-28)### Patch Changes - Updated dependencies []: - @posthog/types@1.376.3
### Patch Changes - Updated dependencies []: - @posthog/types@1.376.2
### Patch Changes - #3665 `5568f12` Thanks @ioannisj! - Don't autocapture PostHog's own PostHogFetchNetworkError (raised when the device is offline) a
5568f12 Thanks @ioannisj! - Don't autocapture PostHog's own PostHogFetchNetworkError (raised when the device is offline) as a $exception. These connectivity failures are expected and were flooding error tracking with internal SDK noise. Adds an isPostHogFetchNetworkError type guard to @posthog/core so SDKs can detect these errors.
(2026-05-26)### Patch Changes - #3639 `c806cca` Thanks @marandaneto! - Use native async gzip compression for session recording events when CompressionStream is av
c806cca Thanks @marandaneto! - Use native async gzip compression for session recording events when CompressionStream is available.
(2026-05-22)Updated dependencies [`2e1d5f4`]:
2e1d5f4]:
### Patch Changes - Updated dependencies []: - @posthog/types@1.374.4
Your coding agent can read these notes before it upgrades. Set up the MCP server →