NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #4167 most downloaded on npm
PostHog Node.js integration
Latest stable
5.68.2
Last release 10 days ago
10 Nov 2026
Ships on a steady schedule
a new release about every 9 days
Most releases are documented
notes for 48 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
367 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
## 5.48.0 ### Minor Changes - #4342 `fa3457f` Thanks @haacked! - Support the starts_with, not_starts_with, ends_with, and not_ends_with property filte
fa3457f Thanks @haacked! - Support the starts_with, not_starts_with, ends_with, and not_ends_with property filter operators in feature flag local evaluation. Matching is case-insensitive and mirrors icontains, so flags using these operators no longer fall back to remote evaluation.
(2026-08-05)Updated dependencies [`3c40b6c`]:
3c40b6c Thanks @marandaneto! - Keep request timeouts active through response body consumption and clarify eventual event UUID deduplication semantics.
(2026-08-05)3c40b6c]:
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Updated dependencies [`d3c4538`]:
d3c4538 Thanks @posthog! - Keep $referring_domain and canonical utm_*/campaign parameters on minimal $feature_flag_called events. Previously the minimal allowlist stripped every campaign parameter, so a flag-called event landing first in a session could set the session's UTM attribution and channel type to NULL in web analytics.
(2026-08-04)d3c4538]:
## 5.47.9 ### Patch Changes - #4350 `facb4c1` Thanks @marandaneto! - Fix enableExceptionAutocapture suppressing Node's default crash on unhandled prom
facb4c1 Thanks @marandaneto! - Fix enableExceptionAutocapture suppressing Node's default crash on unhandled promise rejections; fatal rejections in strict or warn-with-error-code mode and rejections handled by another unhandledRejection listener are no longer captured.
(2026-08-04)Updated dependencies [`821a2c6`]:
d4ffb83 Thanks @marandaneto! - Schedule local feature flag polls after each request settles.
(2026-08-04)821a2c6]:
## 5.47.7 ### Patch Changes - #4352 `1cf9c6d` Thanks @marandaneto! - Bound stack source context reads and skip non-regular or oversized files. (2026-0
1cf9c6d Thanks @marandaneto! - Bound stack source context reads and skip non-regular or oversized files.
(2026-08-03)Updated dependencies [`f3a71a1`]:
f3a71a1 Thanks @marandaneto! - Clear completed lifecycle timeout handles so successful shutdowns do not leave timers running.
(2026-08-03)f3a71a1]:
Updated dependencies [`eb0a793`]:
eb0a793 Thanks @ATKasem! - fix: personProperties and groupProperties on the feature flag methods are no longer typed as Record<string, string>, so numeric and boolean values type-check without a cast. Local evaluation already handled them — matchProperty takes Record<string, any> and compares numerically for gt/gte/lt/lte — only the public types disagreed. These now use the shared Properties type (personProperties?: Properties, groupProperties?: Record<string, Properties>), matching setPersonPropertiesForFlags/setGroupPropertiesForFlags so the any can be narrowed later. Types only, no runtime change.
(2026-08-03)eb0a793]:
Updated dependencies [`7c3a9af`]:
7c3a9af Thanks @marandaneto! - Preserve events added to a full queue while an earlier batch is being flushed.
(2026-08-03)7c3a9af]:
## 5.47.3 ### Patch Changes - #4349 `0e2b371` Thanks @marandaneto! - Apply the feature flag definition request timeout while consuming the response bo
#4349 0e2b371 Thanks @marandaneto! - Apply the feature flag definition request timeout while consuming the response body.
(2026-07-31)
#4349 0e2b371 Thanks @marandaneto! - Keep the feature flag definition request timeout active until the request settles.
(2026-07-31)
Updated dependencies [`b9a241e`]:
b9a241e Thanks @ioannisj! - Fix identify() leaving a user anonymous when the supplied ID already matches the persisted distinct ID (for example after a non-identified bootstrap seeded the same ID). The user is now marked identified and a person-processed $set event is captured. Ports the same fix from posthog-js (browser) to the shared core used by React Native, Node, and posthog-js-lite.
(2026-07-31)b9a241e]:
## 5.47.1 ### Patch Changes - #4351 `15aad20` Thanks @marandaneto! - Isolate NestJS request context per Observable subscription. (2026-07-31)
15aad20 Thanks @marandaneto! - Isolate NestJS request context per Observable subscription.
(2026-07-31)Updated dependencies [`6e7f3ae`]:
6e7f3ae Thanks @ablaszkiewicz! - Emit the release id that posthog-cli injects into your bundle as $release_id on $exception events, so PostHog can attach exceptions to a release without joining through symbol sets. Adds getInjectedReleaseId() to @posthog/core. The property is only attached when an injected release id can be read.
(2026-07-30)6e7f3ae]:
Updated dependencies [`6c8fde0`]:
6c8fde0 Thanks @hpouillot! - Normalize V8 Promise combinator stack frames so input indexes are not treated as source filenames.
(2026-07-23)6c8fde0]:
When the v2 /flags response carries minimalFlagCalledEvents: true (or, for posthog-node local evaluation, the flag-definitions payload carries minimal
#4172 9621830 Thanks @haacked! - send minimal $feature_flag_called events when the server enables it
When the v2 /flags response carries minimalFlagCalledEvents: true (or, for posthog-node local evaluation, the flag-definitions payload carries minimal_flag_called_events: true) and the evaluated flag is not linked to an experiment ($feature_flag_has_experiment === false), $feature_flag_called events are rebuilt from a strict allowlist of flag-evaluation, processing-control, and SDK-identity properties. Super properties, $set/$set_once, the $feature/<key> enumeration, $active_feature_flags, and the context envelope are stripped. Any missing signal (no gate on the response, bootstrapped or locally injected flags, has_experiment unknown) falls back to the full event, and experiment-linked flags always send the full envelope. The gate is stored alongside the cached flags (posthog-js persistence, posthog-node poller state) and is server-controlled, with no SDK-side configuration. before_send runs after the filter and may re-add stripped properties. (2026-07-20)
9621830]:
Updated dependencies [`06d19a2`]:
06d19a2 Thanks @dustinbyrne! - Avoid Next.js Edge runtime warnings for native compression and fatal error handling.
(2026-07-16)06d19a2]:
## 5.45.1 ### Patch Changes - #4164 `9eb2b28` Thanks @dustinbyrne! - Fix the default Node.js event flush interval at 5 seconds. (2026-07-16)
9eb2b28 Thanks @dustinbyrne! - Fix the default Node.js event flush interval at 5 seconds.
(2026-07-16)$feature_flag_called events now carry a $feature_flag_has_experiment boolean sourced from the server's has_experiment flag metadata (the /flags?v=2 re
#4159 fad6d9a Thanks @haacked! - add $feature_flag_has_experiment to $feature_flag_called events
$feature_flag_called events now carry a $feature_flag_has_experiment boolean sourced from the server's has_experiment flag metadata (the /flags?v=2 response for remote evaluation, the /api/feature_flag/local_evaluation definitions for posthog-node local evaluation). The property is only sent when the server explicitly reports has_experiment; it is omitted entirely when the value is unknown (older servers, missing metadata, bootstrapped or locally injected flags). (2026-07-16)
fad6d9a]:
Updated dependencies [`fc2cb2e`]:
fc2cb2e Thanks @eli-r-ph! - Raise the default maxQueueSize from 1000 to 10000. Backend workloads are more likely to burst-enqueue events synchronously ahead of a flush than browser/mobile clients, so the previous default risked silently dropping events under bursty load. An explicit maxQueueSize option still overrides this default.
(2026-07-15)fc2cb2e]:
Backend services can now record metrics through the same statsd-style pre-aggregating client the browser SDK ships, with no OpenTelemetry setup:
#4117 1eddff7 Thanks @DanielVisca! - add the posthog.metrics API (count, gauge, histogram) to posthog-node — alpha
Backend services can now record metrics through the same statsd-style pre-aggregating client the browser SDK ships, with no OpenTelemetry setup:
const client = new PostHog('phc_...', { metrics: { serviceName: 'billing-worker' } })
client.metrics.count('invoices.processed', 1, { attributes: { plan: 'pro' } })
client.metrics.gauge('queue.depth', 42)
client.metrics.histogram('job.duration', 187, { unit: 'ms' })
Samples aggregate in memory and flush as OTLP/JSON to /i/v1/metrics (one data point per series per window). Pending metrics are flushed on shutdown(). Core gains _sendMetricsBatch on PostHogCoreStateless (same outcome contract as _sendLogsBatch) and a shared resolveMetricsConfig, so any core-based SDK can host PostHogMetrics. (2026-07-15)
1eddff7]:
Updated dependencies [`dc2aa5b`]:
dc2aa5b Thanks @posthog! - Expose the error tracking rate-limiter config via the new exceptionRateLimiterRefillRate and exceptionRateLimiterBucketSize options. Burst protection is scoped per exception type (each distinct $exception type gets its own token bucket, with no aggregate cap across types), so these let customers with high-cardinality exception types tune the per-type allowance.
(2026-07-14)dc2aa5b]:
Capture V1 uses Bearer auth, lifts legacy $-sentinel properties into a typed options object, and does per-event partial retry with exponential backoff
#4105 203284a Thanks @eli-r-ph! - Add opt-in Capture V1 support. Set the POSTHOG_CAPTURE_MODE=v1 environment variable to submit analytics events to the Capture V1 endpoint (/i/v1/analytics/events) instead of the legacy /batch/ endpoint, on both the batched and immediate send paths. The default remains v0, so existing behavior is unchanged unless you opt in. Opt-in is env-var-only during the transition (no public option), so nothing on the API surface has to be removed when v1 later becomes the default.
Capture V1 uses Bearer auth, lifts legacy $-sentinel properties into a typed options object, and does per-event partial retry with exponential backoff clamped against Retry-After. Dropped and undelivered events are surfaced on the client error channel as a CaptureV1Error. $ai_* events continue to use the legacy submitter for now, regardless of the capture mode.
In v1 mode, $ai_* events are routed to an isolated in-memory queue and flushed independently of the Capture V1 queue, so the two transports never share a batch and a failure on one cannot re-send events already accepted on the other. Each queue keeps its own retry/durability semantics: the legacy queue re-queues on network failure (retrying on later flushes), while the V1 queue exhausts the sender's own attempt budget per cycle and then surfaces the failure rather than re-queuing. (2026-07-11)
203284a]:
## 5.40.0 ### Minor Changes - #4060 `0b49a4c` Thanks @turnipdabeets! - Add secretKey config as the canonical alias for the deprecated personalApiKey (
0b49a4c Thanks @turnipdabeets! - Add secretKey config as the canonical alias for the deprecated personalApiKey (accepts a Personal API Key or Project Secret API Key).
(2026-07-07)Updated dependencies [`5e7e132`]:
0c11747 Thanks @marandaneto! - Stop duplicating distinct_id inside /flags person properties.
(2026-07-02)5e7e132]:
Updated dependencies [`64e04ba`]:
64e04ba Thanks @marandaneto! - Retry /flags requests that receive HTTP 502 or 504 responses across SDKs that use the shared core flags client.
(2026-07-02)64e04ba]:
Updated dependencies [`a664b81`]:
a664b81 Thanks @marandaneto! - Make Node flush() wait for pending asynchronous SDK work before draining the event queue, so events produced by helpers like captureException() are not missed. Pending work rejections no longer prevent queued events from flushing.
(2026-07-01)a664b81]:
Updated dependencies [`ab118d2`]:
#4029 b36b1cc Thanks @marandaneto! - Call before_send for identify, group identify, and alias events.
(2026-06-30)
#4027 ab118d2 Thanks @marandaneto! - Safely serialize event batches with circular property references instead of crashing during flush.
(2026-06-30)
Updated dependencies [ab118d2]:
Updated dependencies [`0063128`]:
0063128 Thanks @github-actions! - Add groupIdentifyImmediate() to await the network request when identifying a group, mirroring captureImmediate/identifyImmediate/aliasImmediate. Useful in edge/serverless environments where the background queue may not flush. The Convex integration now uses it directly instead of routing $groupidentify through captureImmediate.
(2026-06-30)0063128]:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.