posthog-js 1.425.1 → 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 (116) 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/src/constants.d.ts +2 -0
  69. package/dist/src/posthog-core.d.ts +5 -2
  70. package/dist/src/posthog-persistence.d.ts +2 -1
  71. package/dist/surveys-preview.js +1 -1
  72. package/dist/surveys-preview.js.map +1 -1
  73. package/dist/surveys.js +1 -1
  74. package/dist/surveys.js.map +1 -1
  75. package/dist/tracing-headers.js +1 -1
  76. package/dist/tracing-headers.js.map +1 -1
  77. package/dist/web-vitals-soft-navs.js +1 -1
  78. package/dist/web-vitals-soft-navs.js.map +1 -1
  79. package/dist/web-vitals-with-attribution-soft-navs.js +1 -1
  80. package/dist/web-vitals-with-attribution-soft-navs.js.map +1 -1
  81. package/dist/web-vitals-with-attribution.js +1 -1
  82. package/dist/web-vitals-with-attribution.js.map +1 -1
  83. package/dist/web-vitals.js +1 -1
  84. package/dist/web-vitals.js.map +1 -1
  85. package/lib/package.json +6 -7
  86. package/lib/src/constants.d.ts +2 -0
  87. package/lib/src/constants.js +5 -3
  88. package/lib/src/constants.js.map +1 -1
  89. package/lib/src/persistence-key-policy.js +1 -0
  90. package/lib/src/persistence-key-policy.js.map +1 -1
  91. package/lib/src/posthog-core.d.ts +5 -2
  92. package/lib/src/posthog-core.js +109 -21
  93. package/lib/src/posthog-core.js.map +1 -1
  94. package/lib/src/posthog-persistence.d.ts +2 -1
  95. package/lib/src/posthog-persistence.js +22 -5
  96. package/lib/src/posthog-persistence.js.map +1 -1
  97. package/lib/src/scroll-manager.js +6 -4
  98. package/lib/src/scroll-manager.js.map +1 -1
  99. package/lib/src/storage.js +1 -0
  100. package/lib/src/storage.js.map +1 -1
  101. package/package.json +14 -23
  102. package/react/dist/esm/index.js +232 -256
  103. package/react/dist/esm/index.js.map +1 -1
  104. package/react/dist/esm/slim/index.js +205 -225
  105. package/react/dist/esm/slim/index.js.map +1 -1
  106. package/react/dist/esm/surveys/index.js +48 -74
  107. package/react/dist/esm/surveys/index.js.map +1 -1
  108. package/react/dist/types/index.d.ts +72 -65
  109. package/react/dist/types/slim/index.d.ts +67 -60
  110. package/react/dist/types/surveys/index.d.ts +15 -16
  111. package/react/dist/umd/index.js +287 -289
  112. package/react/dist/umd/index.js.map +1 -1
  113. package/react/dist/umd/slim/index.js +253 -255
  114. package/react/dist/umd/slim/index.js.map +1 -1
  115. package/react/dist/umd/surveys/index.js +91 -91
  116. package/react/dist/umd/surveys/index.js.map +1 -1
@@ -2707,6 +2707,7 @@ declare class PostHogPersistence {
2707
2707
  private _storageMigrationInProgress;
2708
2708
  private _localIdentityChangePending;
2709
2709
  private _crossTabFeatureFlagIdentityMismatch;
2710
+ private _facebookClickIdChangePending;
2710
2711
  private readonly _crossTabFeatureFlagHandlers;
2711
2712
  private _onStorage?;
2712
2713
  /**
@@ -2807,7 +2808,7 @@ declare class PostHogPersistence {
2807
2808
  */
2808
2809
  register(props: Properties, days?: number): boolean;
2809
2810
  unregister(propOrProps: string | readonly string[]): void;
2810
- update_campaign_params(): void;
2811
+ update_campaign_params(): Properties | undefined;
2811
2812
  update_search_keyword(): void;
2812
2813
  update_referrer_info(): void;
2813
2814
  set_initial_person_info(): void;
@@ -3222,6 +3223,9 @@ declare class PostHog implements PostHogInterface {
3222
3223
  * @param {SnippetArrayItem} item A `[function_name, ...args]` array to be executed.
3223
3224
  */
3224
3225
  push(item: SnippetArrayItem): void;
3226
+ private _getPersistedFacebookClickId;
3227
+ private _updateFacebookClickId;
3228
+ private _markFacebookClickIdDelivered;
3225
3229
  /**
3226
3230
  * Captures an event with optional properties and configuration.
3227
3231
  *
@@ -3994,12 +3998,12 @@ declare class PostHog implements PostHogInterface {
3994
3998
  *
3995
3999
  * @public
3996
4000
  *
3997
- * @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.
4001
+ * @param {String} [new_distinct_id] A non-empty string that uniquely identifies a user.
3998
4002
  * @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,
3999
4003
  * it will be overwritten by the value in userPropertiesToSet.
4000
4004
  * @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.
4001
4005
  */
4002
- identify(new_distinct_id?: string, userPropertiesToSet?: Properties, userPropertiesToSetOnce?: Properties): void;
4006
+ identify(new_distinct_id: string, userPropertiesToSet?: Properties, userPropertiesToSetOnce?: Properties): void;
4003
4007
  /**
4004
4008
  * Sets properties on the person profile associated with the current `distinct_id`.
4005
4009
  * Learn more about [identifying users](/docs/product-analytics/identify)