Contents

@posthog/core

1.69.2

Patch Changes

1.69.1

Patch Changes

  • #5696 3000ae0 Thanks @marandaneto! - Add extension hooks for context-safe feature flags and transient batch retention. (2026-11-18)

  • #5747 59d9656 Thanks @marandaneto! - Preserve falsy JSON payloads in feature flag snapshots from legacy flag responses. (2026-11-18)

1.69.0

Minor Changes

  • #5407 6405dfd Thanks @eli-r-ph! - Export the table of per-event options and the event properties posthog-node 5.x.x reads instead, so posthog-node, @posthog/ai and @posthog/mcp share one copy. (2026-11-17)

Patch Changes

  • #5407 6405dfd Thanks @eli-r-ph! - Debug mode logs an emitted event's payload through an overridable describeDebugPayload, so an SDK can log a summary instead. The default is unchanged. (2026-11-17)

  • #5407 6405dfd Thanks @eli-r-ph! - PostHogFetchOptions has an optional redirect field, so a custom fetch sees how capture asks it to handle redirects. (2026-11-17)

  • #5407 6405dfd Thanks @eli-r-ph! - Export V7Generator, so an SDK can generate v7 uuids from its own random source. (2026-11-17)

1.68.0

Minor Changes

  • #5693 d8389d7 Thanks @marandaneto! - Treat failed flag evaluations as unavailable: Node getFeatureFlag()/isFeatureEnabled() return undefined, getAllFlags() omits failed keys, and no failed values or payloads are exposed. (2026-11-15)

1.67.3

Patch Changes

  • #5538 db28c59 Thanks @andehen! - Let an SDK choose the /flags response version it requests and how it reads it. SDKs that do not opt in keep requesting v=2. (2026-11-13)

1.67.2

Patch Changes

  • #5672 22f3f71 Thanks @lucasheriques! - fix(core): summarize the keys of a non-Error exception in one pass, so capturing a very wide thrown object no longer takes quadratic time. (2026-11-12)

1.67.1

Patch Changes

  • #5626 44e6251 Thanks @luantaraschi! - Relative date filters in local flag evaluation no longer roll past the end of a shorter month. 1m on March 31 now resolves to February 28, matching the flags service. (2026-11-10)

1.67.0

Minor Changes

  • #5596 9ffdaf6 Thanks @DanielVisca! - feat(node): add instrumentRequest and posthogHonoMiddleware for fetch-API servers (Hono, Bun, Deno, Next route handlers). They read x-posthog-session-id, wrap the request in withContext, open a server span that continues traceparent and is named by route, mark 5xx as errors, and record http.server.request.duration and http.server.request.count.

    feat(core): add PostHogMetrics.flushCoalesced(), a flush that callers can request once per unit of work: concurrent calls share one queued send, and it waits out a metrics backoff. (2026-11-10)

1.66.0

Minor Changes

  • #5599 fee9bee Thanks @DanielVisca! - feat(node): expose traceId and spanId getters on the Span handle, for correlating logs from other loggers with a trace without parsing traceparent() (2026-11-10)

Patch Changes

1.65.0

Minor Changes

  • #5594 bfbaff7 Thanks @DanielVisca! - feat(node): expose traceId and spanId getters on the Span handle, for correlating logs from other loggers with a trace without parsing traceparent() (2026-11-09)

Patch Changes

  • #5607 fac34e4 Thanks @lucasheriques! - Fix intent and payload capture bugs: a long digit run no longer drops $mcp_intent with a stack overflow (card redaction is otherwise unchanged), captured tool arguments are limited before they are sanitized and credential-named arguments are not walked, and $mcp_feedback_<name> object extras redact identifiers in keys and numbers. A parsed __proto__ argument is still dropped, as before. (2026-11-09)
  • Updated dependencies [bfbaff7]:

1.64.1

Patch Changes

  • #5545 28fe8c0 Thanks @onmax! - Parse Node stack frames for functions named async without a leading parenthesis in the filename. (2026-11-06)

1.64.0

Minor Changes

  • #5580 aa66d4c Thanks @haacked! - metrics.histogram() accepts a bounds option that sets the histogram's bucket boundaries, and beforeSend sees and can change them. The first sample of a histogram (name and unit) fixes its bounds until the client resets. A later sample with different bounds is recorded in the fixed buckets and logs a warning, and a sample with invalid bounds is dropped. The experimental posthog.flags.request.duration histogram now uses the bounds [50, 75, 100, 150, 200, 300, 400, 500, 750, 1000, 1500, 2000, 3000, 5000, 10000] ms, so its p50 and p95 resolve between 50ms and 5s. This changes the metric's buckets, which its experimental status allows. (2026-11-05)

Patch Changes

1.63.2

Patch Changes

  • #5544 8ddb57f Thanks @marandaneto! - Fix tree shaking of unselected extensions and shared utilities when using the slim SDK. (2026-11-05)

1.63.1

Patch Changes

  • #5481 5764ddd Thanks @gustavohstrassburger! - Feature flags read before the user opts in to capturing now send $feature_flag_called when the user opts in, without being read again. This fixes missing exposures from the React and React Native hooks, which read a flag once on mount. (2026-11-04)

