1.0.0
Major Changes
- #5971
8752e66Thanks @dustinbyrne! - Release@posthog/nextv1.0.0 breaking changes:- Upgrade
posthog-nodedependency to v6 (Capture v1); see https://posthog.com/docs/libraries/node/migration if you usegetPostHog(),serverOptions, or a custom reverse proxy - Unify middleware and server consent configuration onto
consent?: ConsentConfig(replacingconsentCookieName/consentCookiePrefix, enforcing server-side opt-out, and makingseedAnonymousCookie: falsea pure cookie-seeding toggle) - Align
PostHogPageViewandPostHogProviderdefaults withposthog-js: trigger$pageviewon initial mount and pathname changes only (callposthog.capture('$pageview')manually if your app relies on query- or hash-triggered pageviews) and strip URL#hashfragments by default (override viaclientOptions={{ disable_capture_url_hashes: false }}) - Reject secret keys (
phx_,phs_, etc.) inPostHogProviderandpostHogMiddleware, allowlist forwarded proxy headers and validate proxy URLs inpostHogMiddleware, and ignore global singleton mutators (register,shutdown,optOut, etc.) on request-scoped server clients (2026-12-04)
- Upgrade
Minor Changes
- #5971
8752e66Thanks @dustinbyrne! - Add@posthog/nextv1.0.0 features:- Support
projectTokenandNEXT_PUBLIC_POSTHOG_PROJECT_TOKEN(deprecatingapiKeyandNEXT_PUBLIC_POSTHOG_KEY, which continue to work as fallbacks) - Enable
$pageleavecapture whilePostHogPageViewis mounted (unlesscapture_pageleave: false), automatically deriveui_hostfor relative proxy paths, and applymask_personal_data_properties/custom_personal_data_propertiesto$pageview$current_url(2026-12-04)
- Support
Patch Changes
-
#6053
acdf36aThanks @dustinbyrne! - Treat empty or unrecognized consent cookie values as pending inisOptedOut, deferring toopt_out_capturing_by_defaultto match the browser SDK'sConsentManager.
(2026-12-04) -
#5971
8752e66Thanks @dustinbyrne! - Preserve Next.jsbasePathand trailing slashes inPostHogPageView$current_url, route/static/*and/array/*middleware proxy paths to PostHog assets hosts, fixwithContextproxy nesting, deduplicateclientCacheinitialization, and sanitize tracing headers
(2026-12-04) -
Updated dependencies [
acdf36a,f36bb04]:- @posthog/core@1.71.1
- posthog-js@1.457.6
- @posthog/browser-common@0.15.4