{"id":"src_gwaS6LcxpdXMxZdYQqzsw","slug":"posthog-js","name":"PostHog JS","type":"github","url":"https://github.com/PostHog/posthog-js","orgId":"org_RVcfDRcn2piydCEP2lqfD","org":{"slug":"posthog","name":"PostHog"},"isPrimary":false,"metadata":"{\"changelogUrl\":\"https://github.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md\",\"changelogDetectedAt\":\"2026-03-31T14:13:13.229Z\"}","releaseCount":314,"releasesLast30Days":191,"avgReleasesPerWeek":41.8,"latestVersion":"@posthog/nuxt@1.6.16","latestDate":"2026-04-18T01:13:52.000Z","changelogUrl":"https://github.com/PostHog/posthog-js/blob/HEAD/CHANGELOG.md","hasChangelogFile":true,"lastFetchedAt":"2026-04-19T03:01:01.364Z","trackingSince":"2026-02-25T16:13:22.000Z","releases":[{"id":"rel_QCINxCzuZfo3yNjn3JYXR","version":"@posthog/nuxt@1.6.16","title":"@posthog/nuxt@1.6.16","summary":"## 1.6.16\n\n### Patch Changes\n\n- Updated dependencies [[`ea08727`](https://github.com/PostHog/posthog-js/commit/ea087272bbe210e5610c9271aa1194776e92735...","content":"## 1.6.16\n\n### Patch Changes\n\n- Updated dependencies [[`ea08727`](https://github.com/PostHog/posthog-js/commit/ea087272bbe210e5610c9271aa1194776e927353), [`3d8b2e2`](https://github.com/PostHog/posthog-js/commit/3d8b2e282927d0c09670b3f112c7dc159cebf059)]:\n  - posthog-js@1.369.3","publishedAt":"2026-04-18T01:13:52.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/%40posthog/nuxt%401.6.16","media":[]},{"id":"rel_QTKpmPCGRQ3JOD28fbkSl","version":"posthog-js@1.369.3","title":"posthog-js@1.369.3","summary":"## 1.369.3\n\n### Patch Changes\n\n- [#3419](https://github.com/PostHog/posthog-js/pull/3419) [`ea08727`](https://github.com/PostHog/posthog-js/commit/ea0...","content":"## 1.369.3\n\n### Patch Changes\n\n- [#3419](https://github.com/PostHog/posthog-js/pull/3419) [`ea08727`](https://github.com/PostHog/posthog-js/commit/ea087272bbe210e5610c9271aa1194776e927353) Thanks [@haacked](https://github.com/haacked)! - Reinstate `$feature_flag_payloads` and `$surveys_activated` in captured event properties.\n  (2026-04-18)\n\n- [#3416](https://github.com/PostHog/posthog-js/pull/3416) [`3d8b2e2`](https://github.com/PostHog/posthog-js/commit/3d8b2e282927d0c09670b3f112c7dc159cebf059) Thanks [@feliperalmeida](https://github.com/feliperalmeida)! - Updated dependencies: - protobufjs@7.5.5\n  (2026-04-18)\n- Updated dependencies []:\n    - @posthog/types@1.369.3","publishedAt":"2026-04-18T01:13:41.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.369.3","media":[]},{"id":"rel_2mRhCVPqHOY84VLVWokbI","version":"@posthog/types@1.369.3","title":"@posthog/types@1.369.3","summary":"## 1.369.3","content":"## 1.369.3","publishedAt":"2026-04-18T01:13:36.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/%40posthog/types%401.369.3","media":[]},{"id":"rel_Gy4VvBfQ8xe1yYP975DQI","version":"posthog-react-native@4.42.1","title":"posthog-react-native@4.42.1","summary":"## 4.42.1\n\n### Patch Changes\n\n- [#3402](https://github.com/PostHog/posthog-js/pull/3402) [`f2758ef`](https://github.com/PostHog/posthog-js/commit/f275...","content":"## 4.42.1\n\n### Patch Changes\n\n- [#3402](https://github.com/PostHog/posthog-js/pull/3402) [`f2758ef`](https://github.com/PostHog/posthog-js/commit/f2758ef4dae345d131c25281a75c3da764c1a109) Thanks [@ioannisj](https://github.com/ioannisj)! - chore: bump plugin dependency to 1.5.4\n  (2026-04-17)","publishedAt":"2026-04-17T09:06:25.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/posthog-react-native%404.42.1","media":[]},{"id":"rel_RusDKkg8nOUV6A0sw0Xpw","version":"@posthog/types@1.369.2","title":"@posthog/types@1.369.2","summary":"## 1.369.2\n\n### Patch Changes\n\n- [#3386](https://github.com/PostHog/posthog-js/pull/3386) [`4a65604`](https://github.com/PostHog/posthog-js/commit/4a6...","content":"## 1.369.2\n\n### Patch Changes\n\n- [#3386](https://github.com/PostHog/posthog-js/pull/3386) [`4a65604`](https://github.com/PostHog/posthog-js/commit/4a65604775fe87c47e5fbdb5f03673f2481c26ea) Thanks [@dustinbyrne](https://github.com/dustinbyrne)! - Add a preview flag for versioned browser lazy bundle asset paths.\n  (2026-04-16)","publishedAt":"2026-04-16T22:45:52.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/%40posthog/types%401.369.2","media":[]},{"id":"rel_TdCAUeLOmuwuzCfnxHqBg","version":"@posthog/nuxt@1.6.15","title":"@posthog/nuxt@1.6.15","summary":"## 1.6.15\n\n### Patch Changes\n\n- Updated dependencies [[`4a65604`](https://github.com/PostHog/posthog-js/commit/4a65604775fe87c47e5fbdb5f03673f2481c26e...","content":"## 1.6.15\n\n### Patch Changes\n\n- Updated dependencies [[`4a65604`](https://github.com/PostHog/posthog-js/commit/4a65604775fe87c47e5fbdb5f03673f2481c26ea)]:\n  - posthog-js@1.369.2","publishedAt":"2026-04-16T22:45:49.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/%40posthog/nuxt%401.6.15","media":[]},{"id":"rel_zYbFzEB4vLQn3MUhewDE6","version":"posthog-js@1.369.2","title":"posthog-js@1.369.2","summary":"## 1.369.2\n\n### Patch Changes\n\n- [#3386](https://github.com/PostHog/posthog-js/pull/3386) [`4a65604`](https://github.com/PostHog/posthog-js/commit/4a6...","content":"## 1.369.2\n\n### Patch Changes\n\n- [#3386](https://github.com/PostHog/posthog-js/pull/3386) [`4a65604`](https://github.com/PostHog/posthog-js/commit/4a65604775fe87c47e5fbdb5f03673f2481c26ea) Thanks [@dustinbyrne](https://github.com/dustinbyrne)! - Add a preview flag for versioned browser lazy bundle asset paths.\n  (2026-04-16)\n- Updated dependencies [[`4a65604`](https://github.com/PostHog/posthog-js/commit/4a65604775fe87c47e5fbdb5f03673f2481c26ea)]:\n    - @posthog/types@1.369.2","publishedAt":"2026-04-16T22:45:43.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.369.2","media":[]},{"id":"rel_mr-YduDTHre1_hTtErlly","version":"posthog-react-native@4.42.0","title":"posthog-react-native@4.42.0","summary":"## 4.42.0\n\n### Minor Changes\n\n- [#3399](https://github.com/PostHog/posthog-js/pull/3399) [`1d7e298`](https://github.com/PostHog/posthog-js/commit/1d7e...","content":"## 4.42.0\n\n### Minor Changes\n\n- [#3399](https://github.com/PostHog/posthog-js/pull/3399) [`1d7e298`](https://github.com/PostHog/posthog-js/commit/1d7e298648a6c47880e2130f6d68d755342cbdd1) Thanks [@turnipdabeets](https://github.com/turnipdabeets)! - Add version and project to expo react native symbols\n  (2026-04-16)","publishedAt":"2026-04-16T14:56:33.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/posthog-react-native%404.42.0","media":[]},{"id":"rel_6xjsrr9t9VZIiC-bl1pi-","version":"posthog-js@1.369.1","title":"posthog-js@1.369.1","summary":"## 1.369.1\n\n### Patch Changes\n\n- [#3393](https://github.com/PostHog/posthog-js/pull/3393) [`85ae4d9`](https://github.com/PostHog/posthog-js/commit/85a...","content":"## 1.369.1\n\n### Patch Changes\n\n- [#3393](https://github.com/PostHog/posthog-js/pull/3393) [`85ae4d9`](https://github.com/PostHog/posthog-js/commit/85ae4d9e2bb4e3f487c9b27fc581ed38c1a82c99) Thanks [@haacked](https://github.com/haacked)! - Exclude active feature flag payloads from event properties\n  (2026-04-16)\n\n- [#3392](https://github.com/PostHog/posthog-js/pull/3392) [`00cd1ce`](https://github.com/PostHog/posthog-js/commit/00cd1cef1d2d8a02339997bd3156aa1e395bea40) Thanks [@haacked](https://github.com/haacked)! - Fix unnecessary persisted config and activation properties (including product tours, surveys, and session recording config) added to captured events\n  (2026-04-16)\n- Updated dependencies []:\n    - @posthog/types@1.369.1","publishedAt":"2026-04-16T08:02:58.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.369.1","media":[]},{"id":"rel_6gPBycLFP7ym0rCeOJ0xk","version":"@posthog/ai@7.16.0","title":"@posthog/ai@7.16.0","summary":"## 7.16.0\n\n### Minor Changes\n\n- [#3387](https://github.com/PostHog/posthog-js/pull/3387) [`7ea6e26`](https://github.com/PostHog/posthog-js/commit/7ea6...","content":"## 7.16.0\n\n### Minor Changes\n\n- [#3387](https://github.com/PostHog/posthog-js/pull/3387) [`7ea6e26`](https://github.com/PostHog/posthog-js/commit/7ea6e26e7f89ea0a0eaf061a279541449219ca61) Thanks [@carlos-marchal-ph](https://github.com/carlos-marchal-ph)! - `Prompts.get()` now accepts `{ withMetadata: true }` and returns a `PromptResult` object containing `source` (`api`, `cache`, `stale_cache`, or `code_fallback`), `name`, and `version` alongside the prompt text. The previous plain-string return is deprecated and will be removed in a future major version.\n  (2026-04-15)","publishedAt":"2026-04-15T09:32:43.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/%40posthog/ai%407.16.0","media":[]},{"id":"rel_B78S9ladID2a4jWeIP9Aj","version":"posthog-js@1.369.0","title":"posthog-js@1.369.0","summary":"## 1.369.0\n\n### Minor Changes\n\n- [#3342](https://github.com/PostHog/posthog-js/pull/3342) [`eea5260`](https://github.com/PostHog/posthog-js/commit/eea...","content":"## 1.369.0\n\n### Minor Changes\n\n- [#3342](https://github.com/PostHog/posthog-js/pull/3342) [`eea5260`](https://github.com/PostHog/posthog-js/commit/eea5260bbd58fb8b2d7f0550bb03d741aaab376a) Thanks [@ksvat](https://github.com/ksvat)! - Account for property filters on events in recording triggers for v2 triggers\n  (2026-04-14)\n\n- [#3281](https://github.com/PostHog/posthog-js/pull/3281) [`b1fd228`](https://github.com/PostHog/posthog-js/commit/b1fd228eab45dc688b769378afa96a0f74167fab) Thanks [@ksvat](https://github.com/ksvat)! - Add session replay trigger groups handling (V2)\n  (2026-04-14)\n\n### Patch Changes\n\n- Updated dependencies []:\n    - @posthog/types@1.369.0","publishedAt":"2026-04-14T17:41:06.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.369.0","media":[]},{"id":"rel_cDYHRBeattyG8airhF-qC","version":"posthog-react-native@4.41.2","title":"posthog-react-native@4.41.2","summary":"## 4.41.2\n\n### Patch Changes\n\n- [#3388](https://github.com/PostHog/posthog-js/pull/3388) [`6d0aae3`](https://github.com/PostHog/posthog-js/commit/6d0a...","content":"## 4.41.2\n\n### Patch Changes\n\n- [#3388](https://github.com/PostHog/posthog-js/pull/3388) [`6d0aae3`](https://github.com/PostHog/posthog-js/commit/6d0aae3795da50ba803ab99c65cc8e843254ed64) Thanks [@turnipdabeets](https://github.com/turnipdabeets)! - \"exp\" flag is no longer needed in tooling to upload or clone with hermes when using posthog-cli >= 0.7.4\n  (2026-04-14)","publishedAt":"2026-04-14T17:40:57.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/posthog-react-native%404.41.2","media":[]},{"id":"rel_LyMjjHwkAgQo5Wx3AxnZv","version":"@posthog/ai@7.15.0","title":"@posthog/ai@7.15.0","summary":"## 7.15.0\n\n### Minor Changes\n\n- [#3358](https://github.com/PostHog/posthog-js/pull/3358) [`85d3bd1`](https://github.com/PostHog/posthog-js/commit/85d3...","content":"## 7.15.0\n\n### Minor Changes\n\n- [#3358](https://github.com/PostHog/posthog-js/pull/3358) [`85d3bd1`](https://github.com/PostHog/posthog-js/commit/85d3bd134dce1ae7b9287b73f2311c938bb42761) Thanks [@richardsolomou](https://github.com/richardsolomou)! - Add `PostHogSpanProcessor` as a self-contained OpenTelemetry `SpanProcessor` that handles batching and export internally. Both `PostHogSpanProcessor` and `PostHogTraceExporter` now automatically filter to AI-related spans only (`gen_ai.*`, `llm.*`, `ai.*`, `traceloop.*`).\n  (2026-04-14)\n\n- [#3377](https://github.com/PostHog/posthog-js/pull/3377) [`b90b54e`](https://github.com/PostHog/posthog-js/commit/b90b54e222ea27e7ba8113e617c5f1a924a2fc7a) Thanks [@andrewm4894](https://github.com/andrewm4894)! - Add OpenAI Agents SDK tracing support via `@posthog/ai/openai-agents`. Implements `PostHogTracingProcessor` that captures agent traces, spans, and LLM generations as PostHog LLM analytics events. Supports all span types including generation, response, function/tool, agent, handoff, guardrail, custom, audio, and MCP.\n  (2026-04-14)","publishedAt":"2026-04-14T11:34:39.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/%40posthog/ai%407.15.0","media":[]},{"id":"rel_2N_RH99nyMER_qKCm5M3_","version":"posthog-js@1.368.2","title":"posthog-js@1.368.2","summary":"## 1.368.2\n\n### Patch Changes\n\n- [#3378](https://github.com/PostHog/posthog-js/pull/3378) [`f1bea33`](https://github.com/PostHog/posthog-js/commit/f1b...","content":"## 1.368.2\n\n### Patch Changes\n\n- [#3378](https://github.com/PostHog/posthog-js/pull/3378) [`f1bea33`](https://github.com/PostHog/posthog-js/commit/f1bea33f64800c187f09a0989426ea0e73f43128) Thanks [@marandaneto](https://github.com/marandaneto)! - Disable native gzip compression after a NotReadableError in the browser SDK\n  (2026-04-14)\n- Updated dependencies []:\n    - @posthog/types@1.368.2","publishedAt":"2026-04-14T08:59:07.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.368.2","media":[]},{"id":"rel_27VCCEXaDRiREYQYIl2W6","version":"posthog-js@1.368.1","title":"posthog-js@1.368.1","summary":"## 1.368.1\n\n### Patch Changes\n\n- [#3379](https://github.com/PostHog/posthog-js/pull/3379) [`d7c71b1`](https://github.com/PostHog/posthog-js/commit/d7c...","content":"## 1.368.1\n\n### Patch Changes\n\n- [#3379](https://github.com/PostHog/posthog-js/pull/3379) [`d7c71b1`](https://github.com/PostHog/posthog-js/commit/d7c71b1316720d972e41b63987ef57512d615ea7) Thanks [@dmarticus](https://github.com/dmarticus)! - Fix bootstrapped feature flags being overwritten by partial /flags response when `advanced_only_evaluate_survey_feature_flags` is enabled\n  (2026-04-14)\n- Updated dependencies []:\n    - @posthog/types@1.368.1","publishedAt":"2026-04-14T06:26:59.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.368.1","media":[]},{"id":"rel_mwkgz98AGHLxUBiJFUyxH","version":"posthog-js@1.368.0","title":"posthog-js@1.368.0","summary":"## 1.368.0\n\n### Minor Changes\n\n- [#3345](https://github.com/PostHog/posthog-js/pull/3345) [`3fcf5c4`](https://github.com/PostHog/posthog-js/commit/3fc...","content":"## 1.368.0\n\n### Minor Changes\n\n- [#3345](https://github.com/PostHog/posthog-js/pull/3345) [`3fcf5c4`](https://github.com/PostHog/posthog-js/commit/3fcf5c449b3fe10ce187d40ea03425de9f94e85f) Thanks [@jonmcwest](https://github.com/jonmcwest)! - Add posthog.captureLog() API for sending structured log entries to PostHog logs\n  (2026-04-13)\n\n### Patch Changes\n\n- [#3373](https://github.com/PostHog/posthog-js/pull/3373) [`f5fe0a8`](https://github.com/PostHog/posthog-js/commit/f5fe0a8b11457a33c02029162a43e4eb2d3cb2d9) Thanks [@ksvat](https://github.com/ksvat)! - bump rrweb version\n  (2026-04-13)\n- Updated dependencies [[`3fcf5c4`](https://github.com/PostHog/posthog-js/commit/3fcf5c449b3fe10ce187d40ea03425de9f94e85f)]:\n    - @posthog/types@1.368.0","publishedAt":"2026-04-13T17:16:30.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.368.0","media":[]},{"id":"rel_ccIkCLnVxcmyyEsG45UPH","version":"@posthog/ai@7.14.0","title":"@posthog/ai@7.14.0","summary":"## 7.14.0\n\n### Minor Changes\n\n- [#3368](https://github.com/PostHog/posthog-js/pull/3368) [`c1f2c32`](https://github.com/PostHog/posthog-js/commit/c1f2...","content":"## 7.14.0\n\n### Minor Changes\n\n- [#3368](https://github.com/PostHog/posthog-js/pull/3368) [`c1f2c32`](https://github.com/PostHog/posthog-js/commit/c1f2c32218dabefde1b3c9ea2e272dbe9b117e28) Thanks [@carlos-marchal-ph](https://github.com/carlos-marchal-ph)! - Add `$ai_stop_reason` property capturing the LLM's reason for stopping generation across all providers\n  (2026-04-10)\n\n- [#3369](https://github.com/PostHog/posthog-js/pull/3369) [`cf69f96`](https://github.com/PostHog/posthog-js/commit/cf69f96a75ce3831a948cd5cc7173830085c5e45) Thanks [@carlos-marchal-ph](https://github.com/carlos-marchal-ph)! - Add Gemini `embedContent` tracking support\n  (2026-04-10)","publishedAt":"2026-04-10T16:07:45.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/%40posthog/ai%407.14.0","media":[]},{"id":"rel_ml_ArtTvcDkMCzK6tCIhx","version":"posthog-js@1.367.0","title":"posthog-js@1.367.0","summary":"## 1.367.0\n\n### Minor Changes\n\n- [#3242](https://github.com/PostHog/posthog-js/pull/3242) [`353be9a`](https://github.com/PostHog/posthog-js/commit/353...","content":"## 1.367.0\n\n### Minor Changes\n\n- [#3242](https://github.com/PostHog/posthog-js/pull/3242) [`353be9a`](https://github.com/PostHog/posthog-js/commit/353be9a878fe209a032f2d70376ece78ee67303c) Thanks [@dustinbyrne](https://github.com/dustinbyrne)! - feat: Add support for pre-loaded remote-config\n  (2026-04-09)\n\n### Patch Changes\n\n- Updated dependencies []:\n    - @posthog/types@1.367.0","publishedAt":"2026-04-09T19:39:34.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/posthog-js%401.367.0","media":[]},{"id":"rel_-4HggmJG0NucZ31cLPb08","version":"@posthog/nuxt@1.6.9","title":"@posthog/nuxt@1.6.9","summary":"## 1.6.9\n\n### Patch Changes\n\n- Updated dependencies [[`353be9a`](https://github.com/PostHog/posthog-js/commit/353be9a878fe209a032f2d70376ece78ee67303c...","content":"## 1.6.9\n\n### Patch Changes\n\n- Updated dependencies [[`353be9a`](https://github.com/PostHog/posthog-js/commit/353be9a878fe209a032f2d70376ece78ee67303c)]:\n  - posthog-js@1.367.0","publishedAt":"2026-04-09T19:39:07.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/%40posthog/nuxt%401.6.9","media":[]},{"id":"rel_wFBUS1vWb0DvG6aCO9ajH","version":"@posthog/types@1.367.0","title":"@posthog/types@1.367.0","summary":"## 1.367.0","content":"## 1.367.0","publishedAt":"2026-04-09T19:38:54.000Z","url":"https://github.com/PostHog/posthog-js/releases/tag/%40posthog/types%401.367.0","media":[]}],"pagination":{"page":1,"pageSize":20,"totalPages":16,"totalItems":314},"summaries":{"rolling":{"windowDays":90,"summary":"PostHog JS continued optimizing for bundle size and tree-shaking while strengthening reliability across recording and error handling. The browser SDK shipped improvements to memory management in session replay, particularly fixing canvas recording leaks on Safari and updating rrweb dependencies. Core SDK work focused on feature flag caching, session recording sampling, and better error detection—including a new `rrweb_error` status when session recording initialization fails silently. On the backend, the team added NestJS integration with context propagation, introduced `feature_flag_cache_ttl_ms` to prevent stale flag values, and expanded feature flag evaluation with semver comparison operators. Tree-shaking support expanded across surveys, toolbar, exceptions, conversations, logs, and experiments, with new configuration options like `advanced_feature_flags_dedup_per_session` and serviceName for logs. Infrastructure work included fixes for sourcemap upload via stdin and better handling of OpenTelemetry exports that don't require optional dependencies to be installed.","releaseCount":200,"generatedAt":"2026-03-31T14:13:18.183Z"},"monthly":[{"year":2026,"month":2,"summary":"February pushed recorder stability and feature flag control. The SDK waited for fresh config before recording starts and added a new recorder status for better visibility, while two new configuration options—`feature_flag_cache_ttl_ms` and `remote_config_refresh_interval_ms`—let developers prevent stale flag values in long-running sessions. Device detection improved to correctly identify Android tablets sending desktop user agents via Client Hints, product tours gained device-type targeting, and the Node SDK introduced context-sensitive flag methods that read `distinctId` from async context instead of requiring it as a parameter.","releaseCount":25,"generatedAt":"2026-03-31T14:13:21.111Z"}]}}