1.63.0

Minor Changes

  • #5473 5c8f314 Thanks @ablaszkiewicz! - feat: parsePostHogCookie and readPostHogCookie return the session's last activity and start timestamps (2026-11-03)

1.62.1

Patch Changes

  • #5505 3fbb667 Thanks @majicmaj! - Recognize self-declared Lightpanda headless browsers in bot detection. (2026-11-02)

1.62.0

Minor Changes

  • #5418 c705824 Thanks @mayteio! - parseRetryAfterMs takes an optional cap, so a caller can read a Retry-After longer than five minutes. (2026-10-30)

1.61.2

Patch Changes

  • #5252 503c3ea Thanks @andehen! - Document that sendFeatureFlagEvent is also the default for posthog-node evaluateFlags() snapshot reads. (2026-10-28)

1.61.1

Patch Changes

  • #5431 96d7ff2 Thanks @turnipdabeets! - Deprecate getFeatureFlags(), getFeatureFlagPayloads() and getFeatureFlagsAndPayloads() in favor of getAllFeatureFlags(), onFeatureFlag() in favor of onFeatureFlags(), the cb option of reloadFeatureFlags() in favor of reloadFeatureFlagsAsync(), and overrideFeatureFlag() in favor of updateFlags(). In React Native, also deprecate the useFeatureFlagWithPayload() hook in favor of useFeatureFlagResult(). They continue to work. (2026-10-27)

1.61.0

Minor Changes

  • #5436 43ad061 Thanks @turnipdabeets! - Add the projectToken prop to PostHogProvider and the projectToken property to the client, and deprecate the apiKey prop and property in favor of them. apiKey keeps working, and projectToken wins when both are set. (2026-10-26)

1.60.1

Patch Changes

  • #5354 f827137 Thanks @marandaneto! - Fall back instead of returning inconsistent local regex flag results for Unicode and advanced patterns. (2026-10-23)

1.60.0

Minor Changes

  • #5234 1991b99 Thanks @gustavohstrassburger! - feat: report flags local evaluation could not resolve on evaluateFlags() snapshots via unresolvedFlags, tag reads of them with local_evaluation_inconclusive, and warn once about flags whose definition local evaluation does not support

    Behavior changes:

    • A condition with a filter local evaluation cannot check and a filter that does not match now resolves locally as no match, instead of falling back to a server request or staying unresolved.
    • $feature_flag_called events from snapshot reads report local_evaluation_inconclusive instead of flag_missing for these flags.
    • The load-time warning now also logs with strictLocalEvaluation: true. (2026-10-22)

1.59.4

Patch Changes

  • #5365 964e736 Thanks @gustavohstrassburger! - Feature flags read before the user opts in to capturing now send $feature_flag_called the next time they are read after opt in. (2026-10-22)

1.59.3

Patch Changes

  • #5350 17260e5 Thanks @marandaneto! - Fall back from local flag evaluation when a required property value is undefined. (2026-10-21)

1.59.2

Patch Changes

  • #5307 189da75 Thanks @quotentiroler! - Local flag evaluation now matches a null property with string operators like the flags service, so negated operators such as not_icontains match instead of failing. (2026-10-21)

1.59.1

Patch Changes

  • #5300 09d4ba2 Thanks @rafaeelaudibert! - Capture the Freebuff click identifier (bfcid) as a campaign parameter, so it is set on events and as $initial_bfcid like every other ad click ID. (2026-10-14)

1.59.0

Minor Changes

Patch Changes

1.58.1

Patch Changes

1.58.0

Minor Changes

  • #5257 2788b40 Thanks @turnipdabeets! - Change properties passed to capture() and the other event methods to override SDK context properties such as $app_version, $os_name and $lib, matching posthog-js and posthog-android (2026-10-10)

1.57.4

Patch Changes

  • #5258 429b5b2 Thanks @hpouillot! - Recognize native bundler debug IDs and build-time error tracking release IDs. (2026-10-09)

1.57.3

Patch Changes

1.57.2

Patch Changes

  • #5162 3132998 Thanks @pauldambra! - Sanitize each tool response once instead of twice, and replace image, audio and binary blocks before the scan, so tool calls with large results cost less CPU. Redact PostHog tokens that URL field decoding exposes. (2026-10-07)

1.57.1

Patch Changes

  • #5209 ff7582a Thanks @turnipdabeets! - Fix Unable to resolve module @posthog/core/surveys when bundling posthog-react-native on React Native 0.71–0.78 without Metro package exports. posthog-react-native 4.47.0 and later also pick up the fix by updating @posthog/core. (2026-10-07)

1.57.0

Minor Changes

  • #5191 6cd5496 Thanks @gesh! - Capture WebMCP tool intent and model metadata by default. (2026-10-06)

Patch Changes

1.56.1

Patch Changes

1.56.0

