Skip to content

feat(browser): warn when volatile persistence creates a new anonymous person per page load - #4796

Draft
posthog[bot] wants to merge 7 commits into
mainfrom
posthog-self-driving/featbrowser-warn-when-persistence-990de8
Draft

feat(browser): warn when volatile persistence creates a new anonymous person per page load#4796
posthog[bot] wants to merge 7 commits into
mainfrom
posthog-self-driving/featbrowser-warn-when-persistence-990de8

Conversation

@posthog

@posthog posthog Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Problem

  • A customer set persistence: 'memory' with person_profiles: 'always', then spent weeks and a full support cycle finding out why their anonymous person count and feature-flag estimate kept growing. The SDK never said a word.
  • memory only lasts one page load and sessionStorage only lasts one tab. Neither keeps the distinct ID, so PostHog mints a new one on every load — and under person_profiles: 'always' each new ID becomes its own anonymous person.
  • posthog-js already warns about volatile persistence, but only from _requirePersonProcessing(). Under person_profiles: 'always' a person is created without any identify() call, so that path never runs and the warning never fires. This is exactly the configuration that produces junk persons.
Config Person created by Warned before Warned now
volatile persistence + identified_only identify() yes yes
volatile persistence + always every page load no yes, at init
durable persistence stable ID no no

Changes

  • Fire the volatile-identity warning at init (and on set_config) when person_profiles is always, instead of waiting for a person-processing request that never comes.
  • Give that case its own message and its own remedies: a stable bootstrap.distinctID, or the person_profiles: 'identified_only' default so anonymous visitors get no profile.
  • reuseAnonymousId no longer suppresses the warning under person_profiles: 'always'. It only stops identify() from merging IDs; a fresh anonymous person is still created on each load, so it is not an escape here.
  • Document the identity cost of memory and sessionStorage on the persistence config JSDoc.

No behavior change beyond the warning. The existing identified_only message and its remedies are unchanged.

Release info Sub-libraries affected

Libraries affected

  • All of them
  • posthog-js (web)
  • posthog-js-lite (web lite)
  • posthog-node
  • posthog-react-native
  • @posthog/react-native-plugin
  • @posthog/react
  • @posthog/ai
  • @posthog/convex
  • @posthog/next
  • @posthog/nextjs-config
  • @posthog/nuxt
  • @posthog/openfeature-node-provider
  • @posthog/openfeature-web-provider
  • @posthog/rollup-plugin
  • @posthog/webpack-plugin
  • @posthog/types
  • @posthog/browser-common

Checklist

  • Tests for new code
  • Accounted for the impact of any changes across different platforms
  • Accounted for backwards compatibility of any changes (no breaking changes!)
  • Took care not to unnecessarily increase the bundle size

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Fully autonomous

  • Written by Claude Opus 5 in PostHog Desktop, from the linked inbox report. Tools used: repo search, file edits, vitest, oxlint, oxfmt.
  • The report asked for a warning on the memory branch of _buildStorage. Rejected: a warning at storage selection cannot see whether person profiles are created, and would be a false positive for the many users on memory with person_profiles: 'never' or a bootstrapped ID. The volatile-identity warning added in #4662 already has all those guards, so this extends it instead of adding a second one.
  • The report's line numbers no longer matched main; the real remaining gap was the person_profiles: 'always' path, which that warning does not reach.
  • One new private field, _hasResolvedInitialDistinctId. _init() calls set_config() before it resolves the initial distinct ID, so without it the set_config hook would warn during init even when a bootstrap.distinctID was passed.
Test run

vitest run src/__tests__/config.test.ts — 111 passed, including 6 new cases. The full vitest run src suite has 2 failures on this branch that also fail on a clean main checkout (a missing dist/ build artifact and a pre-existing persistence-key-policy finding in browser-client.ts); no manual browser testing was done.


Created with PostHog Desktop from this inbox report.

… person per page load

`memory` and `sessionStorage` persistence drop the distinct ID, so PostHog mints a new one on each page load. With `person_profiles: 'always'` each new ID becomes its own anonymous person, and no `identify()` call is needed — so the existing volatile-identity warning, which fires from `_requirePersonProcessing()`, never ran.

Check at init and on `set_config` when `person_profiles` is `always`. `reuseAnonymousId` no longer suppresses the warning in that case, because it only stops `identify()` from merging IDs. Also document the cost on the `persistence` config JSDoc.

Generated-By: PostHog Desktop
Task-Id: 406c89f8-06a7-4f15-a097-1761a5b651c4
@posthog

posthog Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

🦔 PostHog Review reviewed this pull request

Found 0 must fix, 0 should fix, 1 consider.

Published 1 finding (view the review).

Resolved comments: 1 fixed

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

posthog-js Compliance Report

Date: 2026-09-05 00:18:00 UTC
Duration: 88706ms

✅ All Tests Passed!

26/26 tests passed


Capture Tests

26/26 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields Client 96ms
Format Validation.Event Has Uuid 17ms
Format Validation.Event Has Lib Properties 11ms
Format Validation.Distinct Id Is String Client 13ms
Format Validation.Token Is Present Client 13ms
Format Validation.Custom Properties Preserved 13ms
Format Validation.Event Has Timestamp 12ms
Retry Behavior.Retries On 503 5017ms
Retry Behavior.Does Not Retry On 400 2019ms
Retry Behavior.Does Not Retry On 401 2014ms
Retry Behavior.Respects Retry After Header 5020ms
Retry Behavior.Implements Backoff 15028ms
Retry Behavior.Retries On 500 5015ms
Retry Behavior.Retries On 502 5012ms
Retry Behavior.Retries On 504 5016ms
Retry Behavior.Max Retries Respected 15027ms
Deduplication.Generates Unique Uuids 20ms
Deduplication.Preserves Uuid On Retry 5014ms
Deduplication.Preserves Uuid And Timestamp On Retry 10022ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 5020ms
Deduplication.No Duplicate Events In Batch 19ms
Deduplication.Different Events Have Different Uuids 13ms
Batch Format.Flush With No Events Sends Nothing 5ms
Error Handling.Does Not Retry On 403 2012ms
Error Handling.Does Not Retry On 413 2012ms
Error Handling.Retries On 408 5015ms

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Size Change: +9.17 kB (+0.04%)

Total Size: 20.5 MB

