@posthog/core
1.69.2
Patch Changes
- #5820
2cdc70cThanks @TueHaulund! - fix: reduce main-thread work when validating native gzip output (2026-11-19) - Updated dependencies [
1016d81]:- @posthog/types@1.427.0
1.69.1
Patch Changes
-
#5696
3000ae0Thanks @marandaneto! - Add extension hooks for context-safe feature flags and transient batch retention. (2026-11-18) -
#5747
59d9656Thanks @marandaneto! - Preserve falsy JSON payloads in feature flag snapshots from legacy flag responses. (2026-11-18)
1.69.0
Minor Changes
- #5407
6405dfdThanks @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/aiand@posthog/mcpshare one copy. (2026-11-17)
Patch Changes
-
#5407
6405dfdThanks @eli-r-ph! - Debug mode logs an emitted event's payload through an overridabledescribeDebugPayload, so an SDK can log a summary instead. The default is unchanged. (2026-11-17) -
#5407
6405dfdThanks @eli-r-ph! -PostHogFetchOptionshas an optionalredirectfield, so a customfetchsees how capture asks it to handle redirects. (2026-11-17) -
#5407
6405dfdThanks @eli-r-ph! - ExportV7Generator, so an SDK can generate v7 uuids from its own random source. (2026-11-17)
1.68.0
Minor Changes
- #5693
d8389d7Thanks @marandaneto! - Treat failed flag evaluations as unavailable: NodegetFeatureFlag()/isFeatureEnabled()returnundefined,getAllFlags()omits failed keys, and no failed values or payloads are exposed. (2026-11-15)
1.67.3
Patch Changes
- #5538
db28c59Thanks @andehen! - Let an SDK choose the/flagsresponse version it requests and how it reads it. SDKs that do not opt in keep requestingv=2. (2026-11-13)
1.67.2
Patch Changes
- #5672
22f3f71Thanks @lucasheriques! - fix(core): summarize the keys of a non-Errorexception in one pass, so capturing a very wide thrown object no longer takes quadratic time. (2026-11-12)
1.67.1
Patch Changes
- #5626
44e6251Thanks @luantaraschi! - Relative date filters in local flag evaluation no longer roll past the end of a shorter month.1mon March 31 now resolves to February 28, matching the flags service. (2026-11-10)
1.67.0
Minor Changes
-
#5596
9ffdaf6Thanks @DanielVisca! - feat(node): addinstrumentRequestandposthogHonoMiddlewarefor fetch-API servers (Hono, Bun, Deno, Next route handlers). They readx-posthog-session-id, wrap the request inwithContext, open a server span that continuestraceparentand is named by route, mark 5xx as errors, and recordhttp.server.request.durationandhttp.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
fee9beeThanks @DanielVisca! - feat(node): exposetraceIdandspanIdgetters on theSpanhandle, for correlating logs from other loggers with a trace without parsingtraceparent()(2026-11-10)
Patch Changes
- Updated dependencies [
b5e9b69,fee9bee]:- @posthog/types@1.423.0
1.65.0
Minor Changes
- #5594
bfbaff7Thanks @DanielVisca! - feat(node): exposetraceIdandspanIdgetters on theSpanhandle, for correlating logs from other loggers with a trace without parsingtraceparent()(2026-11-09)
Patch Changes
- #5607
fac34e4Thanks @lucasheriques! - Fix intent and payload capture bugs: a long digit run no longer drops$mcp_intentwith 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]:- @posthog/types@1.422.0
1.64.1
Patch Changes
- #5545
28fe8c0Thanks @onmax! - Parse Node stack frames for functions namedasyncwithout a leading parenthesis in the filename. (2026-11-06)
1.64.0
Minor Changes
- #5580
aa66d4cThanks @haacked! -metrics.histogram()accepts aboundsoption that sets the histogram's bucket boundaries, andbeforeSendsees 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 experimentalposthog.flags.request.durationhistogram 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
- Updated dependencies [
aa66d4c]:- @posthog/types@1.421.0
1.63.2
Patch Changes
- #5544
8ddb57fThanks @marandaneto! - Fix tree shaking of unselected extensions and shared utilities when using the slim SDK. (2026-11-05)
1.63.1
Patch Changes
- #5481
5764dddThanks @gustavohstrassburger! - Feature flags read before the user opts in to capturing now send$feature_flag_calledwhen 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
5c8f314Thanks @ablaszkiewicz! - feat:parsePostHogCookieandreadPostHogCookiereturn the session's last activity and start timestamps (2026-11-03)
1.62.1
Patch Changes
- #5505
3fbb667Thanks @majicmaj! - Recognize self-declared Lightpanda headless browsers in bot detection. (2026-11-02)
1.62.0
Minor Changes
- #5418
c705824Thanks @mayteio! -parseRetryAfterMstakes an optional cap, so a caller can read aRetry-Afterlonger than five minutes. (2026-10-30)
1.61.2
Patch Changes
- #5252
503c3eaThanks @andehen! - Document thatsendFeatureFlagEventis also the default for posthog-nodeevaluateFlags()snapshot reads. (2026-10-28)
1.61.1
Patch Changes
- #5431
96d7ff2Thanks @turnipdabeets! - DeprecategetFeatureFlags(),getFeatureFlagPayloads()andgetFeatureFlagsAndPayloads()in favor ofgetAllFeatureFlags(),onFeatureFlag()in favor ofonFeatureFlags(), thecboption ofreloadFeatureFlags()in favor ofreloadFeatureFlagsAsync(), andoverrideFeatureFlag()in favor ofupdateFlags(). In React Native, also deprecate theuseFeatureFlagWithPayload()hook in favor ofuseFeatureFlagResult(). They continue to work. (2026-10-27)
1.61.0
Minor Changes
- #5436
43ad061Thanks @turnipdabeets! - Add theprojectTokenprop toPostHogProviderand theprojectTokenproperty to the client, and deprecate theapiKeyprop and property in favor of them.apiKeykeeps working, andprojectTokenwins when both are set. (2026-10-26)
1.60.1
Patch Changes
- #5354
f827137Thanks @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
1991b99Thanks @gustavohstrassburger! - feat: report flags local evaluation could not resolve onevaluateFlags()snapshots viaunresolvedFlags, tag reads of them withlocal_evaluation_inconclusive, and warn once about flags whose definition local evaluation does not supportBehavior 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_calledevents from snapshot reads reportlocal_evaluation_inconclusiveinstead offlag_missingfor these flags.- The load-time warning now also logs with
strictLocalEvaluation: true. (2026-10-22)
1.59.4
Patch Changes
- #5365
964e736Thanks @gustavohstrassburger! - Feature flags read before the user opts in to capturing now send$feature_flag_calledthe next time they are read after opt in. (2026-10-22)
1.59.3
Patch Changes
- #5350
17260e5Thanks @marandaneto! - Fall back from local flag evaluation when a required property value is undefined. (2026-10-21)
1.59.2
Patch Changes
- #5307
189da75Thanks @quotentiroler! - Local flag evaluation now matches a null property with string operators like the flags service, so negated operators such asnot_icontainsmatch instead of failing. (2026-10-21)
1.59.1
Patch Changes
- #5300
09d4ba2Thanks @rafaeelaudibert! - Capture the Freebuff click identifier (bfcid) as a campaign parameter, so it is set on events and as$initial_bfcidlike every other ad click ID. (2026-10-14)
1.59.0
Minor Changes
- #5291
7c10169Thanks @DanielVisca! - Attach trace exemplars to metrics recorded inside sampled spans. (2026-10-13)
Patch Changes
- Updated dependencies [
7c10169]:- @posthog/types@1.416.0
1.58.1
Patch Changes
- #5281
8f2d581Thanks @marandaneto! - Fixbefore_sendcallback types to accept non-null events while still allowingnullreturns to drop events. (2026-10-12) - Updated dependencies [
8f2d581]:- @posthog/types@1.415.3
1.58.0
Minor Changes
- #5257
2788b40Thanks @turnipdabeets! - Change properties passed tocapture()and the other event methods to override SDK context properties such as$app_version,$os_nameand$lib, matching posthog-js and posthog-android (2026-10-10)
1.57.4
Patch Changes
- #5258
429b5b2Thanks @hpouillot! - Recognize native bundler debug IDs and build-time error tracking release IDs. (2026-10-09)
1.57.3
Patch Changes
- #5254
2dd9878Thanks @turnipdabeets! - Stop keeping$react_native_versionon minimal$feature_flag_calledevents (2026-10-08)
1.57.2
Patch Changes
- #5162
3132998Thanks @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
ff7582aThanks @turnipdabeets! - FixUnable to resolve module @posthog/core/surveyswhen 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
6cd5496Thanks @gesh! - Capture WebMCP tool intent and model metadata by default. (2026-10-06)
Patch Changes
- Updated dependencies [
6cd5496]:- @posthog/types@1.415.0
1.56.1
Patch Changes
- #5206
432329bThanks @turnipdabeets! - Keep$react_native_versionon minimal$feature_flag_calledevents (2026-10-05)
1.56.0
Minor Changes
- #5083
d576becThanks @61465! - Opt-in WebView bot heuristic for #2921.posthog-js/customizationsexports a newisLikelyWebViewBot(ua)helper that flags the UA pattern described in #2921 (aChrome/...token without the usualAppleWebKit/*+Safari/*co-markers that real Chrome always sends). Wire it intobefore_sendto tag or drop the matching events — seeisLikelyWebViewBotJSDoc for a usage example. Default SDK behaviour is unchanged; the helper is tree-shaken out unless you import it.@posthog/corekeepsisBlockedUAandDEFAULT_BLOCKED_UA_STRSbyte-for-byte compatible, and gains session-level memoisation ofisBlockedUAresults keyed on(ua, customBlockedUserAgents), so repeat calls within the same session are O(1). (2026-10-05)
1.55.3
Patch Changes
- #5046
c360da1Thanks @luke-belton! - Capture the OpenAI Ads click identifier (oppref) as a campaign parameter, so it is set on events and as$initial_oppreflike every other ad click ID. (2026-10-01)
1.55.2
Patch Changes
- #5078
f4704acThanks @rubychilds! - Honorfilters.holdoutduring local feature flag evaluation. A user in an experiment holdout now receives theholdout-<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, soisFeatureEnabledcan 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
9cd8ebdThanks @turnipdabeets! - Stop dropping long spans that end:maxSpanAgeMsnow evicts spans only oncemaxLiveSpansis 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
aad7464Thanks @marandaneto! - Respect the definitions response'sproperty_matching_versionduring 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]:- @posthog/types@1.412.3
1.55.0
Minor Changes
- #4904
5cfec8bThanks @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
5c12a4cThanks @yoarajota! - Coerce survey and product tour property filter values to strings before matching, so a numeric filter value from the/surveysresponse no longer throws inicontains/not_icontains(2026-09-18)
1.54.4
Patch Changes
- #4977
0257a29Thanks @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
- #5005
6545d3fThanks @marandaneto! - Fix declaration source mappings for DOMExceptionCoercer. (2026-09-17)
1.54.2
Patch Changes
- #4885
39a8980Thanks @decknamec! - Server-side feature flags now resolve in posthog-node and posthog-edge even when a proxy rewrites the request'sUser-Agent. Flags restricted to theclientruntime now resolve toundefinedin these SDKs, where a rewrittenUser-Agentpreviously let them through. (2026-09-15)
1.54.1
Patch Changes
- #4941
07c1045Thanks @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
3c68c08Thanks @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
3786cffThanks @Mnigos! - Require final 2xx responses for successful writes while preserving immediate-call error handling. (2026-09-14)
1.53.2
Patch Changes
- #4899
18ae6bbThanks @marandaneto! - Share the trySafe utility through @posthog/core. (2026-09-11)
1.53.1
Patch Changes
- #4908
4a3c74bThanks @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
19e78ccThanks @turnipdabeets! - Add experimental distributed tracing toposthog-node:startSpan,withSpanandgetActiveSpanrecord spans against a newtracesclient option. A service with tracing off still forwards an inboundtraceparent, including from spans nested inside the one that received it, so a distributed trace is not severed. Atraceparentmay be passed as the one-element arrayreq.headersDistinctgives. AbeforeSpanSendhook sees every span before it is exported and may edit or drop it, andmaxAttributesPerSpan,maxEventsPerSpan,maxAttributeValueLength,maxLiveSpansandmaxSpanAgeMsbound what a single span and a single process may hold. (2026-09-10)
Patch Changes
-
#4579
19e78ccThanks @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
19e78ccThanks @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
19e78ccThanks @turnipdabeets! - Stop a throwing getter inmetrics.resourceAttributesfrom breaking every metrics export — the key is recorded as[Unserializable]instead. (2026-09-10) -
#4579
19e78ccThanks @turnipdabeets! - HonorRetry-Afterwhen 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
19e78ccThanks @turnipdabeets! - Logs and metrics now always sendservice.nameandtelemetry.sdk.*, even when aresourceAttributesvalue 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
19e78ccThanks @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]:- @posthog/types@1.411.0
1.52.2
Patch Changes
- #4887
0da006cThanks @posthog! - Error tracking no longer counts an injected script as your own code. A stack frame isin_apponly 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 oniabjs://or an extension content script onchrome-extension://, is kept for context but no longer groups the issue under your code. (2026-09-10)
1.52.1
Patch Changes
- #4880
412c97cThanks @marandaneto! - Fix recording package exports, native ESM loading, and strict TypeScript 4.7 consumer compatibility. (2026-09-10)
1.52.0
Minor Changes
- #4869
891eefaThanks @robbie-c! - Add a shared isUrl helper for HTTP(S) URLs and explicit relative paths. (2026-09-09)
Patch Changes
- Updated dependencies [
891eefa]:- @posthog/types@1.409.4
1.51.2
Patch Changes
- #4859
c356c81Thanks @marandaneto! - Include the root license and attribution notices in the published core package. (2026-09-09)
1.51.1
Patch Changes
- #4798
4358915Thanks @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
3a5b322Thanks @marandaneto! - Add best-effort in-app browser attribution using$webview_appand$webview_app_version, without changing existing$browseror$browser_versionvalues. 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
74ca945Thanks @marandaneto! - Clarify feature flag return-value terminology across SDK APIs. Afalsevalue is a conclusive off evaluation, whileundefinedmeans no evaluation is available. Remote evaluation omits globally inactive flags, whereas backend local evaluation can resolve cached inactive definitions tofalse. (2026-09-07) - Updated dependencies [
74ca945,5e74132]:- @posthog/types@1.409.1
1.50.5
Patch Changes
- #4782
b64b113Thanks @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]:- @posthog/types@1.409.0
1.50.4
Patch Changes
- #4759
c475070Thanks @marandaneto! - Preserve explicitly false feature flag values supplied through bootstrap configuration. (2026-09-03)
1.50.3
Patch Changes
- #4753
dbbb58eThanks @Ashishjob! - FixclampToRangediscarding a valid fallback value of0. It usedfallbackValue || max, so a0fallback (a legitimate value) was treated as absent and replaced bymax; it now uses??so0is honored. (2026-09-03) - Updated dependencies [
41ed3af]:- @posthog/types@1.408.1
1.50.2
Patch Changes
- #4727
ec9354cThanks @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
e87820aThanks @turnipdabeets! - Addos.nameandos.versionresource attributes to logs from the browser SDK, overridable vialogs.resourceAttributes(2026-09-01)
1.50.0
Minor Changes
-
#4663
6ae173fThanks @pauldambra! - Detect the Claude, Codex, and ChatGPT apps from their user agent markers:$browsernow reports the app name instead ofChrome.ChatGPT versions its apps differently per platform, so its
$browser_versionis not comparable across platforms. (2026-09-01)
Patch Changes
-
#4661
444bf35Thanks @marandaneto! - Match local feature flag string operators, exact-value coercion, and JSON stringification with the flags service. (2026-09-01) -
#4708
6723395Thanks @turnipdabeets! - Changebigintattributes on logs, metrics and spans to send as an int64 rather than as a string. (2026-09-01)
1.49.2
Patch Changes
- #4626
3c650a1Thanks @nandinitiw! - Re-translate popover surveys when the display language changes while the survey is on screen, either from a browserlanguagechangeevent or fromidentify()updating thelanguageperson property. In-progress answers are preserved.$survey_questions[].questionand$survey_languageonsurvey sent/survey dismissednow 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
74ff567Thanks @yfwmaniish! - Narrow thepinterestentry in the bot-detection blocklist topinterestbot, so real users on Pinterest's in-app browser (whose UA also contains the substringpinterest) are no longer misclassified as bots and silently excluded from analytics. The crawler's other UA variant remains covered by the existing genericbot.htmentry, so no bot-detection coverage is lost. (2026-08-27)
1.49.0
Minor Changes
- #4036
718beeeThanks @emmayusufu! - AddcapturedAttoPostHogLogs.captureLog()for stamping a record with the time and context of when the event occurred, andPostHogLogs.clearQueue()for dropping every queued record (2026-08-27)
Patch Changes
- #4653
712223aThanks @posthog! - Fix request timeouts never firing on pages where a browser extension makesError.prototype.namenon-writable (2026-08-27)
1.48.12
Patch Changes
-
#4616
7902e44Thanks @shahidrogers! - Stop crashing when the environment'sMath.random()misbehaves. The vendored UUIDv7 generator builds its random fields from aMath.random()-basednextUint32(), and a nonconformant implementation that returns a value of 1 or greater, or NaN, pushed those fields out of range, sofromFieldsV7threwRangeError: invalid field valueon every event captured. On React Native this is not hypothetical: Hermes implementsMath.randomwith 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
e899b1cThanks @marandaneto! - Treat omitted local evaluation properties as inconclusive foris_not_set. (2026-08-27)
1.48.11
Patch Changes
-
#4610
930de19Thanks @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
d4eee8fThanks @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
be299dfThanks @turnipdabeets! - Fix buffered logs being dropped instead of retried after HTTP 408, 429 or 5xx (2026-08-24)
1.48.9
Patch Changes
- #4614
3593c43Thanks @iamomiid! - The Node SDK now sends the raw gzip bytes as the request body instead of wrapping them in aBlob. On Node 24.16 and later, reading aBlobrequest body leaks a nativeBlobReaderthat is never released, so a service callingcapture()andflush()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 tonode:zlibremoved 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 usingCompressionStream. (2026-08-24)
1.48.8
Patch Changes
- #4581
556d235Thanks @turnipdabeets! - FixreloadFeatureFlagsandreloadFeatureFlagsAsyncreturning 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
6322f09Thanks @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]. TypeOtlpAnyValue.intValueasstring | number— code reading that field must handle both. (2026-08-21) - Updated dependencies [
6322f09]:- @posthog/types@1.405.1
1.48.6
Patch Changes
-
#4578
bae46bfThanks @marandaneto! - Drop events when a before-send hook throws instead of sending the unmodified event. (2026-08-20) -
#4582
aef2f49Thanks @ablaszkiewicz! - Stop building a stack frame for awindow.onerrorreport that carries no code position, such as theResizeObserverloop 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
9701637Thanks @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
3f9ba71Thanks @posthog! - Fall back to the synthetic exception stack when a capturedErrorhas no stack, so frameless failures (such as a Firefox networkfetchTypeError) 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
0599fe0Thanks @ablaszkiewicz! - Recognise Firefox and Safari extension frames when filtering extension exceptions, and stop counting Safari's maskedwebkit-masked-url://frames as in-app code. (2026-08-18)
1.48.2
Patch Changes
- #4413
7b61aa4Thanks @posthog! - Fix error tracking coercion reporting the wrong exception type for non-Errorobjects (e.g.TypeError,ReferenceError) that are thrown by browser extensions or other cross-realm code. Previously these always reported as typeError, burying the real type in the message string. Also fixed a localisErrorhelper 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
0a0206fThanks @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]:- @posthog/types@1.404.1
1.48.0
Minor Changes
- #4289
c9086deThanks @carlos-marchal-ph! - Public betacaptureAi()/captureAiImmediate(): AI events on a dedicated isolated endpoint with the event UUID returned. NewenableFullAiCaptureoption 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
- Updated dependencies [
b2c6830]:- @posthog/types@1.403.1
1.47.1
Patch Changes
- #4506
a77115bThanks @marandaneto! - Log shutdown timeouts without rejecting, and correct the Node.jsshutdown()return type toPromise<void>. (2026-08-12)
1.47.0
Minor Changes
-
#4436
80f15a3Thanks @jakesciotto! - feat(surveys): optional intro screen shown before the first questionSurveys can now display an intro screen before question 1, configured via the new
displayIntroScreen,introScreenHeader,introScreenDescription,introScreenDescriptionContentType, andintroScreenButtonTextappearance 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.renderSurveysPreviewacceptspreviewPageIndex: -1(exported asINTRO_SCREEN_PREVIEW_INDEX) to preview the intro screen. (2026-08-10)
1.46.9
Patch Changes
- #4423
64ba193Thanks @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]:- @posthog/types@1.402.2
1.46.8
Patch Changes
- #4380
3c40b6cThanks @marandaneto! - Keep request timeouts active through response body consumption and clarify eventual event UUID deduplication semantics. (2026-08-05) - Updated dependencies [
3c40b6c]:- @posthog/types@1.401.1
1.46.7
Patch Changes
- #4287
d3c4538Thanks @posthog! - Keep$referring_domainand canonicalutm_*/campaign parameters on minimal$feature_flag_calledevents. 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]:- @posthog/types@1.401.0
1.46.6
Patch Changes
- #4363
821a2c6Thanks @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
7db0e8cThanks @hpouillot! - Preserve messages, source locations, and existing stacks from browser errors that do not provide a same-realmErrorobject. (2026-08-03)
1.46.4
Patch Changes
- #4381
f3a71a1Thanks @marandaneto! - Clear completed lifecycle timeout handles so successful shutdowns do not leave timers running. (2026-08-03)
1.46.3
Patch Changes
- #4155
eb0a793Thanks @ATKasem! - fix:personPropertiesandgroupPropertieson the feature flag methods are no longer typed asRecord<string, string>, so numeric and boolean values type-check without a cast. Local evaluation already handled them —matchPropertytakesRecord<string, any>and compares numerically forgt/gte/lt/lte— only the public types disagreed. These now use the sharedPropertiestype (personProperties?: Properties,groupProperties?: Record<string, Properties>), matchingsetPersonPropertiesForFlags/setGroupPropertiesForFlagsso theanycan be narrowed later. Types only, no runtime change. (2026-08-03)
1.46.2
Patch Changes
- #4347
7c3a9afThanks @marandaneto! - Preserve events added to a full queue while an earlier batch is being flushed. (2026-08-03)
1.46.1
Patch Changes
- #4332
b9a241eThanks @ioannisj! - Fixidentify()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$setevent 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
6e7f3aeThanks @ablaszkiewicz! - Emit the release id that posthog-cli injects into your bundle as$release_idon$exceptionevents, so PostHog can attach exceptions to a release without joining through symbol sets. AddsgetInjectedReleaseId()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
3bd8a2dThanks @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
c7099e9Thanks @lucasheriques! - fix(surveys): only wait for feature flags on surveys that repeatSurveys 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
6c8fde0Thanks @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
0f2407bThanks @turnipdabeets! - feat: add a default-value option toisFeatureEnabledisFeatureEnabled(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 toboolean. The option name is the same in posthog-js, posthog-js-lite, and posthog-react-native. WithoutdefaultValue, behavior is unchanged:boolean | undefined. (2026-07-22)
Patch Changes
- Updated dependencies [
0f2407b]:- @posthog/types@1.398.0
1.44.0
Minor Changes
-
#4172
9621830Thanks @haacked! - send minimal$feature_flag_calledevents when the server enables itWhen the v2
/flagsresponse carriesminimalFlagCalledEvents: true(or, for posthog-node local evaluation, the flag-definitions payload carriesminimal_flag_called_events: true) and the evaluated flag is not linked to an experiment ($feature_flag_has_experiment === false),$feature_flag_calledevents 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_experimentunknown) 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_sendruns after the filter and may re-add stripped properties. (2026-07-20)
1.43.1
Patch Changes
- #4168
06d19a2Thanks @dustinbyrne! - Avoid Next.js Edge runtime warnings for native compression and fatal error handling. (2026-07-16)
1.43.0
Minor Changes
-
#4159
fad6d9aThanks @haacked! - add$feature_flag_has_experimentto$feature_flag_calledevents$feature_flag_calledevents now carry a$feature_flag_has_experimentboolean sourced from the server'shas_experimentflag metadata (the/flags?v=2response for remote evaluation, the/api/feature_flag/local_evaluationdefinitions for posthog-node local evaluation). The property is only sent when the server explicitly reportshas_experiment; it is omitted entirely when the value is unknown (older servers, missing metadata, bootstrapped or locally injected flags). (2026-07-16)
Patch Changes
- Updated dependencies [
fad6d9a]:- @posthog/types@1.396.0
1.42.1
Patch Changes
- #4153
fc2cb2eThanks @eli-r-ph! - Log awarn(previouslyinfo) 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
1eddff7Thanks @DanielVisca! - add the posthog.metrics API (count, gauge, histogram) to posthog-node — alphaBackend 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 onshutdown(). Core gains_sendMetricsBatchonPostHogCoreStateless(same outcome contract as_sendLogsBatch) and a sharedresolveMetricsConfig, so any core-based SDK can hostPostHogMetrics. (2026-07-15)
1.41.1
Patch Changes
- #4090
6dd8827Thanks @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.Popoveras a type); use the exported union types instead. Runtime values are unchanged. (2026-07-14)
1.41.0
Minor Changes
- #4101
dc2aa5bThanks @posthog! - Normalize the error tracking rate-limiter config to first-class options. The browser SDK now readsexceptionRateLimiterRefillRate/exceptionRateLimiterBucketSizeonerror_tracking, with the previous double-underscore__exceptionRateLimiterRefillRate/__exceptionRateLimiterBucketSizeoptions deprecated but still honoured as a fallback. The option shape (ExceptionRateLimiterConfig) and default-resolution logic (resolveExceptionRateLimiterConfig) now live in@posthog/coreand are shared between the browser and Node SDKs. (2026-07-14)
Patch Changes
- Updated dependencies [
dc2aa5b]:- @posthog/types@1.394.0
1.40.2
Patch Changes
- #4105
203284aThanks @eli-r-ph! - Extract the/batch/submission out of_flush()andsendImmediate()into a single overridableprotected sendBatch()seam onPostHogCoreStateless, and widenrequestTimeout/historicalMigrationtoprotected. 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 anAiQueuepersisted-property key and arouteargument onsendBatch. 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 inposthog-node, where$ai_*events stay on the legacy transport isolated from the V1 route. (2026-07-11)
1.40.1
Patch Changes
-
#4121
e6b5ab2Thanks @dustinbyrne! - Prevent shutdown from looping forever when a flush makes no queue progress. (2026-07-09) -
#4120
d0e531aThanks @dustinbyrne! - Coalesce concurrent flush requests to avoid chaining redundant flushes while offline. (2026-07-09)
1.40.0
Minor Changes
-
#4115
86bb3a5Thanks @DanielVisca! - add the posthog.metrics API (count, gauge, histogram) — alphaA 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
- Updated dependencies [
86bb3a5]:- @posthog/types@1.393.0
1.39.6
Patch Changes
- #4059
532f2c3Thanks @jiuyige! - Add per-call sendEvent option support to React Native feature flag helpers. (2026-07-02)
1.39.5
Patch Changes
- #4048
5e7e132Thanks @turnipdabeets! - fix: feature-flag properties ($feature/*and$active_feature_flags) passed explicitly tocapture()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
64e04baThanks @marandaneto! - Retry/flagsrequests 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
a664b81Thanks @marandaneto! - Make Nodeflush()wait for pending asynchronous SDK work before draining the event queue, so events produced by helpers likecaptureException()are not missed. Pending work rejections no longer prevent queued events from flushing. (2026-07-01)
1.39.2
Patch Changes
- #4027
ab118d2Thanks @marandaneto! - Safely serialize event batches with circular property references instead of crashing during flush. (2026-06-30)
1.39.1
Patch Changes
- #3998
0c95bceThanks @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
0063128Thanks @github-actions! - AddgroupIdentifyImmediate()to await the network request when identifying a group, mirroringcaptureImmediate/identifyImmediate/aliasImmediate. Useful in edge/serverless environments where the background queue may not flush. The Convex integration now uses it directly instead of routing$groupidentifythroughcaptureImmediate. (2026-06-30)
1.38.1
Patch Changes
- #3961
619a25cThanks @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
6200888Thanks @turnipdabeets! - AddgetAllFeatureFlags(), which returns all currently loaded feature flags as structuredFeatureFlagResults (key,enabled,variant,payload). It is a synchronous read of the cached flags and does not send a$feature_flag_calledevent. (2026-06-26)
1.37.3
Patch Changes
- #3955
8e9689aThanks @marandaneto! - Dedupe feature flag called events per returned flag value. (2026-06-24)
1.37.2
Patch Changes
- #3942
c9c8925Thanks @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
bf6947dThanks @ioannisj! - Support session replay event triggers in React Native. Recording stays paused until the client captures an event whose name matches a server-configuredsessionRecording.eventTriggersentry, 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
440e370Thanks @ioannisj! - DeprecatedisableRemoteConfig. 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 experimentaldisableSurveysandmaskAllSandboxedViewsoptions to GA. (2026-06-23)
1.36.0
Minor Changes
-
#3921
c28b161Thanks @marandaneto! - Adddisable_capture_url_hashesto strip URL fragments from automatically captured URLs. It is disabled by default for backwards compatibility, and enabled automatically whenconfig.defaultsis'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, replayhrefURLs, heatmaps, web vitals$current_url, logsurl.full, conversationscurrent_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_sendto remove or redact sensitive hash values before events are sent. (2026-06-23)
Patch Changes
- Updated dependencies [
c28b161]:- @posthog/types@1.391.0
1.35.4
Patch Changes
-
#3895
ce528edThanks @turnipdabeets! - Console log auto-capture (logs: { captureConsoleLogs: true }) now flows through the same pipeline asposthog.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 ascaptureLog/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'slog.sourceattribute: auto-captured console logs set it toconsole.<method>(e.g.console.error), while manualcaptureLog/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 useddistinct_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-logsservice.name, theirconsoleinstrumentation scope, and theirlog.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 movedhostandwindow.idmove 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.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)
1.35.3
Patch Changes
- #3903
6b21f77Thanks @marandaneto! - Validate custom event UUID overrides and generate new UUIDs when invalid. (2026-06-19) - Updated dependencies [
6b21f77]:- @posthog/types@1.390.2
1.35.2
Patch Changes
- #3886
e6d7fe2Thanks @marandaneto! - Stop sending deprecated no-op top-leveltype,library, andlibrary_versionfields in event batch payloads. Useproperties.$libandproperties.$lib_versionfor SDK metadata; legacy queuedlibraryandlibrary_versionvalues are used as fallbacks when the official$properties are missing. (2026-06-18)
1.35.1
Patch Changes
- #3876
d7b1a03Thanks @turnipdabeets! - DeprecategetFeatureFlagPayloadin favor ofgetFeatureFlagResult, which returns the flag value and payload from a single evaluation.getFeatureFlagPayloadcontinues to work. (2026-06-17)
1.35.0
Minor Changes
- #3865
b469830Thanks @turnipdabeets! - The browser's programmatic logs API (posthog.captureLog()/posthog.logger.*) now runs through the shared@posthog/corelogs 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
- Updated dependencies [
b469830]:- @posthog/types@1.389.0
1.34.0
Minor Changes
-
#3848
bd07ec4Thanks @turnipdabeets! - Add adisableRemoteFeatureFlagsoption and a publicupdateFlags(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(), andreset()stop triggering/flagsrequests — whilegetFeatureFlag()andgetFeatureFlagPayload()keep working against the values you supply. Provide those values (with optional payloads) at runtime viaupdateFlags(flags, payloads?, { merge }); they persist across restarts. This mirrors the web SDK'sadvanced_disable_feature_flagsandupdateFlags. (2026-06-17)
1.33.0
Minor Changes
- #3709
c6c163aThanks @posthog! - AddunsetPersonProperties()to remove person properties, the counterpart tosetPersonProperties(). Previously the only way to unset a person property was to hand-pass a$unsetarray inside acapture()call. (2026-06-16)
Patch Changes
- #3756
b3ec845Thanks @archievi! - Drop the event and log a warning when abefore_sendhook removes thetokenproperty, instead of silently sending an event that ingest rejects with a 401. (2026-06-16) - Updated dependencies [
c9c7df1,c6c163a]:- @posthog/types@1.387.0
1.32.5
Patch Changes
- #3828
8464c92Thanks @turnipdabeets! - fix: persist the session replay config from a/flagsresponse before emitting thefeatureflagsevent, 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 byposthog-react-nativeand@posthog/web); the event payload is unchanged, andposthog-nodeand the browserposthog-jspackage do not use this code path. (2026-06-15)
1.32.4
Patch Changes
- #3837
29bf8e3Thanks @marandaneto! - Add missing bugs metadata to package manifests. (2026-06-15) - Updated dependencies [
29bf8e3]:- @posthog/types@1.386.4
1.32.3
Patch Changes
- Updated dependencies [
dbf2377]:- @posthog/types@1.386.3
1.32.2
Patch Changes
- #3799
25822acThanks @turnipdabeets! - fix(logs): when a logsbeforeSendhook 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 []:
- @posthog/types@1.386.2
1.32.1
Patch Changes
- Updated dependencies []:
- @posthog/types@1.386.1
1.32.0
Minor Changes
-
#3634
612f97aThanks @lucasheriques! - feat(surveys): add opt-inappearance.allowGoBackfor multi-question surveys, and make button labels translatableRenders 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.backButtonTextoverrides 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
submitButtonTextandbackButtonTextto survey-level translations, so both the submit and back button labels can be localized viaappearancetranslations (previously only the per-question button text was translatable). (2026-06-10)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.386.0
1.31.4
Patch Changes
- Updated dependencies [
c11794d,f601c49]:- @posthog/types@1.385.0
1.31.3
Patch Changes
- Updated dependencies [
2d21ada]:- @posthog/types@1.384.3
1.31.2
Patch Changes
- Updated dependencies [
d9462b3]:- @posthog/types@1.384.2
1.31.1
Patch Changes
- Updated dependencies []:
- @posthog/types@1.384.1
1.31.0
Minor Changes
-
#3782
0c2acb9Thanks @pauldambra! - Detect the Google Search App (GSA) as its own$browservalue (Google Search App) via the cross-platformGSA/UA marker, instead of reporting the embedded webview as Mobile Safari (iOS) or Chrome (Android). Gated behind the newdetect_google_search_appconfig option, which the2026-05-30config defaults opt into automatically — left off otherwise to keep existing browser attribution backwards-compatible.Note:
$browser_versionforGoogle Search Appis not comparable across platforms — iOS yields a version like284.0(fromGSA/284.0.564099828) while Android yields a version like14.21(fromGSA/14.21.20.28.arm64), since Google maintains separate versioning schemes for the two apps. Avoid building cross-platform version dashboards on$browser_versionfor this browser. (2026-06-10)
Patch Changes
- Updated dependencies [
0c2acb9]:- @posthog/types@1.384.0
1.30.14
Patch Changes
- Updated dependencies [
783ba46]:- @posthog/types@1.383.3
1.30.13
Patch Changes
- Updated dependencies []:
- @posthog/types@1.383.2
1.30.12
Patch Changes
- Updated dependencies []:
- @posthog/types@1.383.1
1.30.11
Patch Changes
- Updated dependencies [
227c9b0,393f9e2]:- @posthog/types@1.383.0
1.30.10
Patch Changes
- Updated dependencies []:
- @posthog/types@1.382.0
1.30.9
Patch Changes
- Updated dependencies [
a7bd828]:- @posthog/types@1.381.0
1.30.8
Patch Changes
- Updated dependencies []:
- @posthog/types@1.380.1
1.30.7
Patch Changes
- Updated dependencies [
2387084]:- @posthog/types@1.380.0
1.30.6
Patch Changes
- Updated dependencies []:
- @posthog/types@1.379.3
1.30.5
Patch Changes
- Updated dependencies []:
- @posthog/types@1.379.2
1.30.4
Patch Changes
- Updated dependencies []:
- @posthog/types@1.379.1
1.30.3
Patch Changes
- Updated dependencies []:
- @posthog/types@1.379.0
1.30.2
Patch Changes
- Updated dependencies []:
- @posthog/types@1.378.1
1.30.1
Patch Changes
- Updated dependencies [
8181354]:- @posthog/types@1.378.0
1.30.0
Minor Changes
-
#3708
3d4a76fThanks @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/detectBrowserVersionnow accept an optional third argument,BrowserDetectionHints, with abraveflag (set whennavigator.braveexists). 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 theBrave/UA marker — WebKit doesn't shipnavigator.brave. The original two-argument signature still works for non-DOM callers. (2026-06-01)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.377.0
1.29.15
Patch Changes
- Updated dependencies []:
- @posthog/types@1.376.6
1.29.14
Patch Changes
- #3694
d9ad199Thanks @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 viaString(value), causing flag conditions using boolean equality or arraycontainsto fail on device while the PostHog UI still evaluated correctly. (2026-05-31) - Updated dependencies []:
- @posthog/types@1.376.5
1.29.13
Patch Changes
- #3681
7b84b75Thanks @ablaszkiewicz! - unify captureException in posthog core (2026-05-28) - Updated dependencies []:
- @posthog/types@1.376.4
1.29.12
Patch Changes
- Updated dependencies []:
- @posthog/types@1.376.3
1.29.11
Patch Changes
- Updated dependencies []:
- @posthog/types@1.376.2
1.29.10
Patch Changes
- #3665
5568f12Thanks @ioannisj! - Don't autocapture PostHog's ownPostHogFetchNetworkError(raised when the device is offline) as a$exception. These connectivity failures are expected and were flooding error tracking with internal SDK noise. Adds anisPostHogFetchNetworkErrortype guard to@posthog/coreso SDKs can detect these errors. (2026-05-26) - Updated dependencies []:
- @posthog/types@1.376.1
1.29.9
Patch Changes
- #3639
c806ccaThanks @marandaneto! - Use native async gzip compression for session recording events when CompressionStream is available. (2026-05-22) - Updated dependencies []:
- @posthog/types@1.376.0
1.29.8
Patch Changes
- Updated dependencies [
2e1d5f4]:- @posthog/types@1.375.0
1.29.7
Patch Changes
- Updated dependencies []:
- @posthog/types@1.374.4
1.29.6
Patch Changes
- #3581
a880dbcThanks @Ashut0sh-mishra! - Detect Oculus Browser (Meta Quest headsets) correctly instead of falling back to Chrome (2026-05-20) - Updated dependencies [
557b893]:- @posthog/types@1.374.3
1.29.5
Patch Changes
- Updated dependencies []:
- @posthog/types@1.374.2
1.29.4
Patch Changes
- Updated dependencies []:
- @posthog/types@1.374.1
1.29.3
Patch Changes
- Updated dependencies [
594ea11]:- @posthog/types@1.374.0
1.29.2
Patch Changes
- Updated dependencies []:
- @posthog/types@1.373.5
1.29.1
Patch Changes
- #3602
4b895bfThanks @marandaneto! - Validate gzip request bodies at the browser send boundary and fall back to JSON if the outgoing body is not gzip data. (2026-05-12) - Updated dependencies []:
- @posthog/types@1.373.4
1.29.0
Minor Changes
- #3599
ad60818Thanks @turnipdabeets! - Expose UUID and cookie helpers from@posthog/coreandposthog-nodefor 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/nextnow re-exports the same surface from@posthog/coreto keep existing consumers working without churn. Closes #2143. (2026-05-12)
Patch Changes
- Updated dependencies []:
- @posthog/types@1.373.3
1.28.7
Patch Changes
- #3568
223d925Thanks @marandaneto! - Validate native gzip output before sending requests and fall back when CompressionStream returns malformed data. (2026-05-11) - Updated dependencies []:
- @posthog/types@1.373.2
1.28.6
Patch Changes
- Updated dependencies []:
- @posthog/types@1.373.1
1.28.5
Patch Changes
- Updated dependencies [
4c0c7d9,0a835fa]:- @posthog/types@1.373.0
1.28.4
Patch Changes
- Updated dependencies []:
- @posthog/types@1.372.10
1.28.3
Patch Changes
- Updated dependencies []:
- @posthog/types@1.372.9
1.28.2
Patch Changes
-
#3516
220cd61Thanks @marandaneto! - fix: consume fetch response body to prevent CF Workers runtime warnings (2026-05-04) -
#3515
255b273Thanks @marandaneto! - Gate survey translation logs behind SDK debug logging to avoid production console spam. (2026-05-04) -
Updated dependencies []:
- @posthog/types@1.372.8
1.28.1
Patch Changes
- #3512
8aee3d5Thanks @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 []:
- @posthog/types@1.372.7
1.28.0
Minor Changes
-
#3492
cf56753Thanks @lucasheriques! - Add translated survey rendering support in React Native and share survey translation logic through@posthog/core. (2026-05-01) -
#3480
04db756Thanks @turnipdabeets! - Add manual log capture API for React Native:posthog.captureLog(),posthog.logger.{trace,debug,info,warn,error,fatal}(),posthog.flushLogs(), and alogsconfig 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/emptybody, and missing API key. The wire fieldresponse.logs.captureConsoleLogsis browser-only (it gates the JS SDK'sconsole.*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
- Updated dependencies []:
- @posthog/types@1.372.6
1.27.9
Patch Changes
- Updated dependencies []:
- @posthog/types@1.372.5
1.27.8
Patch Changes
- Updated dependencies []:
- @posthog/types@1.372.4
1.27.7
Patch Changes
- Updated dependencies []:
- @posthog/types@1.372.3
1.27.6
Patch Changes
- Updated dependencies []:
- @posthog/types@1.372.2
1.27.5
Patch Changes
- #3464
70508dfThanks @dustinbyrne! - Avoid usingBlob.stream()for native async gzip compression to prevent SafariNotReadableErrorstream failures. (2026-04-24) - Updated dependencies []:
- @posthog/types@1.372.1
1.27.4
Patch Changes
- Updated dependencies []:
- @posthog/types@1.372.0
1.27.3
Patch Changes
- Updated dependencies []:
- @posthog/types@1.371.4
1.27.2
Patch Changes
- #3437
daf028dThanks @dustinbyrne! - Disable the core client instead of throwing when the API key is missing, blank, or invalid. (2026-04-24) - Updated dependencies []:
- @posthog/types@1.371.3
1.27.1
Patch Changes
- #3453
96f19b7Thanks @turnipdabeets! - Lift OTLP log serialization helpers from posthog-js into @posthog/core so the upcoming React Native logs feature consumes the same builders. Browser gains two fixes as a side effect: NaN and ±Infinity attribute values no longer get silently dropped during JSON encoding, and the scope.version OTLP field is now populated with the SDK version (changes the server's instrumentation_scope column from "posthog-js@" to "posthog-js@ - Updated dependencies [
96f19b7]:- @posthog/types@1.371.2
1.27.0
Minor Changes
-
#3432
1a8b727Thanks @richardsolomou! - refactor: rename__add_tracing_headerstoaddTracingHeaders. The__prefix signalled an internal/experimental option, but the config is a public API (documented for linking LLM traces to session replays).__add_tracing_headerscontinues to work as a deprecated alias on the browser SDK.Also exposes
patchFetchForTracingHeadersfrom@posthog/coreso non-browser SDKs can reuse the implementation. (2026-04-23)
1.26.0
Minor Changes
- #3389
922a1c1Thanks @hpouillot! - Add exception steps to error tracking (aka breadcrumbs) (2026-04-22)
1.25.3
Patch Changes
- #3426
1a0b58dThanks @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
c735b08Thanks @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
57ee5b2Thanks @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
- #3302
fc5589fThanks @dmarticus! - preserve $set_once semantics in local flag evaluation cache (2026-04-07)
1.24.6
Patch Changes
- #3320
a01a3d5Thanks @dustinbyrne! - fix: send $groupidentify for new groups even when no properties are provided (2026-04-02)
1.24.5
Patch Changes
- #3309
197eedaThanks @marandaneto! - Extract CLI and sourcemap utilities from @posthog/core into @posthog/plugin-utils to remove cross-spawn from React Native dependencies (2026-04-01)
1.24.4
Patch Changes
- #3296
a863914Thanks @marandaneto! - FixcaptureExceptioncrashing in React Native withReferenceError: Property 'Event' doesn't exist(2026-03-30)
1.24.3
Patch Changes
- #3292
4bdfdbcThanks @marandaneto! - Add@defaultJSDoc tags toPostHogCoreOptionsconfiguration properties for better IDE documentation and discoverability. (2026-03-27)
1.24.2
Patch Changes
- #3286
8d34289Thanks @marandaneto! - Use async native CompressionStream for gzip compression to avoid blocking the main thread (2026-03-27)
1.24.1
Patch Changes
- #3265
314120aThanks @hpouillot! - fix sourcemap upload with stdin, clean config (2026-03-20)
1.24.0
Minor Changes
- #3246
9cd2313Thanks @hpouillot! - pipe chunk file path to stdin (2026-03-18)
1.23.4
Patch Changes
-
#3236
bc30c2dThanks @dustinbyrne! - fix: Clean up leaked timers in edge runtimes (2026-03-13) -
#3236
bc30c2dThanks @dustinbyrne! - Omit the config query parameter by default to request only the necessary data (2026-03-13)
1.23.3
Patch Changes
- #3220
4009c15Thanks @ablaszkiewicz! - add better handling for CustomEvent inside unhandled rejections (2026-03-11)
1.23.2
Patch Changes
- #3185
5e8d5fcThanks @marandaneto! - fix: export getRemoteConfigBool, getRemoteConfigNumber, and isValidSampleRate from @posthog/core (2026-03-02)
1.23.1
Patch Changes
- #3107
9dbc05eThanks @ablaszkiewicz! - warning on manual capture('$exception') (2026-02-18)
1.23.0
Minor Changes
- #3086
e962f01Thanks @marandaneto! - feat: support remote config for error tracking, session replay capture performance and capture logs (2026-02-17)
1.22.0
Minor Changes
- #3045
0acf16fThanks @dustinbyrne! - feat: AddgetFeatureFlagResultto PostHogCore (2026-02-10)
1.21.0
Minor Changes
- #2820
d578824Thanks @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
e055f9aThanks @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
- #3039
8f75daeThanks @hpouillot! - fix(err): fix console error capturing (2026-02-06)
1.20.0
Minor Changes
- #3023
bb62809Thanks @marandaneto! - feat: only capture $set events if the user properties have changed (2026-02-04)
1.19.0
Minor Changes
- #3009
c99e5feThanks @marandaneto! - feat: add setPersonProperties method (2026-02-03)
1.18.0
Minor Changes
- #2996
7768010Thanks @matheus-vb! - Filter out flags marked as failed before merging with cached values, preventing transient backend errors from overwriting previously evaluated flag states (2026-02-03)
1.17.0
Minor Changes
1.16.0
Minor Changes
- #2967
cbe84c1Thanks @adboio! - support auto-submit on selection for survey rating questions (2026-01-29)
1.15.0
Minor Changes
- #2984
8c0c495Thanks @ablaszkiewicz! - include possible pnpm bin path (2026-01-28)
1.14.1
Patch Changes
- #2971
f51560cThanks @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
933c763Thanks @marandaneto! - feat: add support for person_profiles react native, core and web-lite (2026-01-23)
1.13.0
Minor Changes
- #2882
8a5a3d5Thanks @adboio! - add support for question prefill in popover surveys, add useThumbSurvey hook (2026-01-20)
1.12.0
Minor Changes
-
#2897
b7fa003Thanks @matheus-vb! - Add $feature_flag_error to $feature_flag_called events to track flag evaluation failures (2026-01-20) -
#2931
f0cbc0dThanks @marandaneto! - chore: before_send support for web lite and react native (2026-01-20)
1.11.0
Minor Changes
-
#2900
23770e9Thanks @dmarticus! - RenamedevaluationEnvironmentstoevaluationContextsfor clearer semantics. The term "contexts" better reflects that this feature is for specifying evaluation contexts (e.g., "web", "mobile", "checkout") rather than deployment environments (e.g., "staging", "production").Deprecated
posthog.initoptionevaluationEnvironmentsis now deprecated in favor ofevaluationContexts. The old property will continue to work and will log a deprecation warning. It will be removed in a future major version.
Migration Guide
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
1.9.1
Patch Changes
-
#2593
fba9fb2Thanks @daibhin! - track LLMA trace_id on exceptions and exception_id on traces (2026-01-08) -
#2856
c1ed63bThanks @marandaneto! - chore: expose default stack parser creator (2026-01-08)
1.9.0
Minor Changes
- #2787
b676b4dThanks @lucasheriques! - feat: allow customizing text colors on web and react native (2025-12-22)
1.8.1
Patch Changes
- #2769
6b0aabfThanks @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
e9c00fdThanks @robbie-c! - Related to https://www.wiz.io/blog/critical-vulnerability-in-react-cve-2025-55182We didn't include any of the vulnerable deps in any of our packages, however we did have them as dev / test / example project dependencies.
There was no way that any of these vulnerable packages were included in any of our published packages.
We've now patched out those dependencies.
Out of an abundance of caution, let's create a new release of all of our packages. (2025-12-04)
1.7.0
Minor Changes
- #2603
e1617d9Thanks @dmarticus! - add $feature_flag_evaluated_at properties to $feature_flag_called events (2025-12-03)
1.6.0
Minor Changes
- #2619
86dab38Thanks @hpouillot! - package deprecation (2025-11-24)
1.5.6
Patch Changes
- #2618
3eed1a4Thanks @marandaneto! - last version was compromised (2025-11-24)
1.5.5
Patch Changes
- #2589
83f5d07Thanks @hpouillot! - export logger creation (2025-11-20)
1.5.4
Patch Changes
- #2587
c242702Thanks @hpouillot! - export log level type (2025-11-20)
1.5.3
Patch Changes
- #2575
8acd88fThanks @hpouillot! - fix frame platform property for $exception events (2025-11-19)
1.5.2
Patch Changes
- #2552
87f9604Thanks @hpouillot! - expose binary path resolution
1.5.1
Patch Changes
- #2540
d8d98c9Thanks @hpouillot! - escape cli args and path in shell mode
1.5.0
Minor Changes
- #2520
068d55eThanks @lricoy! - Add bot pageview collection behind preview flag. Enables tracking bot traffic as$bot_pageviewevents when the__preview_capture_bot_pageviewsflag is enabled.
1.4.0
Minor Changes
- #2502
751b440Thanks @pauldambra! - fix: bucketed rate limiter can calculate tokens without a timer
1.3.1
Patch Changes
- #2478
e0a6fe0Thanks @hpouillot! - remove some export from main core
1.3.0
Minor Changes
-
#2417
daf919bThanks @dmarticus! - feat: Add evaluation environments support for feature flagsThis 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_environmentsparameter to the feature flags API when configured.
Patch Changes
- #2431
7d45a7aThanks @marandaneto! - fix: remove deprecated attribute $exception_personURL from exception events
1.2.4
Patch Changes
- #2419
10da2eeThanks @ablaszkiewicz! - move binary calling logic to core package
1.2.3
Patch Changes
- #2414
e19a384Thanks @hpouillot! - create a common logger for node and react-native
1.2.2
Patch Changes
- #2370
5820942Thanks @hpouillot! - remove testing export
1.2.1
Patch Changes
- #2356
caecb94Thanks @hpouillot! - update error properties builder
1.2.0
Minor Changes
- #2348
ac48d8fThanks @hpouillot! - chore: align js syntax with package support
1.1.0
Minor Changes
- #2330
da07e41Thanks @hpouillot! - add error tracking processing
1.0.2
Patch Changes
- #2243
1981815Thanks @hpouillot! - add promise queue