@best-bundles/bundle-ui 0.0.24 → 0.0.26
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.
- package/dist/context/BundleProvider.d.ts.map +1 -1
- package/dist/index.js +585 -558
- package/dist/index.js.map +1 -1
- package/dist/liquid/bundle-ui.iife.js +13 -13
- package/dist/liquid/bundle-ui.iife.js.map +1 -1
- package/dist/utils/analytics.d.ts +10 -3
- package/dist/utils/analytics.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* This ID persists across sessions to attribute events to the same user.
|
|
4
4
|
*/
|
|
5
5
|
export declare function getOrCreateAnonymousUserId(): string;
|
|
6
|
-
export type AnalyticsEventType = "DRAWER_OPENED" | "VARIANT_SELECTION_CHANGED" | "BUNDLE_ADDED_TO_BASKET";
|
|
6
|
+
export type AnalyticsEventType = "DRAWER_OPENED" | "DRAWER_CLOSED" | "VARIANT_SELECTION_CHANGED" | "BUNDLE_ADDED_TO_BASKET";
|
|
7
7
|
/** Mixpanel event names used for the bundle funnel (backend maps these to Mixpanel). */
|
|
8
|
-
export type MixpanelBundleEventName = "bundle_opened" | "bundle_started" | "bundle_completed" | "bundle_added_to_cart" | "checkout_started_with_bundle";
|
|
8
|
+
export type MixpanelBundleEventName = "bundle_opened" | "bundle_closed" | "bundle_started" | "bundle_completed" | "bundle_added_to_cart" | "checkout_started_with_bundle";
|
|
9
9
|
export type DrawerOpenedEvent = {
|
|
10
10
|
eventType: "DRAWER_OPENED";
|
|
11
11
|
shop: string;
|
|
@@ -13,6 +13,13 @@ export type DrawerOpenedEvent = {
|
|
|
13
13
|
timestamp: string;
|
|
14
14
|
mixpanelEvent?: "bundle_opened";
|
|
15
15
|
};
|
|
16
|
+
export type DrawerClosedEvent = {
|
|
17
|
+
eventType: "DRAWER_CLOSED";
|
|
18
|
+
shop: string;
|
|
19
|
+
anonymousUserId: string;
|
|
20
|
+
timestamp: string;
|
|
21
|
+
mixpanelEvent?: "bundle_closed";
|
|
22
|
+
};
|
|
16
23
|
export type VariantSelectionChangedEvent = {
|
|
17
24
|
eventType: "VARIANT_SELECTION_CHANGED";
|
|
18
25
|
shop: string;
|
|
@@ -39,7 +46,7 @@ export type BundleAddedToBasketEvent = {
|
|
|
39
46
|
checkout?: boolean;
|
|
40
47
|
mixpanelEvent?: "bundle_added_to_cart" | "checkout_started_with_bundle";
|
|
41
48
|
};
|
|
42
|
-
export type AnalyticsEvent = DrawerOpenedEvent | VariantSelectionChangedEvent | BundleAddedToBasketEvent;
|
|
49
|
+
export type AnalyticsEvent = DrawerOpenedEvent | DrawerClosedEvent | VariantSelectionChangedEvent | BundleAddedToBasketEvent;
|
|
43
50
|
/**
|
|
44
51
|
* Sends an analytics event to the backend API endpoint.
|
|
45
52
|
* Failures are silently caught to prevent breaking bundle functionality.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/utils/analytics.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAiCnD;AAED,MAAM,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/utils/analytics.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAiCnD;AAED,MAAM,MAAM,kBAAkB,GAC1B,eAAe,GACf,eAAe,GACf,2BAA2B,GAC3B,wBAAwB,CAAC;AAE7B,wFAAwF;AACxF,MAAM,MAAM,uBAAuB,GAC/B,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,kBAAkB,GAClB,sBAAsB,GACtB,8BAA8B,CAAC;AAEnC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,eAAe,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;I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