📦 View Changed
Filename Size Change
packages/browser/dist/array.full.es5.js 499 kB +798 B (+0.16%)
packages/browser/dist/array.full.js 610 kB +531 B (+0.09%)
packages/browser/dist/array.full.no-********.js 668 kB +780 B (+0.12%)
packages/browser/dist/array.js 283 kB +539 B (+0.19%)
packages/browser/dist/array.no-********.js 323 kB +788 B (+0.24%)
packages/browser/dist/default-extensions.js 281 kB +539 B (+0.19%)
packages/browser/dist/main.js 288 kB +539 B (+0.19%)
packages/browser/dist/module.full.js 612 kB +531 B (+0.09%)
packages/browser/dist/module.full.no-********.js 671 kB +780 B (+0.12%)
packages/browser/dist/module.js 287 kB +539 B (+0.19%)
packages/browser/dist/module.mjs 287 kB +539 B (+0.19%)
packages/browser/dist/module.no-********.js 327 kB +788 B (+0.24%)
packages/browser/dist/module.slim.js 144 kB +614 B (+0.43%)
packages/browser/dist/module.slim.no-********.js 159 kB +863 B (+0.55%)
ℹ️ View Unchanged
Filename Size
packages/ai/dist/adk/index.cjs 35.6 kB
packages/ai/dist/adk/index.mjs 35.4 kB
packages/ai/dist/anthropic/index.cjs 35.9 kB
packages/ai/dist/anthropic/index.mjs 34.5 kB
packages/ai/dist/gemini/index.cjs 33.5 kB
packages/ai/dist/gemini/index.mjs 33.3 kB
packages/ai/dist/index.cjs 50.2 kB
packages/ai/dist/index.mjs 50 kB
packages/ai/dist/langchain/index.cjs 36.7 kB
packages/ai/dist/langchain/index.mjs 36.6 kB
packages/ai/dist/langchain/middleware/index.cjs 42.8 kB
packages/ai/dist/langchain/middleware/index.mjs 42.5 kB
packages/ai/dist/openai-agents/index.cjs 29.5 kB
packages/ai/dist/openai-agents/index.mjs 29.4 kB
packages/ai/dist/openai/index.cjs 78.8 kB
packages/ai/dist/openai/index.mjs 78.2 kB
packages/ai/dist/otel/index.cjs 15.4 kB
packages/ai/dist/otel/index.mjs 15.2 kB
packages/ai/dist/vercel/index.cjs 40.9 kB
packages/ai/dist/vercel/index.mjs 40.8 kB
packages/browser-common/dist/client.js 585 B
packages/browser-common/dist/client.mjs 12 B
packages/browser-common/dist/config.js 1.52 kB
packages/browser-common/dist/config.mjs 216 B
packages/browser-common/dist/constants.js 1.75 kB
packages/browser-common/dist/constants.mjs 219 B
packages/browser-common/dist/disposable.js 1.72 kB
packages/browser-common/dist/disposable.mjs 386 B
packages/browser-common/dist/extension-runtime.js 3.17 kB
packages/browser-common/dist/extension-runtime.mjs 1.83 kB
packages/browser-common/dist/extension.js 585 B
packages/browser-common/dist/extension.mjs 12 B
packages/browser-common/dist/index.js 2.98 kB
packages/browser-common/dist/index.mjs 130 B
packages/browser-common/dist/persistence.js 585 B
packages/browser-common/dist/persistence.mjs 12 B
packages/browser-common/dist/pubsub.js 2.63 kB
packages/browser-common/dist/pubsub.mjs 1.35 kB
packages/browser-common/dist/token.js 585 B
packages/browser-common/dist/token.mjs 12 B
packages/browser-common/dist/types/compression.js 1.37 kB
packages/browser-common/dist/types/compression.mjs 93 B
packages/browser-common/dist/types/index.js 3.68 kB
packages/browser-common/dist/types/index.mjs 144 B
packages/browser-common/dist/types/network-recording.js 585 B
packages/browser-common/dist/types/network-recording.mjs 12 B
packages/browser-common/dist/types/remote-config.js 585 B
packages/browser-common/dist/types/remote-config.mjs 12 B
packages/browser-common/dist/types/surveys.js 4.61 kB
packages/browser-common/dist/types/surveys.mjs 2.17 kB
packages/browser-common/dist/utils/array-at-********.js 619 B
packages/browser-common/dist/utils/array-at-********.mjs 437 B
packages/browser-common/dist/utils/array-find-last-********.js 604 B
packages/browser-common/dist/utils/array-find-last-********.mjs 422 B
packages/browser-common/dist/utils/autocapture-utils.js 24.3 kB
packages/browser-common/dist/utils/autocapture-utils.mjs 18.6 kB
packages/browser-common/dist/utils/blocked-uas.js 2.2 kB
packages/browser-common/dist/utils/blocked-uas.mjs 598 B
packages/browser-common/dist/utils/cookie-utils.js 1.99 kB
packages/browser-common/dist/utils/cookie-utils.mjs 673 B
packages/browser-common/dist/utils/device-model-utils.js 2.08 kB
packages/browser-common/dist/utils/device-model-utils.mjs 678 B
packages/browser-common/dist/utils/element-utils.js 2.56 kB
packages/browser-common/dist/utils/element-utils.mjs 804 B
packages/browser-common/dist/utils/elements-chain-utils.js 2.86 kB
packages/browser-common/dist/utils/elements-chain-utils.mjs 1.23 kB
packages/browser-common/dist/utils/encode-utils.js 1.49 kB
packages/browser-common/dist/utils/encode-utils.mjs 205 B
packages/browser-common/dist/utils/event-utils.js 15.8 kB
packages/browser-common/dist/utils/event-utils.mjs 10 kB
packages/browser-common/dist/utils/general-utils.js 7.41 kB
packages/browser-common/dist/utils/general-utils.mjs 4.49 kB
packages/browser-common/dist/utils/globals.js 2.83 kB
packages/browser-common/dist/utils/globals.mjs 842 B
packages/browser-common/dist/utils/logger.js 3.5 kB
packages/browser-common/dist/utils/logger.mjs 1.61 kB
packages/browser-common/dist/utils/matcher-utils.js 2.94 kB
packages/browser-common/dist/utils/matcher-utils.mjs 1.33 kB
packages/browser-common/dist/utils/promise-utils.js 1.45 kB
packages/browser-common/dist/utils/promise-utils.mjs 169 B
packages/browser-common/dist/utils/property-utils.js 3.63 kB
packages/browser-common/dist/utils/property-utils.mjs 1.6 kB
packages/browser-common/dist/utils/prototype-utils.js 3.61 kB
packages/browser-common/dist/utils/prototype-utils.mjs 1.86 kB
packages/browser-common/dist/utils/regex-utils.js 1.55 kB
packages/browser-common/dist/utils/regex-utils.mjs 71 B
packages/browser-common/dist/utils/request-utils.js 6.83 kB
packages/browser-common/dist/utils/request-utils.mjs 4.19 kB
packages/browser-common/dist/utils/simple-event-emitter.js 1.86 kB
packages/browser-common/dist/utils/simple-event-emitter.mjs 553 B
packages/browser-common/dist/utils/stylesheet-loader.js 2.23 kB
packages/browser-common/dist/utils/stylesheet-loader.mjs 823 B
packages/browser-common/dist/utils/type-utils.js 1.68 kB
packages/browser-common/dist/utils/type-utils.mjs 258 B
packages/browser-common/dist/utils/url-targeting-utils.js 2.45 kB
packages/browser-common/dist/utils/url-targeting-utils.mjs 863 B
packages/browser-common/dist/utils/uuidv7.js 6.72 kB
packages/browser-common/dist/utils/uuidv7.mjs 5.14 kB
packages/browser-next/dist/analytics-********.js 1.68 kB
packages/browser-next/dist/analytics-********.mjs 219 B
packages/browser-next/dist/analytics-options.js 585 B
packages/browser-next/dist/analytics-options.mjs 12 B
packages/browser-next/dist/analytics.js 6.62 kB
packages/browser-next/dist/analytics.mjs 5.15 kB
packages/browser-next/dist/bot-filter.js 2.38 kB
packages/browser-next/dist/bot-filter.mjs 1.09 kB
packages/browser-next/dist/capture-v1.js 27.8 kB
packages/browser-next/dist/capture-v1.mjs 25.3 kB
packages/browser-next/dist/core.js 1.69 kB
packages/browser-next/dist/core.mjs 185 B
packages/browser-next/dist/extensions/registry.js 3.41 kB
packages/browser-next/dist/extensions/registry.mjs 2.11 kB
packages/browser-next/dist/id.js 2.25 kB
packages/browser-next/dist/id.mjs 983 B
packages/browser-next/dist/index.js 2.68 kB
packages/browser-next/dist/index.mjs 1.18 kB
packages/browser-next/dist/lane.js 18.1 kB
packages/browser-next/dist/lane.mjs 16.9 kB
packages/browser-next/dist/logger.js 1.87 kB
packages/browser-next/dist/logger.mjs 581 B
packages/browser-next/dist/posthog.js 33.2 kB
packages/browser-next/dist/posthog.mjs 30.9 kB
packages/browser-next/dist/rate-limiter.js 2.89 kB
packages/browser-next/dist/rate-limiter.mjs 1.58 kB
packages/browser-next/dist/request.js 4.61 kB
packages/browser-next/dist/request.mjs 3.21 kB
packages/browser-next/dist/state.js 24.9 kB
packages/browser-next/dist/state.mjs 23.2 kB
packages/browser-next/dist/types.js 585 B
packages/browser-next/dist/types.mjs 12 B
packages/browser-next/dist/version.js 1.31 kB
packages/browser-next/dist/version.mjs 45 B
packages/browser/dist/all-external-dependencies.js 364 kB
packages/browser/dist/conversations.js 69 kB
packages/browser/dist/crisp-chat-integration.js 2.01 kB
packages/browser/dist/customizations.full.js 16.1 kB
packages/browser/dist/customizations.js 15.9 kB
packages/browser/dist/dead-clicks-autocapture.js 18.3 kB
packages/browser/dist/element-inference.js 5.6 kB
packages/browser/dist/exception-autocapture.js 13.7 kB
packages/browser/dist/extension-bundles.js 156 kB
packages/browser/dist/external-scripts-loader.js 3.58 kB
packages/browser/dist/intercom-integration.js 2.06 kB
packages/browser/dist/lazy-********.js 204 kB
packages/browser/dist/logs.js 5.82 kB
packages/browser/dist/posthog-********.js 204 kB
packages/browser/dist/product-tours-preview.js 82.4 kB
packages/browser/dist/product-tours.js 124 kB
packages/browser/dist/recorder-v2.js 128 kB
packages/browser/dist/recorder.js 128 kB
packages/browser/dist/rrweb-plugin-console-record.js 7.57 kB
packages/browser/dist/rrweb-types.js 2.41 kB
packages/browser/dist/rrweb.js 321 kB
packages/browser/dist/surveys-preview.js 81.3 kB
packages/browser/dist/surveys.js 102 kB
packages/browser/dist/tracing-headers.js 3.74 kB
packages/browser/dist/web-vitals-soft-navs.js 9.94 kB
packages/browser/dist/web-vitals-with-attribution-soft-navs.js 25.6 kB
packages/browser/dist/web-vitals-with-attribution.js 25.5 kB
packages/browser/dist/web-vitals.js 9.92 kB
packages/browser/react/dist/esm/index.js 22.1 kB
packages/browser/react/dist/esm/slim/index.js 18.5 kB
packages/browser/react/dist/esm/surveys/index.js 3.61 kB
packages/browser/react/dist/umd/index.js 26.4 kB
packages/browser/react/dist/umd/slim/index.js 22.3 kB
packages/browser/react/dist/umd/surveys/index.js 5.63 kB
packages/convex/dist/client/feature-flags/crypto.js 76 B
packages/convex/dist/client/feature-flags/evaluator.js 14.9 kB
packages/convex/dist/client/feature-flags/index.js 196 B
packages/convex/dist/client/feature-flags/match-********.js 5.08 kB
packages/convex/dist/client/feature-flags/types.js 44 B
packages/convex/dist/client/index.js 14.8 kB
packages/convex/dist/component/_generated/api.js 712 B
packages/convex/dist/component/_generated/component.js 212 B
packages/convex/dist/component/_generated/dataModel.js 230 B
packages/convex/dist/component/_generated/server.js 3.74 kB
packages/convex/dist/component/convex.config.js 1.66 kB
packages/convex/dist/component/crons.js 969 B
packages/convex/dist/component/lib.js 24.8 kB
packages/convex/dist/component/schema.js 1.17 kB
packages/convex/dist/component/version.js 67 B
packages/core/dist/cookie.js 5.44 kB
packages/core/dist/cookie.mjs 3.12 kB
packages/core/dist/error-tracking/chunk-ids.js 2.64 kB
packages/core/dist/error-tracking/chunk-ids.mjs 1.31 kB
packages/core/dist/error-tracking/coercers/dom-exception-coercer.js 2.4 kB
packages/core/dist/error-tracking/coercers/dom-exception-coercer.mjs 993 B
packages/core/dist/error-tracking/coercers/error-coercer.js 2.23 kB
packages/core/dist/error-tracking/coercers/error-coercer.mjs 888 B
packages/core/dist/error-tracking/coercers/error-event-coercer.js 2.45 kB
packages/core/dist/error-tracking/coercers/error-event-coercer.mjs 1.05 kB
packages/core/dist/error-tracking/coercers/event-coercer.js 1.92 kB
packages/core/dist/error-tracking/coercers/event-coercer.mjs 548 B
packages/core/dist/error-tracking/coercers/index.js 5.82 kB
packages/core/dist/error-tracking/coercers/index.mjs 326 B
packages/core/dist/error-tracking/coercers/object-coercer.js 4.13 kB
packages/core/dist/error-tracking/coercers/object-coercer.mjs 2.53 kB
packages/core/dist/error-tracking/coercers/primitive-coercer.js 1.76 kB
packages/core/dist/error-tracking/coercers/primitive-coercer.mjs 419 B
packages/core/dist/error-tracking/coercers/promise-rejection-event.js 2.69 kB
packages/core/dist/error-tracking/coercers/promise-rejection-event.mjs 1.25 kB
packages/core/dist/error-tracking/coercers/string-coercer.js 2.11 kB
packages/core/dist/error-tracking/coercers/string-coercer.mjs 820 B
packages/core/dist/error-tracking/coercers/utils.js 2.16 kB
packages/core/dist/error-tracking/coercers/utils.mjs 716 B
packages/core/dist/error-tracking/error-properties-builder.js 5.66 kB
packages/core/dist/error-tracking/error-properties-builder.mjs 4.23 kB
packages/core/dist/error-tracking/exception-steps.js 6.1 kB
packages/core/dist/error-tracking/exception-steps.mjs 3.83 kB
packages/core/dist/error-tracking/index.js 4.62 kB
packages/core/dist/error-tracking/index.mjs 222 B
packages/core/dist/error-tracking/parsers/base.js 2.11 kB
packages/core/dist/error-tracking/parsers/base.mjs 640 B
packages/core/dist/error-tracking/parsers/chrome.js 2.83 kB
packages/core/dist/error-tracking/parsers/chrome.mjs 1.32 kB
packages/core/dist/error-tracking/parsers/gecko.js 2.57 kB
packages/core/dist/error-tracking/parsers/gecko.mjs 1.13 kB
packages/core/dist/error-tracking/parsers/index.js 4.85 kB
packages/core/dist/error-tracking/parsers/index.mjs 2.01 kB
packages/core/dist/error-tracking/parsers/node.js 4.31 kB
packages/core/dist/error-tracking/parsers/node.mjs 2.95 kB
packages/core/dist/error-tracking/parsers/opera.js 2.35 kB
packages/core/dist/error-tracking/parsers/opera.mjs 746 B
packages/core/dist/error-tracking/parsers/safari.js 1.98 kB
packages/core/dist/error-tracking/parsers/safari.mjs 574 B
packages/core/dist/error-tracking/parsers/winjs.js 1.82 kB
packages/core/dist/error-tracking/parsers/winjs.mjs 426 B
packages/core/dist/error-tracking/release.js 1.52 kB
packages/core/dist/error-tracking/release.mjs 203 B
packages/core/dist/error-tracking/types.js 1.42 kB
packages/core/dist/error-tracking/types.mjs 131 B
packages/core/dist/error-tracking/utils.js 1.9 kB
packages/core/dist/error-tracking/utils.mjs 604 B
packages/core/dist/eventemitter.js 1.88 kB
packages/core/dist/eventemitter.mjs 571 B
packages/core/dist/featureFlagLocalEvaluation.js 22.2 kB
packages/core/dist/featureFlagLocalEvaluation.mjs 19.6 kB
packages/core/dist/featureFlagUtils.js 8.59 kB
packages/core/dist/featureFlagUtils.mjs 5.49 kB
packages/core/dist/gzip.js 5.88 kB
packages/core/dist/gzip.mjs 3.87 kB
packages/core/dist/index.js 22.6 kB
packages/core/dist/index.mjs 1.69 kB
packages/core/dist/logs/index.js 10.9 kB
packages/core/dist/logs/index.mjs 9.16 kB
packages/core/dist/logs/logs-utils.js 6.69 kB
packages/core/dist/logs/logs-utils.mjs 4.51 kB
packages/core/dist/logs/types.js 585 B
packages/core/dist/logs/types.mjs 12 B
packages/core/dist/metrics/config.js 2.05 kB
packages/core/dist/metrics/config.mjs 735 B
packages/core/dist/metrics/index.js 14.5 kB
packages/core/dist/metrics/index.mjs 12 kB
packages/core/dist/metrics/metrics-utils.js 3.75 kB
packages/core/dist/metrics/metrics-utils.mjs 1.71 kB
packages/core/dist/metrics/types.js 585 B
packages/core/dist/metrics/types.mjs 12 B
packages/core/dist/posthog-core-stateless.js 47 kB
packages/core/dist/posthog-core-stateless.mjs 43.6 kB
packages/core/dist/posthog-core.js 49.6 kB
packages/core/dist/posthog-core.mjs 43.9 kB
packages/core/dist/surveys/activation.js 2.29 kB
packages/core/dist/surveys/activation.mjs 572 B
packages/core/dist/surveys/events.js 4.36 kB
packages/core/dist/surveys/events.mjs 2.05 kB
packages/core/dist/surveys/index.js 6.64 kB
packages/core/dist/surveys/index.mjs 798 B
packages/core/dist/surveys/keys.js 1.8 kB
packages/core/dist/surveys/keys.mjs 350 B
packages/core/dist/surveys/property-********.js 3.78 kB
packages/core/dist/surveys/property-********.mjs 2.14 kB
packages/core/dist/surveys/translations.js 9.18 kB
packages/core/dist/surveys/translations.mjs 6.83 kB
packages/core/dist/surveys/validation.js 3.15 kB
packages/core/dist/surveys/validation.mjs 1.51 kB
packages/core/dist/testing/index.js 2.76 kB
packages/core/dist/testing/index.mjs 79 B
packages/core/dist/testing/PostHogCoreTestClient.js 3.33 kB
packages/core/dist/testing/PostHogCoreTestClient.mjs 1.82 kB
packages/core/dist/testing/test-utils.js 2.9 kB
packages/core/dist/testing/test-utils.mjs 1.11 kB
packages/core/dist/tracing-headers.js 3.48 kB
packages/core/dist/tracing-headers.mjs 2.08 kB
packages/core/dist/types.js 8.39 kB
packages/core/dist/types.mjs 5.23 kB
packages/core/dist/utils/bot-detection.js 3.38 kB
packages/core/dist/utils/bot-detection.mjs 1.96 kB
packages/core/dist/utils/browser-utils.js 1.57 kB
packages/core/dist/utils/browser-utils.mjs 182 B
packages/core/dist/utils/bucketed-rate-limiter.js 4.32 kB
packages/core/dist/utils/bucketed-rate-limiter.mjs 2.22 kB
packages/core/dist/utils/index.js 15.4 kB
packages/core/dist/utils/index.mjs 3.34 kB
packages/core/dist/utils/json-utils.js 6.74 kB
packages/core/dist/utils/json-utils.mjs 4.45 kB
packages/core/dist/utils/logger.js 2.68 kB
packages/core/dist/utils/logger.mjs 1.29 kB
packages/core/dist/utils/number-utils.js 3.42 kB
packages/core/dist/utils/number-utils.mjs 1.68 kB
packages/core/dist/utils/otlp-********.js 2.76 kB
packages/core/dist/utils/otlp-********.mjs 1.18 kB
packages/core/dist/utils/otlp-any-value.js 7.96 kB
packages/core/dist/utils/otlp-any-value.mjs 5.77 kB
packages/core/dist/utils/promise-queue.js 2.58 kB
packages/core/dist/utils/promise-queue.mjs 1.25 kB
packages/core/dist/utils/string-utils.js 3.83 kB
packages/core/dist/utils/string-utils.mjs 1.97 kB
packages/core/dist/utils/type-utils.js 7.52 kB
packages/core/dist/utils/type-utils.mjs 3.27 kB
packages/core/dist/utils/user-agent-utils.js 18.5 kB
packages/core/dist/utils/user-agent-utils.mjs 14.7 kB
packages/core/dist/vendor/uuidv7.js 8.36 kB
packages/core/dist/vendor/uuidv7.mjs 6.7 kB
packages/mcp/dist/extensions/analytics-parameters.js 6.63 kB
packages/mcp/dist/extensions/analytics-parameters.mjs 4.27 kB
packages/mcp/dist/extensions/capture.js 4.04 kB
packages/mcp/dist/extensions/capture.mjs 2.58 kB
packages/mcp/dist/extensions/client-********.js 6.33 kB
packages/mcp/dist/extensions/client-********.mjs 3.71 kB
packages/mcp/dist/extensions/compatibility.js 5.45 kB
packages/mcp/dist/extensions/compatibility.mjs 3.4 kB
packages/mcp/dist/extensions/constants.js 5.45 kB
packages/mcp/dist/extensions/constants.mjs 2.94 kB
packages/mcp/dist/extensions/context-parameters.js 2.85 kB
packages/mcp/dist/extensions/context-parameters.mjs 893 B
packages/mcp/dist/extensions/conversation-id.js 6.41 kB
packages/mcp/dist/extensions/conversation-id.mjs 3.58 kB
packages/mcp/dist/extensions/detect.js 3.87 kB
packages/mcp/dist/extensions/detect.mjs 1.49 kB
packages/mcp/dist/extensions/event-types.js 1.78 kB
packages/mcp/dist/extensions/event-types.mjs 459 B
packages/mcp/dist/extensions/exceptions.js 2.67 kB
packages/mcp/dist/extensions/exceptions.mjs 1.19 kB
packages/mcp/dist/extensions/headers.js 2.08 kB
packages/mcp/dist/extensions/headers.mjs 643 B
packages/mcp/dist/extensions/ids.js 2.11 kB
packages/mcp/dist/extensions/ids.mjs 637 B
packages/mcp/dist/extensions/instrument-********.js 5.02 kB
packages/mcp/dist/extensions/instrument-********.mjs 3.18 kB
packages/mcp/dist/extensions/instrument-highlevel.js 12.8 kB
packages/mcp/dist/extensions/instrument-highlevel.mjs 10.2 kB
packages/mcp/dist/extensions/instrumentation.js 27.9 kB
packages/mcp/dist/extensions/instrumentation.mjs 21.9 kB
packages/mcp/dist/extensions/intent.js 3.3 kB
packages/mcp/dist/extensions/intent.mjs 1.64 kB
packages/mcp/dist/extensions/internal.js 7.63 kB
packages/mcp/dist/extensions/internal.mjs 5.23 kB
packages/mcp/dist/extensions/lib-********.js 1.7 kB
packages/mcp/dist/extensions/lib-********.mjs 267 B
packages/mcp/dist/extensions/logger.js 1.81 kB
packages/mcp/dist/extensions/logger.mjs 380 B
packages/mcp/dist/extensions/mcp-********.js 4.78 kB
packages/mcp/dist/extensions/mcp-********.mjs 3.3 kB
packages/mcp/dist/extensions/mcp-sdk-compat.js 5.13 kB
packages/mcp/dist/extensions/mcp-sdk-compat.mjs 2.9 kB
packages/mcp/dist/extensions/model-parameters.js 3.7 kB
packages/mcp/dist/extensions/model-parameters.mjs 1.53 kB
packages/mcp/dist/extensions/output-instructions.js 6.21 kB
packages/mcp/dist/extensions/output-instructions.mjs 3.91 kB
packages/mcp/dist/extensions/posthog-events.js 11.8 kB
packages/mcp/dist/extensions/posthog-events.mjs 7.98 kB
packages/mcp/dist/extensions/posthog-mcp.js 9.69 kB
packages/mcp/dist/extensions/posthog-mcp.mjs 7.12 kB
packages/mcp/dist/extensions/request-headers.js 2.27 kB
packages/mcp/dist/extensions/request-headers.mjs 963 B
packages/mcp/dist/extensions/sanitization.js 4.72 kB
packages/mcp/dist/extensions/sanitization.mjs 2.96 kB
packages/mcp/dist/extensions/session-token.js 5.47 kB
packages/mcp/dist/extensions/session-token.mjs 3.6 kB
packages/mcp/dist/extensions/session.js 6.74 kB
packages/mcp/dist/extensions/session.mjs 4.12 kB
packages/mcp/dist/extensions/sink.js 4.47 kB
packages/mcp/dist/extensions/sink.mjs 2.67 kB
packages/mcp/dist/extensions/tools.js 3.61 kB
packages/mcp/dist/extensions/tools.mjs 1.63 kB
packages/mcp/dist/extensions/tracing-helpers.js 2.51 kB
packages/mcp/dist/extensions/tracing-helpers.mjs 772 B
packages/mcp/dist/extensions/transport-********.js 3 kB
packages/mcp/dist/extensions/transport-********.mjs 1.09 kB
packages/mcp/dist/extensions/truncation.js 11.6 kB
packages/mcp/dist/extensions/truncation.mjs 9.79 kB
packages/mcp/dist/index.js 8.88 kB
packages/mcp/dist/index.mjs 4.76 kB
packages/mcp/dist/types.js 585 B
packages/mcp/dist/types.mjs 12 B
packages/mcp/dist/version.js 1.31 kB
packages/mcp/dist/version.mjs 46 B
packages/next/dist/app/PostHogProvider.js 5.37 kB
packages/next/dist/client/ClientPostHogProvider.js 2.28 kB
packages/next/dist/client/hooks.js 172 B
packages/next/dist/client/PostHogPageView.js 4.23 kB
packages/next/dist/index.client.js 401 B
packages/next/dist/index.edge.js 570 B
packages/next/dist/index.js 554 B
packages/next/dist/index.react-server.js 420 B
packages/next/dist/middleware/postHogMiddleware.js 4.08 kB
packages/next/dist/pages.client.js 225 B
packages/next/dist/pages.edge.js 294 B
packages/next/dist/pages.js 347 B
packages/next/dist/pages/createPostHog.js 1.48 kB
packages/next/dist/pages/getServerSidePostHog.js 1.48 kB
packages/next/dist/pages/PostHogPageView.js 1.77 kB
packages/next/dist/pages/PostHogProvider.js 1.58 kB
packages/next/dist/server.edge.js 795 B
packages/next/dist/server/captureRequestError.js 5.26 kB
packages/next/dist/server/clientCache.edge.js 305 B
packages/next/dist/server/clientCache.js 1.53 kB
packages/next/dist/server/clientCache.node.js 305 B
packages/next/dist/server/createPostHog.js 1.44 kB
packages/next/dist/server/getPostHog.js 3.45 kB
packages/next/dist/server/onRequestError.js 1.39 kB
packages/next/dist/server/onRequestError.types.js 59 B
packages/next/dist/shared/browser.js 195 B
packages/next/dist/shared/config.js 2.23 kB
packages/next/dist/shared/constants.js 201 B
packages/next/dist/shared/cookie.js 540 B
packages/next/dist/shared/identity.js 2.56 kB
packages/next/dist/shared/tracing-headers.js 2.18 kB
packages/nextjs-config/dist/config.js 10.6 kB
packages/nextjs-config/dist/config.mjs 8.96 kB
packages/nextjs-config/dist/index.js 2.21 kB
packages/nextjs-config/dist/index.mjs 30 B
packages/nextjs-config/dist/strip-sourcemap-********.js 4.91 kB
packages/nextjs-config/dist/strip-sourcemap-********.mjs 2.96 kB
packages/nextjs-config/dist/utils.js 3.93 kB
packages/nextjs-config/dist/utils.mjs 1.72 kB
packages/node/dist/ai-capture/batching.js 2.71 kB
packages/node/dist/ai-capture/batching.mjs 1.21 kB
packages/node/dist/ai-capture/routing.js 1.96 kB
packages/node/dist/ai-capture/routing.mjs 264 B
packages/node/dist/capture-v1/config.js 1.59 kB
packages/node/dist/capture-v1/config.mjs 283 B
packages/node/dist/capture-v1/errors.js 1.99 kB
packages/node/dist/capture-v1/errors.mjs 694 B
packages/node/dist/capture-v1/routing.js 1.77 kB
packages/node/dist/capture-v1/routing.mjs 279 B
packages/node/dist/capture-v1/sender.js 11.5 kB
packages/node/dist/capture-v1/sender.mjs 9.94 kB
packages/node/dist/capture-v1/transform.js 5.22 kB
packages/node/dist/capture-v1/transform.mjs 3.65 kB
packages/node/dist/capture-v1/types.js 585 B
packages/node/dist/capture-v1/types.mjs 12 B
packages/node/dist/client.js 59.6 kB
packages/node/dist/client.mjs 56.1 kB
packages/node/dist/entrypoints/index.edge.js 3.66 kB
packages/node/dist/entrypoints/index.edge.mjs 720 B
packages/node/dist/entrypoints/index.node.js 5.7 kB
packages/node/dist/entrypoints/index.node.mjs 1.43 kB
packages/node/dist/entrypoints/nestjs.js 2.27 kB
packages/node/dist/entrypoints/nestjs.mjs 42 B
packages/node/dist/experimental.js 852 B
packages/node/dist/experimental.mjs 279 B
packages/node/dist/exports.js 6.3 kB
packages/node/dist/exports.mjs 388 B
packages/node/dist/extensions/context/context.js 2.22 kB
packages/node/dist/extensions/context/context.mjs 863 B
packages/node/dist/extensions/context/types.js 585 B
packages/node/dist/extensions/context/types.mjs 12 B
packages/node/dist/extensions/error-tracking/autocapture.js 5.29 kB
packages/node/dist/extensions/error-tracking/autocapture.mjs 3.62 kB
packages/node/dist/extensions/error-tracking/index.js 4.48 kB
packages/node/dist/extensions/error-tracking/index.mjs 3.17 kB
packages/node/dist/extensions/error-tracking/modifiers/context-lines.node.js 11.7 kB
packages/node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs 9.64 kB
packages/node/dist/extensions/error-tracking/modifiers/module.node.js 2.87 kB
packages/node/dist/extensions/error-tracking/modifiers/module.node.mjs 1.45 kB
packages/node/dist/extensions/error-tracking/modifiers/relative-path.node.js 2.07 kB
packages/node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs 624 B
packages/node/dist/extensions/express.js 5.07 kB
packages/node/dist/extensions/express.mjs 2.78 kB
packages/node/dist/extensions/feature-flags/cache.js 585 B
packages/node/dist/extensions/feature-flags/cache.mjs 12 B
packages/node/dist/extensions/feature-flags/crypto.js 1.37 kB
packages/node/dist/extensions/feature-flags/crypto.mjs 42 B
packages/node/dist/extensions/feature-flags/feature-flags.js 32.3 kB
packages/node/dist/extensions/feature-flags/feature-flags.mjs 29.8 kB
packages/node/dist/extensions/nestjs.js 5.71 kB
packages/node/dist/extensions/nestjs.mjs 3.42 kB
packages/node/dist/extensions/sentry-integration.js 4.99 kB
packages/node/dist/extensions/sentry-integration.mjs 3.37 kB
packages/node/dist/extensions/tracing-headers.js 3.41 kB
packages/node/dist/extensions/tracing-headers.mjs 1.53 kB
packages/node/dist/extensions/url-utils.js 2.32 kB
packages/node/dist/extensions/url-utils.mjs 785 B
packages/node/dist/feature-flag-evaluations.js 6.22 kB
packages/node/dist/feature-flag-evaluations.mjs 4.77 kB
packages/node/dist/gzip.node.js 1.83 kB
packages/node/dist/gzip.node.mjs 416 B
packages/node/dist/storage-memory.js 1.61 kB
packages/node/dist/storage-memory.mjs 297 B
packages/node/dist/types.js 1.52 kB
packages/node/dist/types.mjs 224 B
packages/node/dist/version.js 1.31 kB
packages/node/dist/version.mjs 46 B
packages/nuxt/dist/module.mjs 5.92 kB
packages/nuxt/dist/runtime/composables/useFeatureFlagEnabled.js 566 B
packages/nuxt/dist/runtime/composables/useFeatureFlagPayload.js 698 B
packages/nuxt/dist/runtime/composables/useFeatureFlagVariantKey.js 591 B
packages/nuxt/dist/runtime/composables/usePostHog.js 128 B
packages/nuxt/dist/runtime/nitro-plugin-v2.js 480 B
packages/nuxt/dist/runtime/nitro-plugin-v3.js 574 B
packages/nuxt/dist/runtime/nitro-plugin.js 1.03 kB
packages/nuxt/dist/runtime/vue-plugin.js 1.13 kB
packages/openfeature-node-provider/dist/index.js 1.86 kB
packages/openfeature-node-provider/dist/index.mjs 122 B
packages/openfeature-node-provider/dist/mapping.js 5.42 kB
packages/openfeature-node-provider/dist/mapping.mjs 3.21 kB
packages/openfeature-node-provider/dist/provider.js 4.09 kB
packages/openfeature-node-provider/dist/provider.mjs 2.6 kB
packages/openfeature-web-provider/dist/index.js 1.84 kB
packages/openfeature-web-provider/dist/index.mjs 119 B
packages/openfeature-web-provider/dist/mapping.js 5.38 kB
packages/openfeature-web-provider/dist/mapping.mjs 3.18 kB
packages/openfeature-web-provider/dist/provider.js 4.51 kB
packages/openfeature-web-provider/dist/provider.mjs 3.06 kB
packages/plugin-utils/dist/chunk-ids.js 3.96 kB
packages/plugin-utils/dist/chunk-ids.mjs 2.11 kB
packages/plugin-utils/dist/cli.js 4.47 kB
packages/plugin-utils/dist/cli.mjs 2.72 kB
packages/plugin-utils/dist/config.js 3.6 kB
packages/plugin-utils/dist/config.mjs 2.25 kB
packages/plugin-utils/dist/index.js 4.5 kB
packages/plugin-utils/dist/index.mjs 197 B
packages/plugin-utils/dist/spawn-local.js 3.17 kB
packages/plugin-utils/dist/spawn-local.mjs 1.66 kB
packages/plugin-utils/dist/utils.js 3.36 kB
packages/plugin-utils/dist/utils.mjs 1.3 kB
packages/react-native/dist/autocapture.js 8.31 kB
packages/react-native/dist/error-tracking/index.js 9.97 kB
packages/react-native/dist/error-tracking/utils.js 2.58 kB
packages/react-native/dist/frameworks/wix-navigation.js 1.3 kB
packages/react-native/dist/hooks/useFeatureFlag.js 1.86 kB
packages/react-native/dist/hooks/useFeatureFlagResult.js 983 B
packages/react-native/dist/hooks/useFeatureFlags.js 941 B
packages/react-native/dist/hooks/useNavigationTracker.js 2.45 kB
packages/react-native/dist/hooks/usePostHog.js 544 B
packages/react-native/dist/hooks/utils.js 988 B
packages/react-native/dist/index.js 4.33 kB
packages/react-native/dist/logs-********.js 3.66 kB
packages/react-native/dist/native-deps.js 8.73 kB
packages/react-native/dist/optional/OptionalAsyncStorage.js 299 B
packages/react-native/dist/optional/OptionalExpoApplication.js 377 B
packages/react-native/dist/optional/OptionalExpoDevice.js 347 B
packages/react-native/dist/optional/OptionalExpoFileSystem.js 386 B
packages/react-native/dist/optional/OptionalExpoFileSystemLegacy.js 423 B
packages/react-native/dist/optional/OptionalExpoLocalization.js 383 B
packages/react-native/dist/optional/OptionalPlugin.js 1.06 kB
packages/react-native/dist/optional/OptionalReactNativeDeviceInfo.js 415 B
packages/react-native/dist/optional/OptionalReactNativeLocalize.js 303 B
packages/react-native/dist/optional/OptionalReactNativeNavigation.js 415 B
packages/react-native/dist/optional/OptionalReactNativeNavigationWix.js 443 B
packages/react-native/dist/optional/OptionalReactNativeSafeArea.js 644 B
packages/react-native/dist/optional/OptionalReactNativeSvg.js 872 B
packages/react-native/dist/posthog-rn.js 67.4 kB
packages/react-native/dist/PostHogContext.js 329 B
packages/react-native/dist/PostHogErrorBoundary.js 3.19 kB
packages/react-native/dist/PostHogMaskView.js 1.68 kB
packages/react-native/dist/PostHogProvider.js 6 kB
packages/react-native/dist/storage.js 5.76 kB
packages/react-native/dist/surveys/components/BottomSection.js 1.51 kB
packages/react-native/dist/surveys/components/Cancel.js 1.1 kB
packages/react-native/dist/surveys/components/ConfirmationMessage.js 1.76 kB
packages/react-native/dist/surveys/components/IntroMessage.js 1.65 kB
packages/react-native/dist/surveys/components/QuestionHeader.js 1.47 kB
packages/react-native/dist/surveys/components/QuestionTypes.js 14 kB
packages/react-native/dist/surveys/components/SurveyModal.js 7.24 kB
packages/react-native/dist/surveys/components/Surveys.js 6.58 kB
packages/react-native/dist/surveys/getActiveMatchingSurveys.js 2.69 kB
packages/react-native/dist/surveys/icons.js 10 kB
packages/react-native/dist/surveys/index.js 600 B
packages/react-native/dist/surveys/PostHogSurveyProvider.js 6.73 kB
packages/react-native/dist/surveys/safeStyleSheet.js 448 B
packages/react-native/dist/surveys/survey-translations.js 1.11 kB
packages/react-native/dist/surveys/surveys-utils.js 11.5 kB
packages/react-native/dist/surveys/useActivatedSurveys.js 3.68 kB
packages/react-native/dist/surveys/useSurveyStorage.js 2.48 kB
packages/react-native/dist/tooling/expoconfig.js 23.8 kB
packages/react-native/dist/tooling/metroconfig.js 2.32 kB
packages/react-native/dist/tooling/posthogMetroSerializer.js 7.74 kB
packages/react-native/dist/tooling/utils.js 4.2 kB
packages/react-native/dist/tooling/vendor/expo/expoconfig.js 70 B
packages/react-native/dist/tooling/vendor/metro/countLines.js 237 B
packages/react-native/dist/tooling/vendor/metro/utils.js 3.51 kB
packages/react-native/dist/types.js 70 B
packages/react-native/dist/utils.js 1.3 kB
packages/react-native/dist/version.js 130 B
packages/react/dist/esm/index.js 22.1 kB
packages/react/dist/esm/slim/index.js 18.5 kB
packages/react/dist/esm/surveys/index.js 3.61 kB
packages/react/dist/umd/index.js 26.4 kB
packages/react/dist/umd/slim/index.js 22.3 kB
packages/react/dist/umd/surveys/index.js 5.63 kB
packages/rollup-plugin/dist/index.js 10.2 kB
packages/rrweb/all/dist/rrweb-all.cjs 639 kB
packages/rrweb/all/dist/rrweb-all.js 638 kB
packages/rrweb/all/dist/rrweb-all.umd.cjs 670 kB
packages/rrweb/all/dist/rrweb-all.umd.min.cjs 331 kB
packages/rrweb/packer/dist/browser-********.cjs 17.9 kB
packages/rrweb/packer/dist/browser-********.js 17.5 kB
packages/rrweb/packer/dist/pack.cjs 401 B
packages/rrweb/packer/dist/pack.js 301 B
packages/rrweb/packer/dist/pack.umd.cjs 1.67 kB
packages/rrweb/packer/dist/pack.umd.min.cjs 1.11 kB
packages/rrweb/packer/dist/packer.cjs 276 B
packages/rrweb/packer/dist/packer.js 133 B
packages/rrweb/packer/dist/packer.umd.cjs 694 B
packages/rrweb/packer/dist/packer.umd.min.cjs 626 B
packages/rrweb/packer/dist/unpack.cjs 737 B
packages/rrweb/packer/dist/unpack.js 637 B
packages/rrweb/packer/dist/unpack.umd.cjs 1.14 kB
packages/rrweb/packer/dist/unpack.umd.min.cjs 953 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.cjs 34.9 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.js 34.8 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.umd.cjs 37 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.umd.min.cjs 22.9 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.cjs 31.8 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.js 31.7 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.umd.cjs 33.7 kB
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.umd.min.cjs 21.1 kB
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.cjs 16.8 kB
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.js 16.7 kB
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.umd.cjs 16 kB
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.umd.min.cjs 8.55 kB
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.cjs 6.47 kB
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.js 6.38 kB
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.umd.cjs 6.69 kB
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.umd.min.cjs 3.57 kB
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.cjs 663 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.js 540 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.umd.cjs 1.1 kB
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.umd.min.cjs 827 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.cjs 816 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.js 715 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.umd.cjs 1.25 kB
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.umd.min.cjs 966 B
packages/rrweb/record/dist/rrweb-record.cjs 217 kB
packages/rrweb/record/dist/rrweb-record.js 217 kB
packages/rrweb/record/dist/rrweb-record.umd.cjs 221 kB
packages/rrweb/record/dist/rrweb-record.umd.min.cjs 108 kB
packages/rrweb/replay/dist/rrweb-replay.cjs 425 kB
packages/rrweb/replay/dist/rrweb-replay.js 425 kB
packages/rrweb/replay/dist/rrweb-replay.umd.cjs 449 kB
packages/rrweb/replay/dist/rrweb-replay.umd.min.cjs 223 kB
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.cjs 141 kB
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.js 142 kB
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.umd.cjs 154 kB
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.umd.min.cjs 75.9 kB
packages/rrweb/rrdom/dist/rrdom.cjs 167 kB
packages/rrweb/rrdom/dist/rrdom.js 166 kB
packages/rrweb/rrdom/dist/rrdom.umd.cjs 178 kB
packages/rrweb/rrdom/dist/rrdom.umd.min.cjs 86.5 kB
packages/rrweb/rrweb-snapshot/dist/rebuild-********.cjs 133 kB
packages/rrweb/rrweb-snapshot/dist/rebuild-********.js 132 kB
packages/rrweb/rrweb-snapshot/dist/record.cjs 4.27 kB
packages/rrweb/rrweb-snapshot/dist/record.js 2.99 kB
packages/rrweb/rrweb-snapshot/dist/record.umd.cjs 92.4 kB
packages/rrweb/rrweb-snapshot/dist/record.umd.min.cjs 43.4 kB
packages/rrweb/rrweb-snapshot/dist/replay.cjs 1.9 kB
packages/rrweb/rrweb-snapshot/dist/replay.js 1.27 kB
packages/rrweb/rrweb-snapshot/dist/replay.umd.cjs 204 kB
packages/rrweb/rrweb-snapshot/dist/replay.umd.min.cjs 90.1 kB
packages/rrweb/rrweb-snapshot/dist/rrweb-********.cjs 4.55 kB
packages/rrweb/rrweb-snapshot/dist/rrweb-********.js 3.17 kB
packages/rrweb/rrweb-snapshot/dist/rrweb-********.umd.cjs 247 kB
packages/rrweb/rrweb-snapshot/dist/rrweb-********.umd.min.cjs 111 kB
packages/rrweb/rrweb-snapshot/dist/snapshot-********.cjs 34.1 kB
packages/rrweb/rrweb-snapshot/dist/snapshot-********.js 32.2 kB
packages/rrweb/rrweb-snapshot/dist/types-********.cjs 48.1 kB
packages/rrweb/rrweb-snapshot/dist/types-********.js 42.9 kB
packages/rrweb/rrweb/dist/rrweb.cjs 624 kB
packages/rrweb/rrweb/dist/rrweb.js 623 kB
packages/rrweb/rrweb/dist/rrweb.umd.cjs 652 kB
packages/rrweb/rrweb/dist/rrweb.umd.min.cjs 322 kB
packages/rrweb/types/dist/rrweb-types.cjs 5.8 kB
packages/rrweb/types/dist/rrweb-types.js 5.5 kB
packages/rrweb/types/dist/rrweb-types.umd.cjs 6.06 kB
packages/rrweb/types/dist/rrweb-types.umd.min.cjs 2.95 kB
packages/rrweb/utils/dist/rrweb-utils.cjs 8.84 kB
packages/rrweb/utils/dist/rrweb-utils.js 8.36 kB
packages/rrweb/utils/dist/rrweb-utils.umd.cjs 9.33 kB
packages/rrweb/utils/dist/rrweb-utils.umd.min.cjs 4.53 kB
packages/types/dist/capture-log.js 585 B
packages/types/dist/capture-log.mjs 12 B
packages/types/dist/capture-metric.js 1.47 kB
packages/types/dist/capture-metric.mjs 93 B
packages/types/dist/capture.js 585 B
packages/types/dist/capture.mjs 12 B
packages/types/dist/common.js 585 B
packages/types/dist/common.mjs 12 B
packages/types/dist/feature-flags.js 585 B
packages/types/dist/feature-flags.mjs 12 B
packages/types/dist/index.js 1.55 kB
packages/types/dist/index.mjs 75 B
packages/types/dist/posthog-config.js 585 B
packages/types/dist/posthog-config.mjs 12 B
packages/types/dist/posthog.js 585 B
packages/types/dist/posthog.mjs 12 B
packages/types/dist/request.js 585 B
packages/types/dist/request.mjs 12 B
packages/types/dist/segment.js 585 B
packages/types/dist/segment.mjs 12 B
packages/types/dist/session-recording.js 585 B
packages/types/dist/session-recording.mjs 12 B
packages/types/dist/survey.js 585 B
packages/types/dist/survey.mjs 12 B
packages/types/dist/toolbar.js 585 B
packages/types/dist/toolbar.mjs 12 B
packages/types/dist/tree-shakeable.js 585 B
packages/types/dist/tree-shakeable.mjs 12 B
packages/web/dist/index.cjs 8.87 kB
packages/web/dist/index.mjs 8.72 kB
packages/webpack-plugin/dist/config.js 2.38 kB
packages/webpack-plugin/dist/config.mjs 1.31 kB
packages/webpack-plugin/dist/index.js 9.29 kB
packages/webpack-plugin/dist/index.mjs 5.51 kB
tooling/changelog/dist/index.js 3.31 kB
tooling/rollup-utils/dist/index.js 1.17 kB

