NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #3291 most downloaded on npm
Latest stable
1.67.1
Last release 12 days ago
10 Nov 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
239 releases · first in 2025
Drag across the ruler to compare, or tap a release to open it.
### Patch Changes - #4616 `7902e44` Thanks @shahidrogers! - Stop crashing when the environment's Math.random() misbehaves. The vendored UUIDv7 generat
#4616 7902e44 Thanks @shahidrogers! - Stop crashing when the environment's Math.random() misbehaves. The vendored UUIDv7 generator builds its random fields from a Math.random()-based nextUint32(), and a nonconformant implementation that returns a value of 1 or greater, or NaN, pushed those fields out of range, so fromFieldsV7 threw RangeError: invalid field value on every event captured. On React Native this is not hypothetical: Hermes implements Math.random with C++ std::uniform_real_distribution, which is documented to occasionally return its upper bound, and affected Android devices crash-looped on startup during the SDK's internal event-queue flush — a path applications cannot wrap in a try/catch. nextUint32() now clamps its result to a valid unsigned 32-bit integer (>>> 0), so a bad random value degrades UUID entropy for that id instead of taking the app down; the timestamp bits are untouched and generated ids remain spec-valid UUIDv7.
(2026-08-27)
#4651 e899b1c Thanks @marandaneto! - Treat omitted local evaluation properties as inconclusive for is_not_set.
(2026-08-27)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
### Patch Changes - #4610 `930de19` Thanks @marandaneto! - Share feature flag matching, hashing, variant, and payload evaluation helpers across the No
#4610 930de19 Thanks @marandaneto! - Share feature flag matching, hashing, variant, and payload evaluation helpers across the Node.js and Convex SDKs without changing their runtime-specific SemVer behavior.
(2026-08-25)
#4611 d4eee8f Thanks @marandaneto! - Share survey property matching between the browser and React Native SDKs while preserving their existing missing-value behavior.
(2026-08-25)
### Patch Changes - #4623 `be299df` Thanks @turnipdabeets! - Fix buffered logs being dropped instead of retried after HTTP 408, 429 or 5xx (2026-08-24
be299df Thanks @turnipdabeets! - Fix buffered logs being dropped instead of retried after HTTP 408, 429 or 5xx
(2026-08-24)### Patch Changes - #4614 `3593c43` Thanks @iamomiid! - The Node SDK now sends the raw gzip bytes as the request body instead of wrapping them in a Bl
3593c43 Thanks @iamomiid! - The Node SDK now sends the raw gzip bytes as the request body instead of wrapping them in a Blob. On Node 24.16 and later, reading a Blob request body leaks a native BlobReader that is never released, so a service calling capture() and flush() once per request grew by roughly 2.3 KB of heap per event and never gave it back. This completes the work in #4423: switching to node:zlib removed the compression-time Blob reads, but the body itself was still a Blob and still got read once per request. Compression behaviour, headers and the wire format are unchanged, and the edge build keeps using CompressionStream.
(2026-08-24)### Patch Changes - #4581 `556d235` Thanks @turnipdabeets! - Fix reloadFeatureFlags and reloadFeatureFlagsAsync returning flags evaluated before the c
556d235 Thanks @turnipdabeets! - Fix reloadFeatureFlags and reloadFeatureFlagsAsync returning flags evaluated before the caller's most recent identity or person-property change when several reloads overlap, and stop overlapping reloads from skipping the remote config refresh
(2026-08-21)Updated dependencies [`6322f09`]:
6322f09 Thanks @turnipdabeets! - Fix logs and metrics being silently dropped when an attribute holds a very large integer, a function, a symbol, a sparse array, or a truncated emoji.
Cap log and metric attributes at 20 levels of nesting, 1,000 entries per object and 10,000 values in total, marking anything beyond as [Truncated].
Type OtlpAnyValue.intValue as string | number — code reading that field must handle both. (2026-08-21)6322f09]:
### Patch Changes - #4578 `bae46bf` Thanks @marandaneto! - Drop events when a before-send hook throws instead of sending the unmodified event. (2026-0
#4578 bae46bf Thanks @marandaneto! - Drop events when a before-send hook throws instead of sending the unmodified event.
(2026-08-20)
#4582 aef2f49 Thanks @ablaszkiewicz! - Stop building a stack frame for a window.onerror report that carries no code position, such as the ResizeObserver loop warning. The frame named the document URL rather than a script, so no source map could resolve it. These exceptions now arrive with no stack trace.
(2026-08-20)
### Patch Changes - #4572 `9701637` Thanks @ablaszkiewicz! - Stop counting Chromium stack frames (extension-injected, devtools or string-evaluated cod
9701637 Thanks @ablaszkiewicz! - Stop counting Chromium <anonymous> stack frames (extension-injected, devtools or string-evaluated code) as in-app code.
(2026-08-19)### Patch Changes - #4558 `3f9ba71` Thanks @posthog! - Fall back to the synthetic exception stack when a captured Error has no stack, so frameless fai
### Patch Changes - #4549 `0599fe0` Thanks @ablaszkiewicz! - Recognise Firefox and Safari extension frames when filtering extension exceptions, and st
0599fe0 Thanks @ablaszkiewicz! - Recognise Firefox and Safari extension frames when filtering extension exceptions, and stop counting Safari's masked webkit-masked-url:// frames as in-app code.
(2026-08-18)## 1.48.2 ### Patch Changes - #4413 `7b61aa4` Thanks @posthog! - Fix error tracking coercion reporting the wrong exception type for non-Error objects
7b61aa4 Thanks @posthog! - Fix error tracking coercion reporting the wrong exception type for non-Error objects (e.g. TypeError, ReferenceError) that are thrown by browser extensions or other cross-realm code. Previously these always reported as type Error, burying the real type in the message string. Also fixed a local isError helper shadowing the more robust cross-realm-aware implementation, which caused some errors thrown from iframes or extension isolated worlds to be misclassified.
(2026-08-17)Updated dependencies [`eb05237`]:
0a0206f Thanks @marandaneto! - Normalize capture timestamp overrides to equivalent UTC ISO strings in the browser and Node.js SDKs and shared core.
(2026-08-14)eb05237]:
Updated dependencies [`b2c6830`]:
c9086de Thanks @carlos-marchal-ph! - Public beta captureAi() / captureAiImmediate(): AI events on a dedicated isolated endpoint with the event UUID returned. New enableFullAiCapture option replaces the internal _useAiLane / _enableMultimodalCapture; wrappers route through the AI endpoint and skip redaction/truncation when set (privacy mode still wins).
(2026-08-13)b2c6830]:
## 1.47.1 ### Patch Changes - #4506 `a77115b` Thanks @marandaneto! - Log shutdown timeouts without rejecting, and correct the Node.js shutdown() retur
a77115b Thanks @marandaneto! - Log shutdown timeouts without rejecting, and correct the Node.js shutdown() return type to Promise<void>.
(2026-08-12)Surveys can now display an intro screen before question 1, configured via the new displayIntroScreen, introScreenHeader, introScreenDescription, intro
#4436 80f15a3 Thanks @jakesciotto! - feat(surveys): optional intro screen shown before the first question
Surveys can now display an intro screen before question 1, configured via the new
displayIntroScreen, introScreenHeader, introScreenDescription,
introScreenDescriptionContentType, and introScreenButtonText appearance fields.
The intro is dismissed with a button and records no response, does not affect
completion or partial-response metrics, does not re-fire "survey shown", and is
skipped when a survey is resumed with answers in progress. Intro copy is
translatable like the thank-you message. renderSurveysPreview accepts
previewPageIndex: -1 (exported as INTRO_SCREEN_PREVIEW_INDEX) to preview the
intro screen. (2026-08-10)
Updated dependencies [`75fb719`]:
64ba193 Thanks @marandaneto! - Use Node's zlib gzip implementation for Node SDK payloads to avoid sustained memory growth from frequent Web Streams compression.
(2026-08-06)75fb719]:
Updated dependencies [`3c40b6c`]:
3c40b6c Thanks @marandaneto! - Keep request timeouts active through response body consumption and clarify eventual event UUID deduplication semantics.
(2026-08-05)3c40b6c]:
Updated dependencies [`43d1850`]:
d3c4538 Thanks @posthog! - Keep $referring_domain and canonical utm_*/campaign parameters on minimal $feature_flag_called events. Previously the minimal allowlist stripped every campaign parameter, so a flag-called event landing first in a session could set the session's UTM attribution and channel type to NULL in web analytics.
(2026-08-04)43d1850]:
## 1.46.6 ### Patch Changes - #4363 `821a2c6` Thanks @marandaneto! - Safely capture circular and otherwise unknown telemetry values with a shared JSON
821a2c6 Thanks @marandaneto! - Safely capture circular and otherwise unknown telemetry values with a shared JSON-safe value converter.
(2026-08-04)## 1.46.5 ### Patch Changes - #4235 `7db0e8c` Thanks @hpouillot! - Preserve messages, source locations, and existing stacks from browser errors that d
7db0e8c Thanks @hpouillot! - Preserve messages, source locations, and existing stacks from browser errors that do not provide a same-realm Error object.
(2026-08-03)## 1.46.4 ### Patch Changes - #4381 `f3a71a1` Thanks @marandaneto! - Clear completed lifecycle timeout handles so successful shutdowns do not leave ti
f3a71a1 Thanks @marandaneto! - Clear completed lifecycle timeout handles so successful shutdowns do not leave timers running.
(2026-08-03)## 1.46.3 ### Patch Changes - #4155 `eb0a793` Thanks @ATKasem! - fix: personProperties and groupProperties on the feature flag methods are no longer t
eb0a793 Thanks @ATKasem! - fix: personProperties and groupProperties on the feature flag methods are no longer typed as Record<string, string>, so numeric and boolean values type-check without a cast. Local evaluation already handled them — matchProperty takes Record<string, any> and compares numerically for gt/gte/lt/lte — only the public types disagreed. These now use the shared Properties type (personProperties?: Properties, groupProperties?: Record<string, Properties>), matching setPersonPropertiesForFlags/setGroupPropertiesForFlags so the any can be narrowed later. Types only, no runtime change.
(2026-08-03)## 1.46.2 ### Patch Changes - #4347 `7c3a9af` Thanks @marandaneto! - Preserve events added to a full queue while an earlier batch is being flushed. (2
7c3a9af Thanks @marandaneto! - Preserve events added to a full queue while an earlier batch is being flushed.
(2026-08-03)## 1.46.1 ### Patch Changes - #4332 `b9a241e` Thanks @ioannisj! - Fix identify() leaving a user anonymous when the supplied ID already matches the per
b9a241e Thanks @ioannisj! - Fix identify() leaving a user anonymous when the supplied ID already matches the persisted distinct ID (for example after a non-identified bootstrap seeded the same ID). The user is now marked identified and a person-processed $set event is captured. Ports the same fix from posthog-js (browser) to the shared core used by React Native, Node, and posthog-js-lite.
(2026-07-31)## 1.46.0 ### Minor Changes - #4308 `6e7f3ae` Thanks @ablaszkiewicz! - Emit the release id that posthog-cli injects into your bundle as $release_id on
6e7f3ae Thanks @ablaszkiewicz! - Emit the release id that posthog-cli injects into your bundle as $release_id on $exception events, so PostHog can attach exceptions to a release without joining through symbol sets. Adds getInjectedReleaseId() to @posthog/core. The property is only attached when an injected release id can be read.
(2026-07-30)## 1.45.3 ### Patch Changes - #4325 `3bd8a2d` Thanks @marandaneto! - Fix dead-click false positives on WebKit when the SDK uses an iframe-sourced Muta
3bd8a2d Thanks @marandaneto! - Fix dead-click false positives on WebKit when the SDK uses an iframe-sourced MutationObserver fallback.
(2026-07-30)Surveys stopped being shown while feature flags were still loading, even when a cached enabled value for their internal targeting flag was already ava
#4304 c7099e9 Thanks @lucasheriques! - fix(surveys): only wait for feature flags on surveys that repeat
Surveys stopped being shown while feature flags were still loading, even when a cached
enabled value for their internal targeting flag was already available. Popover and widget
surveys recovered on the next evaluation, but a survey your own code renders (type api)
is evaluated once, so it was dropped for that page load and never reappeared.
That wait is only needed for surveys that repeat, where stored per-survey state is keyed by iteration and cannot be relied on to record that someone already answered. Other surveys keep one stable key that already prevents a repeat display, so they are now evaluated against the cached flag right away. (2026-07-29)
## 1.45.1 ### Patch Changes - #4234 `6c8fde0` Thanks @hpouillot! - Normalize V8 Promise combinator stack frames so input indexes are not treated as so
6c8fde0 Thanks @hpouillot! - Normalize V8 Promise combinator stack frames so input indexes are not treated as source filenames.
(2026-07-23)isFeatureEnabled(key, { defaultValue: false }) now returns the given default when the flag has no value — flags not loaded yet, or no flag with that k
#4222 0f2407b Thanks @turnipdabeets! - feat: add a default-value option to isFeatureEnabled
isFeatureEnabled(key, { defaultValue: false }) now returns the given default when the flag has no value — flags not loaded yet, or no flag with that key — and the return type narrows to boolean. The option name is the same in posthog-js, posthog-js-lite, and posthog-react-native. Without defaultValue, behavior is unchanged: boolean | undefined. (2026-07-22)
0f2407b]:
When the v2 /flags response carries minimalFlagCalledEvents: true (or, for posthog-node local evaluation, the flag-definitions payload carries minimal
#4172 9621830 Thanks @haacked! - send minimal $feature_flag_called events when the server enables it
When the v2 /flags response carries minimalFlagCalledEvents: true (or, for posthog-node local evaluation, the flag-definitions payload carries minimal_flag_called_events: true) and the evaluated flag is not linked to an experiment ($feature_flag_has_experiment === false), $feature_flag_called events are rebuilt from a strict allowlist of flag-evaluation, processing-control, and SDK-identity properties. Super properties, $set/$set_once, the $feature/<key> enumeration, $active_feature_flags, and the context envelope are stripped. Any missing signal (no gate on the response, bootstrapped or locally injected flags, has_experiment unknown) falls back to the full event, and experiment-linked flags always send the full envelope. The gate is stored alongside the cached flags (posthog-js persistence, posthog-node poller state) and is server-controlled, with no SDK-side configuration. before_send runs after the filter and may re-add stripped properties. (2026-07-20)
## 1.43.1 ### Patch Changes - #4168 `06d19a2` Thanks @dustinbyrne! - Avoid Next.js Edge runtime warnings for native compression and fatal error handli
06d19a2 Thanks @dustinbyrne! - Avoid Next.js Edge runtime warnings for native compression and fatal error handling.
(2026-07-16)$feature_flag_called events now carry a $feature_flag_has_experiment boolean sourced from the server's has_experiment flag metadata (the /flags?v=2 re
#4159 fad6d9a Thanks @haacked! - add $feature_flag_has_experiment to $feature_flag_called events
$feature_flag_called events now carry a $feature_flag_has_experiment boolean sourced from the server's has_experiment flag metadata (the /flags?v=2 response for remote evaluation, the /api/feature_flag/local_evaluation definitions for posthog-node local evaluation). The property is only sent when the server explicitly reports has_experiment; it is omitted entirely when the value is unknown (older servers, missing metadata, bootstrapped or locally injected flags). (2026-07-16)
fad6d9a]:
## 1.42.1 ### Patch Changes - #4153 `fc2cb2e` Thanks @eli-r-ph! - Log a warn (previously info) when the local event queue is full and the oldest event
Backend services can now record metrics through the same statsd-style pre-aggregating client the browser SDK ships, with no OpenTelemetry setup:
#4117 1eddff7 Thanks @DanielVisca! - add the posthog.metrics API (count, gauge, histogram) to posthog-node — alpha
Backend services can now record metrics through the same statsd-style pre-aggregating client the browser SDK ships, with no OpenTelemetry setup:
const client = new PostHog('phc_...', { metrics: { serviceName: 'billing-worker' } })
client.metrics.count('invoices.processed', 1, { attributes: { plan: 'pro' } })
client.metrics.gauge('queue.depth', 42)
client.metrics.histogram('job.duration', 187, { unit: 'ms' })
Samples aggregate in memory and flush as OTLP/JSON to /i/v1/metrics (one data point per series per window). Pending metrics are flushed on shutdown(). Core gains _sendMetricsBatch on PostHogCoreStateless (same outcome contract as _sendLogsBatch) and a shared resolveMetricsConfig, so any core-based SDK can host PostHogMetrics. (2026-07-15)
## 1.41.1 ### Patch Changes - #4090 `6dd8827` Thanks @lucasheriques! - chore: survey seen-key and repeat-activation helpers now live in @posthog/core,
6dd8827 Thanks @lucasheriques! - chore: survey seen-key and repeat-activation helpers now live in @posthog/core, shared by the web and React Native SDKs. Core's survey enums are now const-object literal unions (matching the web SDK's existing pattern), so the same values type-check across both SDKs. No behavior change. Type-level note: enum members no longer work as standalone type annotations (e.g. SurveyType.Popover as a type); use the exported union types instead. Runtime values are unchanged.
(2026-07-14)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`]:
One column per month.