posthog-js 1.425.0 → 1.426.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/all-external-dependencies.js +1 -1
  2. package/dist/all-external-dependencies.js.map +1 -1
  3. package/dist/array.full.es5.js +1 -1
  4. package/dist/array.full.es5.js.map +1 -1
  5. package/dist/array.full.js +1 -1
  6. package/dist/array.full.js.map +1 -1
  7. package/dist/array.full.no-external.js +1 -1
  8. package/dist/array.full.no-external.js.map +1 -1
  9. package/dist/array.js +1 -1
  10. package/dist/array.js.map +1 -1
  11. package/dist/array.no-external.js +1 -1
  12. package/dist/array.no-external.js.map +1 -1
  13. package/dist/conversations.js +1 -1
  14. package/dist/conversations.js.map +1 -1
  15. package/dist/crisp-chat-integration.js +1 -1
  16. package/dist/crisp-chat-integration.js.map +1 -1
  17. package/dist/customizations.full.js +1 -1
  18. package/dist/customizations.full.js.map +1 -1
  19. package/dist/customizations.js +1 -1
  20. package/dist/customizations.js.map +1 -1
  21. package/dist/dead-clicks-autocapture.js +1 -1
  22. package/dist/dead-clicks-autocapture.js.map +1 -1
  23. package/dist/default-extensions.js +1 -1
  24. package/dist/default-extensions.js.map +1 -1
  25. package/dist/element-inference.js +1 -1
  26. package/dist/element-inference.js.map +1 -1
  27. package/dist/exception-autocapture.js +1 -1
  28. package/dist/exception-autocapture.js.map +1 -1
  29. package/dist/extension-bundles.js +1 -1
  30. package/dist/extension-bundles.js.map +1 -1
  31. package/dist/external-scripts-loader.js +1 -1
  32. package/dist/external-scripts-loader.js.map +1 -1
  33. package/dist/intercom-integration.js +1 -1
  34. package/dist/intercom-integration.js.map +1 -1
  35. package/dist/lazy-recorder.js +1 -1
  36. package/dist/lazy-recorder.js.map +1 -1
  37. package/dist/logs.js +1 -1
  38. package/dist/logs.js.map +1 -1
  39. package/dist/main.js +1 -1
  40. package/dist/main.js.map +1 -1
  41. package/dist/module.d.ts +7 -3
  42. package/dist/module.full.d.ts +7 -3
  43. package/dist/module.full.js +1 -1
  44. package/dist/module.full.js.map +1 -1
  45. package/dist/module.full.no-external.d.ts +7 -3
  46. package/dist/module.full.no-external.js +1 -1
  47. package/dist/module.full.no-external.js.map +1 -1
  48. package/dist/module.js +1 -1
  49. package/dist/module.js.map +1 -1
  50. package/dist/module.no-external.d.ts +7 -3
  51. package/dist/module.no-external.js +1 -1
  52. package/dist/module.no-external.js.map +1 -1
  53. package/dist/module.slim.js +1 -1
  54. package/dist/module.slim.js.map +1 -1
  55. package/dist/module.slim.no-external.d.ts +7 -3
  56. package/dist/module.slim.no-external.js +1 -1
  57. package/dist/module.slim.no-external.js.map +1 -1
  58. package/dist/posthog-recorder.js +1 -1
  59. package/dist/posthog-recorder.js.map +1 -1
  60. package/dist/product-tours-preview.js +1 -1
  61. package/dist/product-tours-preview.js.map +1 -1
  62. package/dist/product-tours.js +1 -1
  63. package/dist/product-tours.js.map +1 -1
  64. package/dist/recorder-v2.js +1 -1
  65. package/dist/recorder-v2.js.map +1 -1
  66. package/dist/recorder.js +1 -1
  67. package/dist/recorder.js.map +1 -1
  68. package/dist/rrweb.d.ts +1 -0
  69. package/dist/rrweb.js +1 -1
  70. package/dist/rrweb.js.map +1 -1
  71. package/dist/src/constants.d.ts +2 -0
  72. package/dist/src/extensions/replay/external/lazy-loaded-session-recorder.d.ts +1 -0
  73. package/dist/src/posthog-core.d.ts +5 -2
  74. package/dist/src/posthog-persistence.d.ts +2 -1
  75. package/dist/surveys-preview.js +1 -1
  76. package/dist/surveys-preview.js.map +1 -1
  77. package/dist/surveys.js +1 -1
  78. package/dist/surveys.js.map +1 -1
  79. package/dist/tracing-headers.js +1 -1
  80. package/dist/tracing-headers.js.map +1 -1
  81. package/dist/web-vitals-soft-navs.js +1 -1
  82. package/dist/web-vitals-soft-navs.js.map +1 -1
  83. package/dist/web-vitals-with-attribution-soft-navs.js +1 -1
  84. package/dist/web-vitals-with-attribution-soft-navs.js.map +1 -1
  85. package/dist/web-vitals-with-attribution.js +1 -1
  86. package/dist/web-vitals-with-attribution.js.map +1 -1
  87. package/dist/web-vitals.js +1 -1
  88. package/dist/web-vitals.js.map +1 -1
  89. package/lib/package.json +6 -7
  90. package/lib/src/constants.d.ts +2 -0
  91. package/lib/src/constants.js +5 -3
  92. package/lib/src/constants.js.map +1 -1
  93. package/lib/src/extensions/replay/external/lazy-loaded-session-recorder.d.ts +1 -0
  94. package/lib/src/extensions/replay/external/lazy-loaded-session-recorder.js +24 -16
  95. package/lib/src/extensions/replay/external/lazy-loaded-session-recorder.js.map +1 -1
  96. package/lib/src/persistence-key-policy.js +1 -0
  97. package/lib/src/persistence-key-policy.js.map +1 -1
  98. package/lib/src/posthog-core.d.ts +5 -2
  99. package/lib/src/posthog-core.js +109 -21
  100. package/lib/src/posthog-core.js.map +1 -1
  101. package/lib/src/posthog-persistence.d.ts +2 -1
  102. package/lib/src/posthog-persistence.js +22 -5
  103. package/lib/src/posthog-persistence.js.map +1 -1
  104. package/lib/src/scroll-manager.js +6 -4
  105. package/lib/src/scroll-manager.js.map +1 -1
  106. package/lib/src/storage.js +1 -0
  107. package/lib/src/storage.js.map +1 -1
  108. package/package.json +11 -20
  109. package/react/dist/esm/index.js +232 -256
  110. package/react/dist/esm/index.js.map +1 -1
  111. package/react/dist/esm/slim/index.js +205 -225
  112. package/react/dist/esm/slim/index.js.map +1 -1
  113. package/react/dist/esm/surveys/index.js +48 -74
  114. package/react/dist/esm/surveys/index.js.map +1 -1
  115. package/react/dist/types/index.d.ts +72 -65
  116. package/react/dist/types/slim/index.d.ts +67 -60
  117. package/react/dist/types/surveys/index.d.ts +15 -16
  118. package/react/dist/umd/index.js +287 -289
  119. package/react/dist/umd/index.js.map +1 -1
  120. package/react/dist/umd/slim/index.js +253 -255
  121. package/react/dist/umd/slim/index.js.map +1 -1
  122. package/react/dist/umd/surveys/index.js +91 -91
  123. package/react/dist/umd/surveys/index.js.map +1 -1