Minor Changes

  • #5083 d576bec Thanks @61465! - Opt-in WebView bot heuristic for #2921.
    • posthog-js/customizations exports a new isLikelyWebViewBot(ua) helper that flags the UA pattern described in #2921 (a Chrome/... token without the usual AppleWebKit/* + Safari/* co-markers that real Chrome always sends). Wire it into before_send to tag or drop the matching events — see isLikelyWebViewBot JSDoc for a usage example. Default SDK behaviour is unchanged; the helper is tree-shaken out unless you import it.
    • @posthog/core keeps isBlockedUA and DEFAULT_BLOCKED_UA_STRS byte-for-byte compatible, and gains session-level memoisation of isBlockedUA results keyed on (ua, customBlockedUserAgents), so repeat calls within the same session are O(1). (2026-10-05)

1.55.3

Patch Changes

  • #5046 c360da1 Thanks @luke-belton! - Capture the OpenAI Ads click identifier (oppref) as a campaign parameter, so it is set on events and as $initial_oppref like every other ad click ID. (2026-10-01)

1.55.2

Patch Changes

  • #5078 f4704ac Thanks @rubychilds! - Honor filters.holdout during local feature flag evaluation. A user in an experiment holdout now receives the holdout-<id> variant instead of being bucketed into a regular variant, matching how the server evaluates the same flag. The holdout is resolved before the release conditions, so a held-out user never reaches the flag's targeting — including when those conditions would have excluded them, so isFeatureEnabled can return true where it previously returned false. Experiments with an active holdout will see variant assignment change for the held-out share of traffic on upgrade, bringing locally evaluated assignments in line with server-evaluated ones. (2026-09-23)

1.55.1

Patch Changes

  • #5018 9cd8ebd Thanks @turnipdabeets! - Stop dropping long spans that end: maxSpanAgeMs now evicts spans only once maxLiveSpans is reached, so a span that runs past the age limit and then ends is exported, and its children are no longer orphaned. (2026-09-21)

  • #4800 aad7464 Thanks @marandaneto! - Respect the definitions response's property_matching_version during local feature flag evaluation. Version 2 uses explicit boolean/string equality and per-member array matching, while missing or other versions retain service legacy matching (including empty-array truthiness). Preserve the version in Node definition caches and Convex persisted definitions, and propagate it through person, group, cohort and dependency evaluation without mixing snapshots during reloads. Existing numeric ambiguity fallback and SemVer parsing policies are unchanged. (2026-09-21)

  • Updated dependencies [9cd8ebd]:

1.55.0

Minor Changes

  • #4904 5cfec8b Thanks @lucasheriques! - Support partial survey responses and persistent resume in React Native, moving surveys toward feature parity across SDKs. (2026-09-18)

1.54.5

Patch Changes

  • #5012 5c12a4c Thanks @yoarajota! - Coerce survey and product tour property filter values to strings before matching, so a numeric filter value from the /surveys response no longer throws in icontains/not_icontains (2026-09-18)

1.54.4

Patch Changes

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

1.54.3

Patch Changes

1.54.2

Patch Changes

  • #4885 39a8980 Thanks @decknamec! - Server-side feature flags now resolve in posthog-node and posthog-edge even when a proxy rewrites the request's User-Agent. Flags restricted to the client runtime now resolve to undefined in these SDKs, where a rewritten User-Agent previously let them through. (2026-09-15)

1.54.1

Patch Changes

  • #4941 07c1045 Thanks @marandaneto! - Capture causes and AggregateError members with relationship metadata and individual stacks, limiting output to 50 entries and 1,000 member inspections. (2026-09-15)

1.54.0

Minor Changes

  • #4954 3c68c08 Thanks @marandaneto! - Export the shared Retry-After parser with safe integer caps, GMT HTTP-date handling and rejection of non-HTTP dates. (2026-09-14)

1.53.3

Patch Changes

  • #4922 3786cff Thanks @Mnigos! - Require final 2xx responses for successful writes while preserving immediate-call error handling. (2026-09-14)

1.53.2

Patch Changes

1.53.1

Patch Changes

  • #4908 4a3c74b Thanks @turnipdabeets! - Child spans now share their parent's clock, so a child no longer appears to start before or end after its parent by up to a millisecond, or by more when the system clock is adjusted mid-trace. (2026-09-11)

1.53.0

Minor Changes

  • #4579 19e78cc Thanks @turnipdabeets! - Add experimental distributed tracing to posthog-node: startSpan, withSpan and getActiveSpan record spans against a new traces client option. A service with tracing off still forwards an inbound traceparent, including from spans nested inside the one that received it, so a distributed trace is not severed. A traceparent may be passed as the one-element array req.headersDistinct gives. A beforeSpanSend hook sees every span before it is exported and may edit or drop it, and maxAttributesPerSpan, maxEventsPerSpan, maxAttributeValueLength, maxLiveSpans and maxSpanAgeMs bound what a single span and a single process may hold. (2026-09-10)

Patch Changes

  • #4579 19e78cc Thanks @turnipdabeets! - Cap the retry delay for log exports at 30 seconds, the ceiling the logs contract states. It previously doubled to 64 times the flush interval — 192s on web, 640s on React Native — so a log export now resumes within 30 seconds of a failing endpoint recovering, at the cost of more retry requests while that endpoint is down. (2026-09-10)

  • #4579 19e78cc Thanks @turnipdabeets! - Keep backing off a failing log flush while new records arrive, instead of the next record resetting the retry to the flush interval. (2026-09-10)

  • #4579 19e78cc Thanks @turnipdabeets! - Stop a throwing getter in metrics.resourceAttributes from breaking every metrics export — the key is recorded as [Unserializable] instead. (2026-09-10)

  • #4579 19e78cc Thanks @turnipdabeets! - Honor Retry-After when the ingestion endpoint refuses a logs or metrics batch, instead of retrying on the SDK's own schedule alone. A refusal naming a longer wait extends the one being served, up to five minutes from when it started. Retry delays now carry jitter so clients refused together do not return together, and metrics backs off exponentially across consecutive failures rather than retrying on a fixed interval. (2026-09-10)

  • #4579 19e78cc Thanks @turnipdabeets! - Logs and metrics now always send service.name and telemetry.sdk.*, even when a resourceAttributes value is too large to encode in full. Previously that value could crowd them out, and the records reached PostHog with no service attribution. (2026-09-10)

  • #4579 19e78cc Thanks @turnipdabeets! - Stop sending logs and metrics batches over 10 MiB, or too large to serialize at all, instead of spending a request to discover the endpoint refuses them. (2026-09-10)

  • Updated dependencies [19e78cc]:

1.52.2

Patch Changes

  • #4887 0da006c Thanks @posthog! - Error tracking no longer counts an injected script as your own code. A stack frame is in_app only when its filename names a script your app was served — http(s), file, blob, app, capacitor, ionic, a bundler scheme, or a bare path. A frame served over any other scheme, such as an in-app browser bridge on iabjs:// or an extension content script on chrome-extension://, is kept for context but no longer groups the issue under your code. (2026-09-10)

1.52.1

Patch Changes

  • #4880 412c97c Thanks @marandaneto! - Fix recording package exports, native ESM loading, and strict TypeScript 4.7 consumer compatibility. (2026-09-10)

1.52.0

Minor Changes

  • #4869 891eefa Thanks @robbie-c! - Add a shared isUrl helper for HTTP(S) URLs and explicit relative paths. (2026-09-09)

Patch Changes

1.51.2

Patch Changes

  • #4859 c356c81 Thanks @marandaneto! - Include the root license and attribution notices in the published core package. (2026-09-09)

1.51.1

Patch Changes

  • #4798 4358915 Thanks @posthog! - fix(error-tracking): collapse repeated frame cycles in parsed stack traces to reduce grouping differences caused by recursion depth, while preserving distinct throw locations (2026-09-09)

1.51.0

Minor Changes

  • #4809 3a5b322 Thanks @marandaneto! - Add best-effort in-app browser attribution using $webview_app and $webview_app_version, without changing existing $browser or $browser_version values. Detect explicit user-agent markers for Facebook, Facebook Lite, Messenger, Instagram, Threads, LinkedIn, Twitter, TikTok, WhatsApp, Snapchat, WeChat, LINE, Google, Bing, Pinterest, Naver, and KakaoTalk. Unknown apps and versions are omitted; missing markers do not imply a standalone browser. (2026-09-07)

1.50.6

Patch Changes

  • #4785 74ca945 Thanks @marandaneto! - Clarify feature flag return-value terminology across SDK APIs. A false value is a conclusive off evaluation, while undefined means no evaluation is available. Remote evaluation omits globally inactive flags, whereas backend local evaluation can resolve cached inactive definitions to false. (2026-09-07)
  • Updated dependencies [74ca945, 5e74132]:

1.50.5

Patch Changes

  • #4782 b64b113 Thanks @posthog! - Stop counting stack frames that have no filename (in-app browser bridge scripts and other code the runtime reports without a script URL) as in-app code. (2026-09-04)
  • Updated dependencies [426e1fd]:

1.50.4

Patch Changes

  • #4759 c475070 Thanks @marandaneto! - Preserve explicitly false feature flag values supplied through bootstrap configuration. (2026-09-03)

1.50.3

Patch Changes

  • #4753 dbbb58e Thanks @Ashishjob! - Fix clampToRange discarding a valid fallback value of 0. It used fallbackValue || max, so a 0 fallback (a legitimate value) was treated as absent and replaced by max; it now uses ?? so 0 is honored. (2026-09-03)
  • Updated dependencies [41ed3af]:

1.50.2

Patch Changes

  • #4727 ec9354c Thanks @turnipdabeets! - Drop attributes with an empty key from exported logs and metrics instead of sending them. OTLP requires a non-empty key, and the server stored one verbatim, where it appeared as a nameless attribute that filters could not match. (2026-09-01)

1.50.1

Patch Changes

  • #4710 e87820a Thanks @turnipdabeets! - Add os.name and os.version resource attributes to logs from the browser SDK, overridable via logs.resourceAttributes (2026-09-01)

1.50.0

Minor Changes

  • #4663 6ae173f Thanks @pauldambra! - Detect the Claude, Codex, and ChatGPT apps from their user agent markers: $browser now reports the app name instead of Chrome.

    ChatGPT versions its apps differently per platform, so its $browser_version is not comparable across platforms. (2026-09-01)

Patch Changes

  • #4661 444bf35 Thanks @marandaneto! - Match local feature flag string operators, exact-value coercion, and JSON stringification with the flags service. (2026-09-01)

  • #4708 6723395 Thanks @turnipdabeets! - Change bigint attributes on logs, metrics and spans to send as an int64 rather than as a string. (2026-09-01)

1.49.2

Patch Changes

  • #4626 3c650a1 Thanks @nandinitiw! - Re-translate popover surveys when the display language changes while the survey is on screen, either from a browser languagechange event or from identify() updating the language person property. In-progress answers are preserved. $survey_questions[].question and $survey_language on survey sent / survey dismissed now report the text and language the user saw when they answered, not the language active when the event fired. Feedback-button (widget) surveys are unchanged. (2026-08-28)

1.49.1

Patch Changes

  • #4636 74ff567 Thanks @yfwmaniish! - Narrow the pinterest entry in the bot-detection blocklist to pinterestbot, so real users on Pinterest's in-app browser (whose UA also contains the substring pinterest) are no longer misclassified as bots and silently excluded from analytics. The crawler's other UA variant remains covered by the existing generic bot.htm entry, so no bot-detection coverage is lost. (2026-08-27)

1.49.0

Minor Changes

  • #4036 718beee Thanks @emmayusufu! - Add capturedAt to PostHogLogs.captureLog() for stamping a record with the time and context of when the event occurred, and PostHogLogs.clearQueue() for dropping every queued record (2026-08-27)

Patch Changes

  • #4653 712223a Thanks @posthog! - Fix request timeouts never firing on pages where a browser extension makes Error.prototype.name non-writable (2026-08-27)

1.48.12

Patch Changes

  • #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)

1.48.11

Patch Changes

  • #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)

1.48.10

Patch Changes

  • #4623 be299df Thanks @turnipdabeets! - Fix buffered logs being dropped instead of retried after HTTP 408, 429 or 5xx (2026-08-24)

1.48.9

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 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)

1.48.8

Patch Changes

  • #4581 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)

1.48.7

Patch Changes

  • #4583 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)
  • Updated dependencies [6322f09]:

1.48.6

Patch Changes

  • #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)

1.48.5

Patch Changes

  • #4572 9701637 Thanks @ablaszkiewicz! - Stop counting Chromium <anonymous> stack frames (extension-injected, devtools or string-evaluated code) as in-app code. (2026-08-19)

1.48.4

Patch Changes

  • #4558 3f9ba71 Thanks @posthog! - Fall back to the synthetic exception stack when a captured Error has no stack, so frameless failures (such as a Firefox network fetch TypeError) keep their call-site frames and group per call site instead of merging into one issue. (2026-08-19)

1.48.3

Patch Changes

  • #4549 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 (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)

1.48.1

Patch Changes

  • #4521 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)
  • Updated dependencies [eb05237]:

1.48.0

Minor Changes

  • #4289 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)

Patch Changes

1.47.1

Patch Changes

  • #4506 a77115b Thanks @marandaneto! - Log shutdown timeouts without rejecting, and correct the Node.js shutdown() return type to Promise<void>. (2026-08-12)

1.47.0

Minor Changes

  • #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)

1.46.9

Patch Changes

  • #4423 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)
  • Updated dependencies [75fb719]:

1.46.8

Patch Changes

  • #4380 3c40b6c Thanks @marandaneto! - Keep request timeouts active through response body consumption and clarify eventual event UUID deduplication semantics. (2026-08-05)
  • Updated dependencies [3c40b6c]:

1.46.7

Patch Changes

  • #4287 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)
  • Updated dependencies [43d1850]:

1.46.6

Patch Changes

  • #4363 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 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 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 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. (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 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 $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 MutationObserver fallback. (2026-07-30)

1.45.2

Patch Changes

  • #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 source filenames. (2026-07-23)

1.45.0

Minor Changes

  • #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)

Patch Changes

1.44.0

Minor Changes

  • #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 handling. (2026-07-16)

1.43.0

Minor Changes

  • #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)

Patch Changes

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 is dropped, matching the severity Python and Rust already use for this condition. (2026-07-15)

1.42.0

Minor Changes

  • #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:

     1const client = new PostHog("phc_...", {
     2  metrics: { serviceName: "billing-worker" },
     3});
     4client.metrics.count("invoices.processed", 1, {
     5  attributes: { plan: "pro" },
     6});
     7client.metrics.gauge("queue.depth", 42);
     8client.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, 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)

1.41.0

Minor Changes

  • #4101 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)

Patch Changes

1.40.2

Patch Changes

  • #4105 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-07-09)

  • #4120 d0e531a Thanks @dustinbyrne! - Coalesce concurrent flush requests to avoid chaining redundant flushes while offline. (2026-07-09)

1.40.0