compressed-size-action

@posthog

posthog Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

PostHog Review alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review

Found 2 consider.

Comment thread .changeset/warn-volatile-persistence-anonymous-persons.md Outdated
Comment thread packages/browser/src/posthog-core.ts Outdated
posthog Bot added 3 commits September 4, 2026 22:51
sessionStorage survives same-tab reloads and navigation, so it mints a new
distinct ID per tab or window rather than per page load. Split the lifetimes
in the changeset so the release note matches the shipped warning text.

Generated-By: PostHog Desktop
Task-Id: 1167d033-4f81-4a81-b691-e29560cb7ed3
…he identity warning

disable_persistence removes the store and blocks every write, so the distinct
ID is dropped on each page load whatever `persistence` is set to. The warning
tested the storage mode first, so `{ persistence: 'sessionStorage',
disable_persistence: true }` reported the slower per-tab lifetime and offered
'localStorage+cookie', a remedy that stabilizes nothing while persistence stays
off. Check disable_persistence first, and name both changes in the
durable-storage remedy when the configured mode is itself volatile.

Generated-By: PostHog Desktop
Task-Id: 1167d033-4f81-4a81-b691-e29560cb7ed3
…rences

The two new private members on PostHog need entries in terser-mangled-names.json, and the persistence JSDoc addition changes the generated public API reference.