@@ -2835,6 +2835,7 @@ declare class PostHogPersistence {
2835
2835
  private _storageMigrationInProgress;
2836
2836
  private _localIdentityChangePending;
2837
2837
  private _crossTabFeatureFlagIdentityMismatch;
2838
+ private _facebookClickIdChangePending;
2838
2839
  private readonly _crossTabFeatureFlagHandlers;
2839
2840
  private _onStorage?;
2840
2841
  /**
@@ -2935,7 +2936,7 @@ declare class PostHogPersistence {
2935
2936
  */
2936
2937
  register(props: Properties, days?: number): boolean;
2937
2938
  unregister(propOrProps: string | readonly string[]): void;
2938
- update_campaign_params(): void;
2939
+ update_campaign_params(): Properties | undefined;
2939
2940
  update_search_keyword(): void;
2940
2941
  update_referrer_info(): void;
2941
2942
  set_initial_person_info(): void;
@@ -3350,6 +3351,9 @@ declare class PostHog implements PostHogInterface {
3350
3351
  * @param {SnippetArrayItem} item A `[function_name, ...args]` array to be executed.
3351
3352
  */
3352
3353
  push(item: SnippetArrayItem): void;
3354
+ private _getPersistedFacebookClickId;
3355
+ private _updateFacebookClickId;
3356
+ private _markFacebookClickIdDelivered;
3353
3357
  /**
3354
3358
  * Captures an event with optional properties and configuration.
3355
3359
  *
@@ -4122,12 +4126,12 @@ declare class PostHog implements PostHogInterface {
4122
4126
  *
4123
4127
  * @public
4124
4128
  *
4125
- * @param {String} [new_distinct_id] A string that uniquely identifies a user. If not provided, the distinct_id currently in the persistent store (cookie or localStorage) will be used.
4129
+ * @param {String} [new_distinct_id] A non-empty string that uniquely identifies a user.
4126
4130
  * @param {Object} [userPropertiesToSet] Optional: An associative array of properties to store about the user. Note: For feature flag evaluations, if the same key is present in the userPropertiesToSetOnce,
4127
4131
  * it will be overwritten by the value in userPropertiesToSet.
4128
4132
  * @param {Object} [userPropertiesToSetOnce] Optional: An associative array of properties to store about the user. If property is previously set, this does not override that value.
4129
4133
  */
4130
- identify(new_distinct_id?: string, userPropertiesToSet?: Properties, userPropertiesToSetOnce?: Properties): void;
4134
+ identify(new_distinct_id: string, userPropertiesToSet?: Properties, userPropertiesToSetOnce?: Properties): void;
4131
4135
  /**
4132
4136
  * Sets properties on the person profile associated with the current `distinct_id`.
4133
4137
  * Learn more about [identifying users](/docs/product-analytics/identify)