Minor Changes

  • #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:

     1posthog.metrics.count("orders_created", 1);
     2posthog.metrics.gauge("active_connections", 42);
     3posthog.metrics.histogram("api_latency", 187, { unit: "ms" });
    

    Configure via metrics: { serviceName, environment, flushIntervalMs, maxSeriesPerFlush, beforeSend, ... }. (2026-07-08)

Patch Changes

1.39.6

Patch Changes

  • #4059 532f2c3 Thanks @jiuyige! - Add per-call sendEvent option support to React Native feature flag helpers. (2026-07-02)

1.39.5

Patch Changes

  • #4048 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 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 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)

1.39.2

Patch Changes

  • #4027 ab118d2 Thanks @marandaneto! - Safely serialize event batches with circular property references instead of crashing during flush. (2026-06-30)

1.39.1

Patch Changes

  • #3998 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)

1.39.0

Minor Changes

  • #4006 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)

1.38.1

Patch Changes

  • #3961 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)

1.38.0

Minor Changes

  • #3977 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)

1.37.3

Patch Changes

1.37.2

Patch Changes

  • #3942 c9c8925 Thanks @hpouillot! - Fix browser console log capture when session activity timestamps are missing and refresh session attributes for each log. (2026-06-24)

1.37.1

Patch Changes

  • #3932 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)

1.37.0

Minor Changes

  • #3879 440e370 Thanks @ioannisj! - Deprecate disableRemoteConfig. Remote config is now always loaded and the option is a no-op. It will be removed in a future version. Also promote the previously experimental disableSurveys and maskAllSandboxedViews options to GA. (2026-06-23)

1.36.0

Minor Changes

  • #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)

Patch Changes

1.35.4

Patch Changes

  • #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:

    • the bundled OpenTelemetry dependencies are removed, shrinking the lazily-loaded logs chunk
    • auto-captured console logs now run through 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 unset
    • console logs now link to the person's profile: they carry the person id as posthogDistinctId, 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 moved
    • host and window.id move from resource attributes to record attributes (names unchanged)
    • records also now carry the standard SDK context shared by other logs, including feature_flags

    For 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.posthogDistinctId
    • attributes.location.href → attributes.url.full
    • resource.attributes.session.id → attributes.sessionId
    • resource.attributes.host / resource.attributes.window.id → attributes.host / attributes.window.id (2026-06-22)

1.35.3

Patch Changes

1.35.2

Patch Changes

  • #3886 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)

1.35.1

Patch Changes

  • #3876 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)

1.35.0

Minor Changes

  • #3865 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)

Patch Changes

1.34.0

Minor Changes

  • #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)

1.33.0

Minor Changes

  • #3709 c6c163a Thanks @posthog! - Add unsetPersonProperties() to remove person properties, the counterpart to setPersonProperties(). Previously the only way to unset a person property was to hand-pass a $unset array inside a capture() call. (2026-06-16)

Patch Changes

  • #3756 b3ec845 Thanks @archievi! - Drop the event and log a warning when a before_send hook removes the token property, instead of silently sending an event that ingest rejects with a 401. (2026-06-16)
  • Updated dependencies [c9c7df1, c6c163a]:

1.32.5

Patch Changes

  • #3828 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)

1.32.4

Patch Changes

1.32.3

Patch Changes

1.32.2

Patch Changes

  • #3799 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)
  • Updated dependencies []:

1.32.1

Patch Changes

1.32.0

Minor Changes

  • #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)

Patch Changes

1.31.4

Patch Changes

1.31.3

Patch Changes

1.31.2

Patch Changes

1.31.1

Patch Changes

1.31.0

Minor Changes

  • #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)

Patch Changes

1.30.14

Patch Changes

1.30.13

Patch Changes

1.30.12

Patch Changes

1.30.11

Patch Changes

1.30.10

Patch Changes

1.30.9

Patch Changes

1.30.8

Patch Changes

1.30.7

Patch Changes

1.30.6

Patch Changes

1.30.5

Patch Changes

1.30.4

Patch Changes

1.30.3

Patch Changes

1.30.2

Patch Changes

1.30.1

Patch Changes

1.30.0

Minor Changes

  • #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

1.29.15

Patch Changes

1.29.14

Patch Changes

  • #3694 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)
  • Updated dependencies []:

1.29.13

Patch Changes

1.29.12

Patch Changes

1.29.11

Patch Changes

1.29.10

Patch Changes

  • #3665 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)
  • Updated dependencies []:

1.29.9

Patch Changes

  • #3639 c806cca Thanks @marandaneto! - Use native async gzip compression for session recording events when CompressionStream is available. (2026-05-22)
  • Updated dependencies []:

1.29.8

Patch Changes

1.29.7

Patch Changes

1.29.6

Patch Changes

1.29.5

Patch Changes

1.29.4

Patch Changes

1.29.3

Patch Changes

1.29.2

Patch Changes

1.29.1

Patch Changes

  • #3602 4b895bf Thanks @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 []:

1.29.0

