github PostHog/posthog-js posthog-js@1.411.0

1.411.0

Minor Changes

  • #4266 43d1850 Thanks @posthog! - feat: add opt-in capture_performance.__preview_web_vitals_soft_navs to fix inflated web vitals on single-page apps

    Client-side route changes in SPAs previously left web vitals (LCP especially) accumulating against the original hard-navigation timestamp, inflating the top tail of Core Web Vitals. Setting capture_performance: { __preview_web_vitals_soft_navs: true } now scopes metrics to the browser's Soft Navigation entries so each route change starts a fresh measurement window. It's a preview option because it relies on Chrome's experimental Soft Navigation Detection API and loads pinned stable web-vitals 6.x callbacks; when disabled (the default), the existing web-vitals 5.x behavior remains unchanged. (2026-08-04)

Patch Changes

  • #4287 d3c4538 Thanks @posthog! - Keep $referring_domain and canonical utm_*/campaign parameters on minimal $feature_flag_called events. Previously the minimal allowlist stripped every campaign parameter, so a flag-called event landing first in a session could set the session's UTM attribution and channel type to NULL in web analytics.
    (2026-08-04)
  • Updated dependencies [d3c4538, 43d1850]:
    • @posthog/core@1.46.7
    • @posthog/types@1.401.0

Don't miss a new posthog-js release

NewReleases is sending notifications on new releases.