@chordcommerce/analytics 1.15.0 → 1.16.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.
@@ -15,7 +15,9 @@ export const addCdpConsent = (options) => {
15
15
  let adapter = null;
16
16
  let lastProcessedConsent = null;
17
17
  const POLLING_INTERVAL_MS = 50;
18
- const TIMEOUT_MS = 60000;
18
+ const TIMEOUT_MS = options.awaitConsentTimeout
19
+ ? options.awaitConsentTimeout
20
+ : 60000;
19
21
  /**
20
22
  * Returns the adapter for the specified consent management platform.
21
23
  */
@@ -38,6 +38,7 @@ export interface ChordAnalyticsOptions<T extends ObjectTypes = ObjectTypes> {
38
38
  namespace?: string;
39
39
  stripNull?: boolean;
40
40
  metadata: EventMetadata;
41
+ awaitConsentTimeout?: number;
41
42
  }
42
43
  export interface EventMetadata {
43
44
  i18n: i18nMetadata;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chordcommerce/analytics",
3
3
  "description": "Chord Commerce event tracking",
4
- "version": "1.15.0",
4
+ "version": "1.16.0",
5
5
  "author": "Chord Commerce <help@chord.co> (https://www.chord.co)",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",