Minor Changes

  • #3599 ad60818 Thanks @turnipdabeets! - Expose UUID and cookie helpers from @posthog/core and posthog-node for users managing distinct_id outside the browser SDK (e.g. Lambda functions handing out cross-domain redirects). The helpers were already implemented in @posthog/next — this change lifts them to core so all SDKs can re-use them. @posthog/next now re-exports the same surface from @posthog/core to keep existing consumers working without churn. Closes #2143. (2026-05-12)

Patch Changes

1.28.7

Patch Changes

  • #3568 223d925 Thanks @marandaneto! - Validate native gzip output before sending requests and fall back when CompressionStream returns malformed data. (2026-05-11)
  • Updated dependencies []:

1.28.6

Patch Changes

1.28.5

Patch Changes

1.28.4

Patch Changes

1.28.3

Patch Changes

1.28.2

Patch Changes

  • #3516 220cd61 Thanks @marandaneto! - fix: consume fetch response body to prevent CF Workers runtime warnings (2026-05-04)

  • #3515 255b273 Thanks @marandaneto! - Gate survey translation logs behind SDK debug logging to avoid production console spam. (2026-05-04)

  • Updated dependencies []:

1.28.1

Patch Changes

  • #3512 8aee3d5 Thanks @marandaneto! - Do not crash when the React Native SDK is initialized without an API key; initialize as disabled and log an error instead. Disabled clients now also skip manual reload/flush/survey/log network calls. (2026-05-04)
  • Updated dependencies []:

1.28.0

Minor Changes

  • #3492 cf56753 Thanks @lucasheriques! - Add translated survey rendering support in React Native and share survey translation logic through @posthog/core. (2026-05-01)

  • #3480 04db756 Thanks @turnipdabeets! - Add manual log capture API for React Native: posthog.captureLog(), posthog.logger.{trace,debug,info,warn,error,fatal}(), posthog.flushLogs(), and a logs config option on the constructor. Records ship to PostHog's logs product (/i/v1/logs) in OTLP format, batched on a timer / AppState change / buffer fill, and persisted to a dedicated logs-storage file.

    Manual capture is unconditional — calling the API ships records, matching the events pipeline's manual capture() shape. Only blockers: optedOut, missing/empty body, and missing API key. The wire field response.logs.captureConsoleLogs is browser-only (it gates the JS SDK's console.* autocapture extension) and is not read by RN. When console autocapture lands on RN as a follow-up, that PR will introduce a local opt-in for the autocapture path specifically; manual capture will remain unconditional. (2026-05-01)

Patch Changes

1.27.9

Patch Changes

1.27.8

Patch Changes

1.27.7

Patch Changes

1.27.6

Patch Changes

1.27.5

Patch Changes

  • #3464 70508df Thanks @dustinbyrne! - Avoid using Blob.stream() for native async gzip compression to prevent Safari NotReadableError stream failures. (2026-04-24)
  • Updated dependencies []:

1.27.4

Patch Changes

1.27.3

Patch Changes

1.27.2

Patch Changes

  • #3437 daf028d Thanks @dustinbyrne! - Disable the core client instead of throwing when the API key is missing, blank, or invalid. (2026-04-24)
  • Updated dependencies []:

1.27.1

Patch Changes

  • #3453 96f19b7 Thanks @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@
  • Updated dependencies [96f19b7]:

1.27.0

Minor Changes

  • #3432 1a8b727 Thanks @richardsolomou! - refactor: rename __add_tracing_headers to addTracingHeaders. The __ prefix signalled an internal/experimental option, but the config is a public API (documented for linking LLM traces to session replays). __add_tracing_headers continues to work as a deprecated alias on the browser SDK.

    Also exposes patchFetchForTracingHeaders from @posthog/core so non-browser SDKs can reuse the implementation. (2026-04-23)

1.26.0

Minor Changes

1.25.3

Patch Changes

  • #3426 1a0b58d Thanks @marandaneto! - Trim surrounding whitespace from user-provided API keys, personal API keys, and host config values before using them. (2026-04-21)

1.25.2

Patch Changes

  • #3351 c735b08 Thanks @dmarticus! - Send $device_id as a top-level field in /flags requests so the feature flags service can use it for device-based bucketing during remote evaluation (2026-04-09)

1.25.1

Patch Changes

  • #3340 57ee5b2 Thanks @dmarticus! - Add device bucketing support to the React Native SDK for stable feature flag assignment across identity changes (2026-04-07)

1.25.0

Minor Changes

1.24.6

Patch Changes

  • #3320 a01a3d5 Thanks @dustinbyrne! - fix: send $groupidentify for new groups even when no properties are provided (2026-04-02)

1.24.5

Patch Changes

  • #3309 197eeda Thanks @marandaneto! - Extract CLI and sourcemap utilities from @posthog/core into @posthog/plugin-utils to remove cross-spawn from React Native dependencies (2026-04-01)

1.24.4

Patch Changes

  • #3296 a863914 Thanks @marandaneto! - Fix captureException crashing in React Native with ReferenceError: Property 'Event' doesn't exist (2026-03-30)

1.24.3

Patch Changes

  • #3292 4bdfdbc Thanks @marandaneto! - Add @default JSDoc tags to PostHogCoreOptions configuration properties for better IDE documentation and discoverability. (2026-03-27)