Generated-By: PostHog Desktop
Task-Id: 406c89f8-06a7-4f15-a097-1761a5b651c4

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review

Found 2 consider.

Comment on lines +608 to +610
private _warnIfVolatileIdentityCreatesAnonymousPersons(): void {
if (this._hasResolvedInitialDistinctId && this.config.person_profiles === 'always') {
this._warnIfVolatileIdentityWithoutStableId()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Segment anonymous users bypass the new warning

consider bug

Why we think it's a valid issue
  • Checked: the guard list in _warnIfVolatileIdentityWithoutStableId() (packages/browser/src/posthog-core.ts:552-554), the init order in _init(), setupPostHogFromSegment() / bootstrapUser() in packages/browser/src/extensions/segment-integration.ts, the capture_pageview default, _hasPersonProcessing(), and the guard's state on main via git show main:packages/browser/src/posthog-core.ts.
  • Found: the premise holds. _init() registers distinct_id from this.config.get_device_id(uuidv7()) at packages/browser/src/posthog-core.ts:1033-1046, before setupSegmentIntegration(this, () => this._loaded()) runs at packages/browser/src/posthog-core.ts:1059. PostHog mints its own ID first.
  • Found: bootstrapUser() (packages/browser/src/extensions/segment-integration.ts:93-108) replaces posthog.config.get_device_id with Segment's anonymous-ID getter, but it registers distinct_id: user.id() only when user.id() exists. For a visitor who never identifies, it registers no distinct ID, so PostHog keeps the volatile uuid. The comment at packages/browser/src/posthog-core.ts:552 — "Segment ... supplies its stable user/anonymous ID before events load" — is true only for an identified Segment user.
  • Found: PostHog still sends its own events on that ID. capture_pageview defaults to 'history_change' or true (packages/browser/src/posthog-core.ts:259) and _loaded() captures the initial pageview (packages/browser/src/posthog-core.ts:1340-1345). _hasPersonProcessing() returns true for 'always' (packages/browser/src/posthog-core.ts:4432), so each page load creates a separate anonymous person while the warning stays silent.
  • Found: the Segment guard itself is unchanged from main, so the diff causes no regression. On main the warning ran only from _requirePersonProcessing(), which a Segment flow reaches through identify() — the path where user.id() does supply a stable ID. The new init path is the first caller for which the exemption's rationale does not hold.
  • Impact: the confirmed consequence is a missing console warning in the configuration Segment + memory/sessionStorage + person_profiles: 'always' + a visitor who never identifies. No captured value changes and no data is lost.
  • Priority: lowered to consider. The gap is verified and sits on the PR's own target case, but the loss is one diagnostic message in a narrow configuration. The primary remedy in the suggestion — adopt Segment's anonymous ID before _loaded() — would change the distinct ID for every anonymous Segment user, far past a warning-only change, and the existing runtimeAnonymousId path shows that the current design avoids that adoption on purpose. Even the narrow remedy needs restructuring: segment.user() can return a promise (packages/browser/src/extensions/segment-integration.ts:110-115), so the bootstrap finishes after the synchronous check at packages/browser/src/posthog-core.ts:1076, and any correct exemption test must move into the Segment done() callback.
Issue description

The new init check calls a helper that exits whenever config.segment exists. Segment bootstrap registers user.id(), but it does not register user.anonymousId() for an anonymous user. PostHog has already generated its own volatile ID before Segment setup. The default $pageview can use that ID and create a person. A memory client repeats this on each load, but the warning never appears.

Suggested fix

Adopt Segment's anonymous ID before _loaded() when no user ID exists. Apply the Segment exemption only when Segment supplied a stable user or anonymous ID. Add coverage for an anonymous Segment user with default pageview capture, person_profiles: 'always', and volatile persistence.

Prompt to fix with AI (copy-paste)
## Context
@packages/browser/src/posthog-core.ts#L608-610

<issue_description>
The new init check calls a helper that exits whenever `config.segment` exists. Segment bootstrap registers `user.id()`, but it does not register `user.anonymousId()` for an anonymous user. PostHog has already generated its own volatile ID before Segment setup. The default `$pageview` can use that ID and create a person. A `memory` client repeats this on each load, but the warning never appears.
</issue_description>

<issue_validation>
- **Checked:** the guard list in `_warnIfVolatileIdentityWithoutStableId()` (`packages/browser/src/posthog-core.ts:552-554`), the init order in `_init()`, `setupPostHogFromSegment()` / `bootstrapUser()` in `packages/browser/src/extensions/segment-integration.ts`, the `capture_pageview` default, `_hasPersonProcessing()`, and the guard's state on `main` via `git show main:packages/browser/src/posthog-core.ts`.
- **Found:** the premise holds. `_init()` registers `distinct_id` from `this.config.get_device_id(uuidv7())` at `packages/browser/src/posthog-core.ts:1033-1046`, before `setupSegmentIntegration(this, () => this._loaded())` runs at `packages/browser/src/posthog-core.ts:1059`. PostHog mints its own ID first.
- **Found:** `bootstrapUser()` (`packages/browser/src/extensions/segment-integration.ts:93-108`) replaces `posthog.config.get_device_id` with Segment's anonymous-ID getter, but it registers `distinct_id: user.id()` only when `user.id()` exists. For a visitor who never identifies, it registers no distinct ID, so PostHog keeps the volatile uuid. The comment at `packages/browser/src/posthog-core.ts:552` — "Segment ... supplies its stable user/anonymous ID before events load" — is true only for an identified Segment user.
- **Found:** PostHog still sends its own events on that ID. `capture_pageview` defaults to `'history_change'` or `true` (`packages/browser/src/posthog-core.ts:259`) and `_loaded()` captures the initial pageview (`packages/browser/src/posthog-core.ts:1340-1345`). `_hasPersonProcessing()` returns `true` for `'always'` (`packages/browser/src/posthog-core.ts:4432`), so each page load creates a separate anonymous person while the warning stays silent.
- **Found:** the Segment guard itself is unchanged from `main`, so the diff causes no regression. On `main` the warning ran only from `_requirePersonProcessing()`, which a Segment flow reaches through `identify()` — the path where `user.id()` does supply a stable ID. The new init path is the first caller for which the exemption's rationale does not hold.
- **Impact:** the confirmed consequence is a missing console warning in the configuration Segment + `memory`/`sessionStorage` + `person_profiles: 'always'` + a visitor who never identifies. No captured value changes and no data is lost.
- **Priority:** lowered to `consider`. The gap is verified and sits on the PR's own target case, but the loss is one diagnostic message in a narrow configuration. The primary remedy in the suggestion — adopt Segment's anonymous ID before `_loaded()` — would change the distinct ID for every anonymous Segment user, far past a warning-only change, and the existing `runtimeAnonymousId` path shows that the current design avoids that adoption on purpose. Even the narrow remedy needs restructuring: `segment.user()` can return a promise (`packages/browser/src/extensions/segment-integration.ts:110-115`), so the bootstrap finishes after the synchronous check at `packages/browser/src/posthog-core.ts:1076`, and any correct exemption test must move into the Segment `done()` callback.
</issue_validation>

## Task
Investigate the issue and solve it

<potential_solution>
Adopt Segment's anonymous ID before `_loaded()` when no user ID exists. Apply the Segment exemption only when Segment supplied a stable user or anonymous ID. Add coverage for an anonymous Segment user with default pageview capture, `person_profiles: 'always'`, and volatile persistence.
</potential_solution>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the gap, but escalating rather than fixing it here — it needs a decision I should not make unattended.

What I verified: the warning helper bails out as soon as a Segment instance is configured, and that bail-out is unchanged from main. For a Segment visitor who never identifies, PostHog registers its own throwaway ID during init, before Segment setup runs. Segment's bootstrap then only swaps the device-ID getter and registers a distinct ID when Segment already has a user ID — so the anonymous case keeps PostHog's throwaway ID. Since pageview capture is on by default, PostHog's own first pageview goes out on that ID, and with volatile persistence plus person_profiles: 'always' that is a fresh anonymous person on every load, silently. Segment's stable anonymous ID does eventually take over, but only after the first Segment-originated event resets PostHog — which is after that initial pageview.

Why I did not implement it:

  • The suggested primary fix (adopt Segment's anonymous ID before load) would change the distinct ID for every anonymous Segment user. That is an identity-behaviour change, well beyond a PR that only adds a console warning, and the existing runtime-anonymous-ID handling suggests the current design avoids that adoption on purpose.
  • The narrow "only exempt Segment when it supplied a stable ID" fix has no clean shape either. Segment's user lookup can be asynchronous, so at the point init runs the check we do not yet know whether a user ID existed; making it correct means deferring the check into Segment's completion callback and threading new state out of the Segment integration. And even a stable Segment anonymous ID would not make suppression correct, because PostHog's first pageview happens before that ID is adopted. There are at least three defensible answers there.
  • This exemption is pre-existing and untouched by this PR, so it is not a regression from these changes.

What a human needs to decide: whether the Segment exemption should be narrowed at all for the person_profiles: 'always' + volatile-persistence case, and if so which of the three readings to take — (a) warn for any Segment client with volatile persistence and always (simplest, but fires for identified Segment users whose distinct ID is in fact stable), (b) defer the check into Segment's completion callback and suppress only when Segment supplied a user ID (correct but restructures init ordering and adds state to the Segment integration), or (c) adopt Segment's anonymous ID at init (fixes the underlying person-per-load behaviour, not just the warning, and is a much larger change). My read is that (b) or (c) belongs in a follow-up scoped to Segment identity rather than in this warning-only PR.

Comment thread packages/browser/src/posthog-core.ts
posthog Bot added 2 commits September 4, 2026 23:35
…ity check

The comment claimed _requirePersonProcessing() never runs under person_profiles:
'always'. It does — calculateEventProperties() calls it on the first captured
event, so the event path already reaches the warning.

State the real reason the init/set_config check exists instead: that trigger
only fires once the first event is captured, which a consent gate or
capture_pageview: false can defer long past init.

Comment only, no behaviour change.

Generated-By: PostHog Desktop
Task-Id: 96fe2251-005e-49c6-ba3b-c2662e07e921
…g text

Both branches of the warning open with the same sentence opener, so build it once and append the branch-specific tail. The emitted text is unchanged; this trims the duplicated literal from every bundle.

Also correct the comment above the init-time check. The warning's only other call site is _requirePersonProcessing(), not calculateEventProperties(), and nothing on the anonymous-profile path reaches it.

Generated-By: PostHog Desktop
Task-Id: 406c89f8-06a7-4f15-a097-1761a5b651c4

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review

Found 1 consider.

Comment thread packages/browser/src/posthog-core.ts Outdated
The volatile-identity warning wrote through the global console, which the Logs
console recorder and session replay both patch. Under person_profiles: 'always'
the warning now fires at init, so every page load of a misconfigured site would
ingest one SDK-authored log record billed to the customer.

Write it through the unpatched method with the existing originalConsoleMethod
helper, the same escape logger._log already uses, so the warning stays visible
in the browser console without being captured.

Generated-By: PostHog Desktop
Task-Id: ae59a390-e50e-45b3-bf76-e6a805df5fe8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants