NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
npm, #3291 most downloaded on npm
Latest stable
1.67.1
Last release 12 days ago
10 Nov 2026
Ships on a steady schedule
a new release about every 8 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
239 releases · first in 2025
Drag across the ruler to compare, or tap a release to open it.
## 1.67.1 ### Patch Changes - #5626 `44e6251` Thanks @luantaraschi! - Relative date filters in local flag evaluation no longer roll past the end of a
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)feat(core): add PostHogMetrics.flushCoalesced(), a flush that callers can request once per unit of work: concurrent calls share one queued send, and i
#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)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Updated dependencies [`b5e9b69`, `fee9bee`]:
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)Updated dependencies [`bfbaff7`]:
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)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)bfbaff7]:
## 1.64.1 ### Patch Changes - #5545 `28fe8c0` Thanks @onmax! - Parse Node stack frames for functions named async without a leading parenthesis in the
Updated dependencies [`aa66d4c`]:
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)aa66d4c]:
## 1.63.2 ### Patch Changes - #5544 `8ddb57f` Thanks @marandaneto! - Fix tree shaking of unselected extensions and shared utilities when using the sli
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 $featur
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 activi
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 th
## 1.61.2 ### Patch Changes - #5252 `503c3ea` Thanks @andehen! - Document that sendFeatureFlagEvent is also the default for posthog-node evaluateFlags
## 1.61.1 ### Patch Changes - #5431 `96d7ff2` Thanks @turnipdabeets! - Deprecate getFeatureFlags(), getFeatureFlagPayloads() and getFeatureFlagsAndPay
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 t
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
f827137 Thanks @marandaneto! - Fall back instead of returning inconsistent local regex flag results for Unicode and advanced patterns.
(2026-10-23)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
#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:
$feature_flag_called events from snapshot reads report local_evaluation_inconclusive instead of flag_missing for these flags.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 $featur
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.
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 th
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
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)Updated dependencies [`7c10169`]:
7c10169 Thanks @DanielVisca! - Attach trace exemplars to metrics recorded inside sampled spans.
(2026-10-13)7c10169]:
Updated dependencies [`8f2d581`]:
8f2d581 Thanks @marandaneto! - Fix before_send callback types to accept non-null events while still allowing null returns to drop events.
(2026-10-12)8f2d581]:
## 1.58.0 ### Minor Changes - #5257 `2788b40` Thanks @turnipdabeets! - Change properties passed to capture() and the other event methods to override S
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
429b5b2 Thanks @hpouillot! - Recognize native bundler debug IDs and build-time error tracking release IDs.
(2026-10-09)## 1.57.3 ### Patch Changes - #5254 `2dd9878` Thanks @turnipdabeets! - Stop keeping $react_native_version on minimal $feature_flag_called events (2026
2dd9878 Thanks @turnipdabeets! - Stop keeping $react_native_version on minimal $feature_flag_called events
(2026-10-08)## 1.57.2 ### Patch Changes - #5162 `3132998` Thanks @pauldambra! - Sanitize each tool response once instead of twice, and replace image, audio and bi
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-
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)Updated dependencies [`6cd5496`]:
1.56.1 Patch Changes #5206 432329b Thanks @turnipdabeets ! - Keep $react_native_version on minimal $feature_flag_called events (2026-10-05)
432329b Thanks @turnipdabeets! - Keep $react_native_version on minimal $feature_flag_called eventsposthog-js/customizations exports a new isLikelyWebViewBot(ua) helper that flags the UA pattern described in #2921 (a Chrome/... token without the usu
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
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.1.55.2 Patch Changes #5078 f4704ac Thanks @rubychilds ! - Honor filters.holdout during local feature flag evaluation. A user in an experiment holdout
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.Updated dependencies [ 9cd8ebd ]:
#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 to
5cfec8b Thanks @lucasheriques! - Support partial survey responses and persistent resume in React Native, moving surveys toward feature parity across SDKs.1.54.5 Patch Changes #5012 5c12a4c Thanks @yoarajota ! - Coerce survey and product tour property filter values to strings before matching, so a numeri
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### Patch Changes - #4977 `0257a29` Thanks @lucasheriques! - Share survey choice and question shuffling between web and React Native through surveys c
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)### Patch Changes - #5005 `6545d3f` Thanks @marandaneto! - Fix declaration source mappings for DOMExceptionCoercer. (2026-09-17)
6545d3f Thanks @marandaneto! - Fix declaration source mappings for DOMExceptionCoercer.
(2026-09-17)### Patch Changes - #4885 `39a8980` Thanks @decknamec! - Server-side feature flags now resolve in posthog-node and posthog-edge even when a proxy rewr
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)### Patch Changes - #4941 `07c1045` Thanks @marandaneto! - Capture causes and AggregateError members with relationship metadata and individual stacks,
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)### Minor Changes - #4954 `3c68c08` Thanks @marandaneto! - Export the shared Retry-After parser with safe integer caps, GMT HTTP-date handling and rej
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)### Patch Changes - #4922 `3786cff` Thanks @Mnigos! - Require final 2xx responses for successful writes while preserving immediate-call error handling
### Patch Changes - #4899 `18ae6bb` Thanks @marandaneto! - Share the trySafe utility through @posthog/core. (2026-09-11)
18ae6bb Thanks @marandaneto! - Share the trySafe utility through @posthog/core.
(2026-09-11)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
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.Updated dependencies [`19e78cc`]:
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)#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]:
### Patch Changes - #4887 `0da006c` Thanks @posthog! - Error tracking no longer counts an injected script as your own code. A stack frame is in_app on
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)### Patch Changes - #4880 `412c97c` Thanks @marandaneto! - Fix recording package exports, native ESM loading, and strict TypeScript 4.7 consumer compa
412c97c Thanks @marandaneto! - Fix recording package exports, native ESM loading, and strict TypeScript 4.7 consumer compatibility.
(2026-09-10)Updated dependencies [`891eefa`]:
### Patch Changes - #4859 `c356c81` Thanks @marandaneto! - Include the root license and attribution notices in the published core package. (2026-09-09
c356c81 Thanks @marandaneto! - Include the root license and attribution notices in the published core package.
(2026-09-09)### Patch Changes - #4798 `4358915` Thanks @posthog! - fix(error-tracking): collapse repeated frame cycles in parsed stack traces to reduce grouping d
### Minor Changes - #4809 `3a5b322` Thanks @marandaneto! - Add best-effort in-app browser attribution using $webview_app and $webview_app_version, wit
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)Updated dependencies [`74ca945`, `5e74132`]:
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)74ca945, 5e74132]:
Updated dependencies [ 426e1fd ]:
### Patch Changes - #4759 `c475070` Thanks @marandaneto! - Preserve explicitly false feature flag values supplied through bootstrap configuration. (20
c475070 Thanks @marandaneto! - Preserve explicitly false feature flag values supplied through bootstrap configuration.
(2026-09-03)Updated dependencies [`41ed3af`]:
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)41ed3af]:
### Patch Changes - #4727 `ec9354c` Thanks @turnipdabeets! - Drop attributes with an empty key from exported logs and metrics instead of sending them.
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)### Patch Changes - #4710 `e87820a` Thanks @turnipdabeets! - Add os.name and os.version resource attributes to logs from the browser SDK, overridable
e87820a Thanks @turnipdabeets! - Add os.name and os.version resource attributes to logs from the browser SDK, overridable via logs.resourceAttributes
(2026-09-01)ChatGPT versions its apps differently per platform, so its $browser_version is not comparable across platforms. (2026-09-01)
#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)
#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
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.### Patch Changes - #4636 `74ff567` Thanks @yfwmaniish! - Narrow the pinterest entry in the bot-detection blocklist to pinterestbot, so real users on
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)### Minor Changes - #4036 `718beee` Thanks @emmayusufu! - Add capturedAt to PostHogLogs.captureLog() for stamping a record with the time and context o
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)One column per month.