1.24.2

Patch Changes

  • #3286 8d34289 Thanks @marandaneto! - Use async native CompressionStream for gzip compression to avoid blocking the main thread (2026-03-27)

1.24.1

Patch Changes

1.24.0

Minor Changes

1.23.4

Patch Changes

1.23.3

Patch Changes

1.23.2

Patch Changes

  • #3185 5e8d5fc Thanks @marandaneto! - fix: export getRemoteConfigBool, getRemoteConfigNumber, and isValidSampleRate from @posthog/core (2026-03-02)

1.23.1

Patch Changes

1.23.0

Minor Changes

  • #3086 e962f01 Thanks @marandaneto! - feat: support remote config for error tracking, session replay capture performance and capture logs (2026-02-17)

1.22.0

Minor Changes

1.21.0

Minor Changes

  • #2820 d578824 Thanks @ordehi! - Add survey response validation for message length (min and max length). Fixes whitespace-only bypass for required questions. Existing surveys work unchanged but now properly reject blank responses. (2026-02-09)

1.20.2

Patch Changes

  • #3028 e055f9a Thanks @marandaneto! - fix: Queue pending feature flags reload instead of dropping requests when a reload is already in flight (2026-02-09)

1.20.1

Patch Changes

1.20.0

Minor Changes

1.19.0

Minor Changes

1.18.0

Minor Changes

  • #2996 7768010 Thanks @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)

1.17.0

Minor Changes

1.16.0

Minor Changes

  • #2967 cbe84c1 Thanks @adboio! - support auto-submit on selection for survey rating questions (2026-01-29)

1.15.0

Minor Changes

1.14.1

Patch Changes

  • #2971 f51560c Thanks @marandaneto! - fix: groups and groupidentify is a no-op if person profiles is set to never (2026-01-27)

1.14.0

Minor Changes

  • #2917 933c763 Thanks @marandaneto! - feat: add support for person_profiles react native, core and web-lite (2026-01-23)

1.13.0

Minor Changes

  • #2882 8a5a3d5 Thanks @adboio! - add support for question prefill in popover surveys, add useThumbSurvey hook (2026-01-20)

1.12.0

Minor Changes

  • #2897 b7fa003 Thanks @matheus-vb! - Add $feature_flag_error to $feature_flag_called events to track flag evaluation failures (2026-01-20)

  • #2931 f0cbc0d Thanks @marandaneto! - chore: before_send support for web lite and react native (2026-01-20)

1.11.0

Minor Changes

  • #2900 23770e9 Thanks @dmarticus! - Renamed evaluationEnvironments to evaluationContexts for 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.init option evaluationEnvironments is now deprecated in favor of evaluationContexts. The old property will continue to work and will log a deprecation warning. It will be removed in a future major version.

    Migration Guide

     1// Before
     2posthog.init('<ph_project_api_key>', {
     3    evaluationEnvironments: ['production', 'web', 'checkout'],
     4})
     5
     6// After
     7posthog.init('<ph_project_api_key>', {
     8    evaluationContexts: ['production', 'web', 'checkout'],
     9})
    10``` (2026-01-19)
    

1.10.0

Minor Changes

  • #2881 d37e570 Thanks @adboio! - add support for thumbs up/down survey rating scale (2026-01-16)

1.9.1

Patch Changes

1.9.0

Minor Changes

1.8.1

Patch Changes

  • #2769 6b0aabf Thanks @marandaneto! - chore: move the user-agent-utils from the browser to the core package (2025-12-17)

1.8.0

Minor Changes

1.7.1

Patch Changes

  • #2690 e9c00fd Thanks @robbie-c! - Related to https://www.wiz.io/blog/critical-vulnerability-in-react-cve-2025-55182

    We 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)

1.7.0

Minor Changes

  • #2603 e1617d9 Thanks @dmarticus! - add $feature_flag_evaluated_at properties to $feature_flag_called events (2025-12-03)

1.6.0

Minor Changes

1.5.6

Patch Changes

1.5.5

Patch Changes

1.5.4

Patch Changes

1.5.3

Patch Changes

1.5.2

Patch Changes

1.5.1

Patch Changes

1.5.0

Minor Changes

  • #2520 068d55e Thanks @lricoy! - Add bot pageview collection behind preview flag. Enables tracking bot traffic as $bot_pageview events when the __preview_capture_bot_pageviews flag is enabled.

1.4.0

Minor Changes

1.3.1

Patch Changes

1.3.0

Minor Changes

  • #2417 daf919b Thanks @dmarticus! - feat: Add evaluation environments support for feature flags

    This PR adds base support for evaluation environments in the core library, allowing SDKs that extend the core to specify which environment tags their SDK instance should use when evaluating feature flags.

    The core library now handles sending the evaluation_environments parameter to the feature flags API when configured.

Patch Changes

1.2.4

Patch Changes

1.2.3

Patch Changes

1.2.2

Patch Changes

1.2.1

Patch Changes

1.2.0

Minor Changes

1.1.0

Minor Changes

1.0.2

Patch Changes

1.0.1

Patch Changes