shopkit-analytics 1.0.0 → 1.0.2

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 (41) hide show
  1. package/README.md +258 -3
  2. package/dist/adapters/index.d.mts +2 -2
  3. package/dist/adapters/index.d.ts +2 -2
  4. package/dist/adapters/index.js +1039 -600
  5. package/dist/adapters/index.js.map +1 -1
  6. package/dist/adapters/index.mjs +2 -2
  7. package/dist/{chunk-3TQR5DOP.mjs → chunk-3NR2AKE4.mjs} +1 -31
  8. package/dist/chunk-3NR2AKE4.mjs.map +1 -0
  9. package/dist/{chunk-P4OJDCEZ.mjs → chunk-BNV3EVHH.mjs} +3 -3
  10. package/dist/{chunk-JVEGG6JV.mjs → chunk-HCA4E2RA.mjs} +19 -13
  11. package/dist/chunk-HCA4E2RA.mjs.map +1 -0
  12. package/dist/{chunk-4MZH5OLR.mjs → chunk-U3UOXFS4.mjs} +1040 -603
  13. package/dist/chunk-U3UOXFS4.mjs.map +1 -0
  14. package/dist/events/index.d.mts +9 -41
  15. package/dist/events/index.d.ts +9 -41
  16. package/dist/events/index.js +801 -490
  17. package/dist/events/index.js.map +1 -1
  18. package/dist/events/index.mjs +5 -7
  19. package/dist/{index-GODWc1s6.d.mts → index-Bym1_EAp.d.mts} +74 -17
  20. package/dist/{index-BnNRgdUv.d.ts → index-DS9OI5Mz.d.ts} +74 -17
  21. package/dist/index.d.mts +6 -6
  22. package/dist/index.d.ts +6 -6
  23. package/dist/index.js +1057 -645
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.mjs +4 -6
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/{subscriber-43gnCKWe.d.ts → subscriber-BDAm_BAi.d.ts} +38 -2
  28. package/dist/{subscriber-sWesj_5p.d.mts → subscriber-BoyOlh9t.d.mts} +38 -2
  29. package/dist/subscriber-VF3IYUCU.mjs +8 -0
  30. package/dist/types.d.mts +4 -340
  31. package/dist/types.d.ts +4 -340
  32. package/dist/types.js +0 -30
  33. package/dist/types.js.map +1 -1
  34. package/dist/types.mjs +1 -1
  35. package/package.json +2 -3
  36. package/dist/chunk-3TQR5DOP.mjs.map +0 -1
  37. package/dist/chunk-4MZH5OLR.mjs.map +0 -1
  38. package/dist/chunk-JVEGG6JV.mjs.map +0 -1
  39. package/dist/subscriber-IFZJU57V.mjs +0 -8
  40. /package/dist/{chunk-P4OJDCEZ.mjs.map → chunk-BNV3EVHH.mjs.map} +0 -0
  41. /package/dist/{subscriber-IFZJU57V.mjs.map → subscriber-VF3IYUCU.mjs.map} +0 -0
@@ -2,25 +2,23 @@
2
2
  import {
3
3
  initTracking,
4
4
  initializeEventTracking
5
- } from "../chunk-P4OJDCEZ.mjs";
5
+ } from "../chunk-BNV3EVHH.mjs";
6
6
  import {
7
7
  DEFAULT_CURRENCY,
8
- EventNames,
9
- HARDCODED_HANDLE
10
- } from "../chunk-4MZH5OLR.mjs";
8
+ EventNames
9
+ } from "../chunk-U3UOXFS4.mjs";
11
10
  import {
12
11
  EventType
13
- } from "../chunk-3TQR5DOP.mjs";
12
+ } from "../chunk-3NR2AKE4.mjs";
14
13
  import {
15
14
  eventPublisher,
16
15
  eventSubscriber,
17
16
  publishEvent
18
- } from "../chunk-JVEGG6JV.mjs";
17
+ } from "../chunk-HCA4E2RA.mjs";
19
18
  export {
20
19
  DEFAULT_CURRENCY,
21
20
  EventNames,
22
21
  EventType,
23
- HARDCODED_HANDLE,
24
22
  eventPublisher,
25
23
  eventSubscriber,
26
24
  initTracking,
@@ -1,5 +1,5 @@
1
1
  import { TEvent } from './types.mjs';
2
- import { T as TrackingAdapter } from './subscriber-sWesj_5p.mjs';
2
+ import { T as TrackingAdapter, a as TAdapterParams, b as IBaseAdapterParams } from './subscriber-BoyOlh9t.mjs';
3
3
  import { AnalyticsEventName, ShopifyAnalyticsProduct, ShopifyPageViewPayload } from '@shopify/hydrogen-react';
4
4
 
5
5
  /**
@@ -78,8 +78,29 @@ declare abstract class BaseAdapter implements TrackingAdapter {
78
78
  /**
79
79
  * Track an event
80
80
  * @param event The event to track
81
+ * @param params Optional adapter-specific parameters
81
82
  */
82
- abstract trackEvent(event: TEvent): Promise<void>;
83
+ abstract trackEvent(event: TEvent, params?: TAdapterParams): Promise<void>;
84
+ /**
85
+ * Extract adapter-specific parameters for this adapter
86
+ * @param params The adapter parameters object
87
+ * @returns Adapter-specific parameters or empty object
88
+ */
89
+ protected getAdapterParams(params?: TAdapterParams): IBaseAdapterParams;
90
+ /**
91
+ * Get custom event name or fall back to default
92
+ * @param params The adapter parameters object
93
+ * @param defaultName The default event name to use
94
+ * @returns Custom event name or default
95
+ */
96
+ protected getEventName(params: TAdapterParams | undefined, defaultName: string): string;
97
+ /**
98
+ * Merge standard event data with adapter-specific parameters
99
+ * @param params The adapter parameters object
100
+ * @param standardData The standard event data
101
+ * @returns Merged data with adapter-specific overrides
102
+ */
103
+ protected mergeEventData(standardData: Record<string, any>, params: TAdapterParams | undefined): Record<string, any>;
83
104
  /**
84
105
  * Get a configuration value
85
106
  * @param key The configuration key
@@ -102,7 +123,9 @@ declare abstract class BaseAdapter implements TrackingAdapter {
102
123
 
103
124
  declare global {
104
125
  interface Window {
105
- fbq?: (type: string, eventName: string, params?: Record<string, any>) => void;
126
+ fbq?: (type: string, eventName: string, params?: Record<string, any>, options?: {
127
+ eventID?: string;
128
+ }) => void;
106
129
  }
107
130
  }
108
131
  /**
@@ -113,6 +136,10 @@ interface PixelAdapterConfig {
113
136
  * Facebook Pixel ID
114
137
  */
115
138
  pixelId: string;
139
+ /**
140
+ * Enable server-side CAPI backup
141
+ */
142
+ enableCAPI?: boolean;
116
143
  }
117
144
  /**
118
145
  * Facebook Pixel tracking adapter
@@ -128,8 +155,17 @@ declare class PixelAdapter extends BaseAdapter {
128
155
  /**
129
156
  * Track an event with Facebook Pixel
130
157
  * @param event The event to track
158
+ * @param adapterParams Optional adapter-specific parameters
159
+ */
160
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
161
+ /**
162
+ * Track event on client-side (browser pixel)
163
+ */
164
+ private trackClientSide;
165
+ /**
166
+ * Track event on server-side (CAPI) as backup
131
167
  */
132
- trackEvent(event: TEvent): Promise<void>;
168
+ private trackServerSide;
133
169
  /**
134
170
  * Track a page view event
135
171
  * @param event The page view event
@@ -175,11 +211,6 @@ declare class PixelAdapter extends BaseAdapter {
175
211
  * @param event The purchase event
176
212
  */
177
213
  private trackPurchase;
178
- /**
179
- * Convert an event to Facebook Pixel parameters
180
- * @param event The event to convert
181
- */
182
- private eventToParams;
183
214
  }
184
215
 
185
216
  declare global {
@@ -212,8 +243,9 @@ declare class GoogleAdapter extends BaseAdapter {
212
243
  /**
213
244
  * Track an event with Google Analytics
214
245
  * @param event The event to track
246
+ * @param adapterParams Optional adapter-specific parameters
215
247
  */
216
- trackEvent(event: TEvent): Promise<void>;
248
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
217
249
  /**
218
250
  * Track a page view event
219
251
  * @param event The page view event
@@ -314,66 +346,79 @@ declare class MoengageAdapter extends BaseAdapter {
314
346
  /**
315
347
  * Track an event with MoenGage SDK
316
348
  * @param event The event to track
349
+ * @param adapterParams Optional adapter-specific parameters
317
350
  */
318
- trackEvent(event: TEvent): Promise<void>;
351
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
319
352
  /**
320
353
  * Track a page view event
321
354
  * @param event The page view event
355
+ * @param adapterParams Optional adapter-specific parameters
322
356
  */
323
357
  private trackPageView;
324
358
  /**
325
359
  * Track a button click event
326
360
  * @param event The button click event
361
+ * @param adapterParams Optional adapter-specific parameters
327
362
  */
328
363
  private trackButtonClick;
329
364
  /**
330
365
  * Track a form submission event
331
366
  * @param event The form submission event
367
+ * @param adapterParams Optional adapter-specific parameters
332
368
  */
333
369
  private trackFormSubmission;
334
370
  /**
335
371
  * Track a product view event
336
372
  * @param event The product view event
373
+ * @param adapterParams Optional adapter-specific parameters
337
374
  */
338
375
  private trackProductView;
339
376
  /**
340
377
  * Track an add to cart event
341
378
  * @param event The add to cart event
379
+ * @param adapterParams Optional adapter-specific parameters
342
380
  */
343
381
  private trackAddToCart;
344
382
  /**
345
383
  * Track a remove from cart event
346
384
  * @param event The remove from cart event
385
+ * @param adapterParams Optional adapter-specific parameters
347
386
  */
348
387
  private trackRemoveFromCart;
349
388
  /**
350
389
  * Track a checkout started event
351
390
  * @param event The checkout started event
391
+ * @param adapterParams Optional adapter-specific parameters
352
392
  */
353
393
  private trackCheckoutStarted;
354
394
  /**
355
395
  * Track a checkout completed event
356
396
  * @param event The checkout completed event
397
+ * @param adapterParams Optional adapter-specific parameters
357
398
  */
358
399
  private trackCheckoutCompleted;
359
400
  /**
360
401
  * Track a search event
361
402
  * @param event The search event
403
+ * @param adapterParams Optional adapter-specific parameters
362
404
  */
363
405
  private trackSearch;
364
406
  /**
365
407
  * Track a user signup event
366
408
  * @param event The user signup event
409
+ * @param adapterParams Optional adapter-specific parameters
367
410
  */
368
411
  private trackUserSignup;
369
412
  /**
370
413
  * Track a user login event
371
414
  * @param event The user login event
415
+ * @param adapterParams Optional adapter-specific parameters
372
416
  */
373
417
  private trackUserLogin;
374
418
  /**
375
419
  * Track a custom event
376
420
  * @param event The custom event
421
+ * @param adapterParams Optional adapter-specific parameters
377
422
  */
378
423
  private trackCustomEvent;
379
424
  /**
@@ -419,41 +464,49 @@ declare class PostHogAdapter extends BaseAdapter {
419
464
  /**
420
465
  * Track an event with PostHog
421
466
  * @param event The event to track
467
+ * @param adapterParams Optional adapter-specific parameters
422
468
  */
423
- trackEvent(event: TEvent): Promise<void>;
469
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
424
470
  /**
425
471
  * Track a page view event
426
472
  * @param event The page view event
473
+ * @param adapterParams Optional adapter-specific parameters
427
474
  */
428
475
  private trackPageView;
429
476
  /**
430
477
  * Track a product view event
431
478
  * @param event The product view event
479
+ * @param adapterParams Optional adapter-specific parameters
432
480
  */
433
481
  private trackProductView;
434
482
  /**
435
483
  * Track an add to cart event
436
484
  * @param event The add to cart event
485
+ * @param adapterParams Optional adapter-specific parameters
437
486
  */
438
487
  private trackAddToCart;
439
488
  /**
440
489
  * Track a checkout started event
441
490
  * @param event The checkout started event
491
+ * @param adapterParams Optional adapter-specific parameters
442
492
  */
443
493
  private trackCheckoutStarted;
444
494
  /**
445
495
  * Track a checkout completed event
446
496
  * @param event The checkout completed event
497
+ * @param adapterParams Optional adapter-specific parameters
447
498
  */
448
499
  private trackCheckoutCompleted;
449
500
  /**
450
501
  * Track a search event
451
502
  * @param event The search event
503
+ * @param adapterParams Optional adapter-specific parameters
452
504
  */
453
505
  private trackSearch;
454
506
  /**
455
507
  * Track an add payment info event
456
508
  * @param event The add payment info event
509
+ * @param adapterParams Optional adapter-specific parameters
457
510
  */
458
511
  private trackAddPaymentInfo;
459
512
  /**
@@ -530,7 +583,7 @@ declare class ShopifyAdapter extends BaseAdapter {
530
583
  /**
531
584
  * Track an event using Shopify Analytics
532
585
  */
533
- trackEvent(event: TEvent): Promise<void>;
586
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
534
587
  /**
535
588
  * Check if Shopify session is properly established
536
589
  */
@@ -565,18 +618,20 @@ declare class KwikPassAdapter extends BaseAdapter {
565
618
  initialize(): Promise<void>;
566
619
  /**
567
620
  * Track an event using KwikPass
621
+ * @param event The event to track
622
+ * @param adapterParams Optional adapter-specific parameters
568
623
  */
569
- trackEvent(event: TEvent): Promise<void>;
624
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
570
625
  /**
571
626
  * Send event to KwikPass platform
572
627
  */
573
628
  private sendKwikPassEvent;
574
629
  /**
575
- * Track product view event
630
+ * Track collection view event
576
631
  */
577
632
  private trackCollectionView;
578
633
  /**
579
- * Track collection view event
634
+ * Track product view event
580
635
  */
581
636
  private trackProductView;
582
637
  /**
@@ -609,8 +664,10 @@ declare class KwikCheckoutAdapter extends BaseAdapter {
609
664
  initialize(): Promise<void>;
610
665
  /**
611
666
  * Track an event using GoKwik
667
+ * @param event The event to track
668
+ * @param adapterParams Optional adapter-specific parameters
612
669
  */
613
- trackEvent(event: TEvent): Promise<void>;
670
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
614
671
  /**
615
672
  * Send event to GoKwik platform
616
673
  */
@@ -1,5 +1,5 @@
1
1
  import { TEvent } from './types.js';
2
- import { T as TrackingAdapter } from './subscriber-43gnCKWe.js';
2
+ import { T as TrackingAdapter, a as TAdapterParams, b as IBaseAdapterParams } from './subscriber-BDAm_BAi.js';
3
3
  import { AnalyticsEventName, ShopifyAnalyticsProduct, ShopifyPageViewPayload } from '@shopify/hydrogen-react';
4
4
 
5
5
  /**
@@ -78,8 +78,29 @@ declare abstract class BaseAdapter implements TrackingAdapter {
78
78
  /**
79
79
  * Track an event
80
80
  * @param event The event to track
81
+ * @param params Optional adapter-specific parameters
81
82
  */
82
- abstract trackEvent(event: TEvent): Promise<void>;
83
+ abstract trackEvent(event: TEvent, params?: TAdapterParams): Promise<void>;
84
+ /**
85
+ * Extract adapter-specific parameters for this adapter
86
+ * @param params The adapter parameters object
87
+ * @returns Adapter-specific parameters or empty object
88
+ */
89
+ protected getAdapterParams(params?: TAdapterParams): IBaseAdapterParams;
90
+ /**
91
+ * Get custom event name or fall back to default
92
+ * @param params The adapter parameters object
93
+ * @param defaultName The default event name to use
94
+ * @returns Custom event name or default
95
+ */
96
+ protected getEventName(params: TAdapterParams | undefined, defaultName: string): string;
97
+ /**
98
+ * Merge standard event data with adapter-specific parameters
99
+ * @param params The adapter parameters object
100
+ * @param standardData The standard event data
101
+ * @returns Merged data with adapter-specific overrides
102
+ */
103
+ protected mergeEventData(standardData: Record<string, any>, params: TAdapterParams | undefined): Record<string, any>;
83
104
  /**
84
105
  * Get a configuration value
85
106
  * @param key The configuration key
@@ -102,7 +123,9 @@ declare abstract class BaseAdapter implements TrackingAdapter {
102
123
 
103
124
  declare global {
104
125
  interface Window {
105
- fbq?: (type: string, eventName: string, params?: Record<string, any>) => void;
126
+ fbq?: (type: string, eventName: string, params?: Record<string, any>, options?: {
127
+ eventID?: string;
128
+ }) => void;
106
129
  }
107
130
  }
108
131
  /**
@@ -113,6 +136,10 @@ interface PixelAdapterConfig {
113
136
  * Facebook Pixel ID
114
137
  */
115
138
  pixelId: string;
139
+ /**
140
+ * Enable server-side CAPI backup
141
+ */
142
+ enableCAPI?: boolean;
116
143
  }
117
144
  /**
118
145
  * Facebook Pixel tracking adapter
@@ -128,8 +155,17 @@ declare class PixelAdapter extends BaseAdapter {
128
155
  /**
129
156
  * Track an event with Facebook Pixel
130
157
  * @param event The event to track
158
+ * @param adapterParams Optional adapter-specific parameters
159
+ */
160
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
161
+ /**
162
+ * Track event on client-side (browser pixel)
163
+ */
164
+ private trackClientSide;
165
+ /**
166
+ * Track event on server-side (CAPI) as backup
131
167
  */
132
- trackEvent(event: TEvent): Promise<void>;
168
+ private trackServerSide;
133
169
  /**
134
170
  * Track a page view event
135
171
  * @param event The page view event
@@ -175,11 +211,6 @@ declare class PixelAdapter extends BaseAdapter {
175
211
  * @param event The purchase event
176
212
  */
177
213
  private trackPurchase;
178
- /**
179
- * Convert an event to Facebook Pixel parameters
180
- * @param event The event to convert
181
- */
182
- private eventToParams;
183
214
  }
184
215
 
185
216
  declare global {
@@ -212,8 +243,9 @@ declare class GoogleAdapter extends BaseAdapter {
212
243
  /**
213
244
  * Track an event with Google Analytics
214
245
  * @param event The event to track
246
+ * @param adapterParams Optional adapter-specific parameters
215
247
  */
216
- trackEvent(event: TEvent): Promise<void>;
248
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
217
249
  /**
218
250
  * Track a page view event
219
251
  * @param event The page view event
@@ -314,66 +346,79 @@ declare class MoengageAdapter extends BaseAdapter {
314
346
  /**
315
347
  * Track an event with MoenGage SDK
316
348
  * @param event The event to track
349
+ * @param adapterParams Optional adapter-specific parameters
317
350
  */
318
- trackEvent(event: TEvent): Promise<void>;
351
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
319
352
  /**
320
353
  * Track a page view event
321
354
  * @param event The page view event
355
+ * @param adapterParams Optional adapter-specific parameters
322
356
  */
323
357
  private trackPageView;
324
358
  /**
325
359
  * Track a button click event
326
360
  * @param event The button click event
361
+ * @param adapterParams Optional adapter-specific parameters
327
362
  */
328
363
  private trackButtonClick;
329
364
  /**
330
365
  * Track a form submission event
331
366
  * @param event The form submission event
367
+ * @param adapterParams Optional adapter-specific parameters
332
368
  */
333
369
  private trackFormSubmission;
334
370
  /**
335
371
  * Track a product view event
336
372
  * @param event The product view event
373
+ * @param adapterParams Optional adapter-specific parameters
337
374
  */
338
375
  private trackProductView;
339
376
  /**
340
377
  * Track an add to cart event
341
378
  * @param event The add to cart event
379
+ * @param adapterParams Optional adapter-specific parameters
342
380
  */
343
381
  private trackAddToCart;
344
382
  /**
345
383
  * Track a remove from cart event
346
384
  * @param event The remove from cart event
385
+ * @param adapterParams Optional adapter-specific parameters
347
386
  */
348
387
  private trackRemoveFromCart;
349
388
  /**
350
389
  * Track a checkout started event
351
390
  * @param event The checkout started event
391
+ * @param adapterParams Optional adapter-specific parameters
352
392
  */
353
393
  private trackCheckoutStarted;
354
394
  /**
355
395
  * Track a checkout completed event
356
396
  * @param event The checkout completed event
397
+ * @param adapterParams Optional adapter-specific parameters
357
398
  */
358
399
  private trackCheckoutCompleted;
359
400
  /**
360
401
  * Track a search event
361
402
  * @param event The search event
403
+ * @param adapterParams Optional adapter-specific parameters
362
404
  */
363
405
  private trackSearch;
364
406
  /**
365
407
  * Track a user signup event
366
408
  * @param event The user signup event
409
+ * @param adapterParams Optional adapter-specific parameters
367
410
  */
368
411
  private trackUserSignup;
369
412
  /**
370
413
  * Track a user login event
371
414
  * @param event The user login event
415
+ * @param adapterParams Optional adapter-specific parameters
372
416
  */
373
417
  private trackUserLogin;
374
418
  /**
375
419
  * Track a custom event
376
420
  * @param event The custom event
421
+ * @param adapterParams Optional adapter-specific parameters
377
422
  */
378
423
  private trackCustomEvent;
379
424
  /**
@@ -419,41 +464,49 @@ declare class PostHogAdapter extends BaseAdapter {
419
464
  /**
420
465
  * Track an event with PostHog
421
466
  * @param event The event to track
467
+ * @param adapterParams Optional adapter-specific parameters
422
468
  */
423
- trackEvent(event: TEvent): Promise<void>;
469
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
424
470
  /**
425
471
  * Track a page view event
426
472
  * @param event The page view event
473
+ * @param adapterParams Optional adapter-specific parameters
427
474
  */
428
475
  private trackPageView;
429
476
  /**
430
477
  * Track a product view event
431
478
  * @param event The product view event
479
+ * @param adapterParams Optional adapter-specific parameters
432
480
  */
433
481
  private trackProductView;
434
482
  /**
435
483
  * Track an add to cart event
436
484
  * @param event The add to cart event
485
+ * @param adapterParams Optional adapter-specific parameters
437
486
  */
438
487
  private trackAddToCart;
439
488
  /**
440
489
  * Track a checkout started event
441
490
  * @param event The checkout started event
491
+ * @param adapterParams Optional adapter-specific parameters
442
492
  */
443
493
  private trackCheckoutStarted;
444
494
  /**
445
495
  * Track a checkout completed event
446
496
  * @param event The checkout completed event
497
+ * @param adapterParams Optional adapter-specific parameters
447
498
  */
448
499
  private trackCheckoutCompleted;
449
500
  /**
450
501
  * Track a search event
451
502
  * @param event The search event
503
+ * @param adapterParams Optional adapter-specific parameters
452
504
  */
453
505
  private trackSearch;
454
506
  /**
455
507
  * Track an add payment info event
456
508
  * @param event The add payment info event
509
+ * @param adapterParams Optional adapter-specific parameters
457
510
  */
458
511
  private trackAddPaymentInfo;
459
512
  /**
@@ -530,7 +583,7 @@ declare class ShopifyAdapter extends BaseAdapter {
530
583
  /**
531
584
  * Track an event using Shopify Analytics
532
585
  */
533
- trackEvent(event: TEvent): Promise<void>;
586
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
534
587
  /**
535
588
  * Check if Shopify session is properly established
536
589
  */
@@ -565,18 +618,20 @@ declare class KwikPassAdapter extends BaseAdapter {
565
618
  initialize(): Promise<void>;
566
619
  /**
567
620
  * Track an event using KwikPass
621
+ * @param event The event to track
622
+ * @param adapterParams Optional adapter-specific parameters
568
623
  */
569
- trackEvent(event: TEvent): Promise<void>;
624
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
570
625
  /**
571
626
  * Send event to KwikPass platform
572
627
  */
573
628
  private sendKwikPassEvent;
574
629
  /**
575
- * Track product view event
630
+ * Track collection view event
576
631
  */
577
632
  private trackCollectionView;
578
633
  /**
579
- * Track collection view event
634
+ * Track product view event
580
635
  */
581
636
  private trackProductView;
582
637
  /**
@@ -609,8 +664,10 @@ declare class KwikCheckoutAdapter extends BaseAdapter {
609
664
  initialize(): Promise<void>;
610
665
  /**
611
666
  * Track an event using GoKwik
667
+ * @param event The event to track
668
+ * @param adapterParams Optional adapter-specific parameters
612
669
  */
613
- trackEvent(event: TEvent): Promise<void>;
670
+ trackEvent(event: TEvent, adapterParams?: TAdapterParams): Promise<void>;
614
671
  /**
615
672
  * Send event to GoKwik platform
616
673
  */
package/dist/index.d.mts CHANGED
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
- import { G as GoogleAdapterConfig, P as PixelAdapterConfig, M as MoengageAdapterConfig, a as PostHogAdapterConfig, S as ShopifyAdapterConfig, K as KwikPassConfig, b as KwikCheckoutConfig, L as LoggerConfig } from './index-GODWc1s6.mjs';
3
- export { B as BaseAdapter, d as GoogleAdapter, i as KwikCheckoutAdapter, h as KwikPassAdapter, j as Logger, e as MoengageAdapter, c as PixelAdapter, f as PostHogAdapter, g as ShopifyAdapter, m as createAdapterLogger, k as createLogger, l as logger } from './index-GODWc1s6.mjs';
4
- import { T as TrackingAdapter } from './subscriber-sWesj_5p.mjs';
5
- export { e as eventSubscriber } from './subscriber-sWesj_5p.mjs';
2
+ import { G as GoogleAdapterConfig, P as PixelAdapterConfig, M as MoengageAdapterConfig, a as PostHogAdapterConfig, S as ShopifyAdapterConfig, K as KwikPassConfig, b as KwikCheckoutConfig, L as LoggerConfig } from './index-Bym1_EAp.mjs';
3
+ export { B as BaseAdapter, d as GoogleAdapter, i as KwikCheckoutAdapter, h as KwikPassAdapter, j as Logger, e as MoengageAdapter, c as PixelAdapter, f as PostHogAdapter, g as ShopifyAdapter, m as createAdapterLogger, k as createLogger, l as logger } from './index-Bym1_EAp.mjs';
4
+ import { T as TrackingAdapter } from './subscriber-BoyOlh9t.mjs';
5
+ export { I as IAdapterParams, b as IBaseAdapterParams, a as TAdapterParams, e as eventSubscriber } from './subscriber-BoyOlh9t.mjs';
6
6
  import { A as AffiliateConfig } from './affiliate-tracker-BgHwibPv.mjs';
7
7
  export { k as AffiliateData, j as AffiliateParams, a as AffiliateTracker, i as AffiliateTrackerProps, d as captureAffiliateParams, e as clearAffiliateParams, g as getAffiliateParams, f as getAffiliateSource, h as hasAffiliateData, c as useAffiliateSource, u as useAffiliateTracker, b as useHasAffiliateData } from './affiliate-tracker-BgHwibPv.mjs';
8
- export { BaseEvent, EventType, IAddPaymentInfoEvent, IAddToCartEvent, IAddressAddedGKEvent, IAddressCompletedGKEvent, IAddressSelectedGKEvent, IBeginCheckoutEvent, IButtonClickEvent, ICartPageLandEvent, ICartViewedEvent, ICheckoutCompletedEvent, ICheckoutPaymentEvent, ICheckoutStartedEvent, ICloseCartEvent, ICouponCopiedEvent, ICustomEvent, ICustomerLoggedInEvent, ICustomerRegisteredEvent, IFilterAppliedEvent, IFirstVisitEvent, IFormStartEvent, IFormSubmissionEvent, IItemPurchasedEvent, IKPMPPhoneNumberLoggedInEvent, IKPMPShopifyLoggedInEvent, IKPMPSuccessfullyLoggedOutEvent, IKPMPTruecallerLoggedInEvent, IKPMPWhatsAppLoggedInEvent, IKPPhoneNumberLoggedInEvent, IKPShopifyLoggedInEvent, IKPSuccessfullyLoggedOutEvent, IKPTruecallerLoggedInEvent, IKPWhatsAppLoggedInEvent, IMobileAddedGKEvent, INewsletterSubscriptionEvent, IOrderCompletedEvent, IOrderPlacedEvent, IOrderSuccessEvent, IPCollectionViewEvent, IPageViewEvent, IPagesScreensPerSessionEvent, IPaymentCompletedGKEvent, IPaymentMethodSelectedGKEvent, IPinCodeAddedGKEvent, IProductViewEvent, IPurchaseEvent, IQuantityChangeEvent, IRemoveFromCartEvent, IScrollEvent, ISearchEvent, ISessionStartEvent, IShopifyAbandonedCheckoutEvent, IShopifyAddToCartEvent, IShopifyCheckoutStartedEvent, IShopifyCheckoutUpdatedEvent, IShopifyOrderFulfilledEvent, IShopifyRemoveFromCartEvent, IShopifyUpdateCartEvent, ISpinformResultEvent, IStartedCheckoutGKEvent, IStartedOrderEvent, IUpdateCartEvent, IUserEngagementEvent, IUserLoginEvent, IUserSignupEvent, IViewContentEvent, IViewItemEvent, IViewSearchResultsEvent, IViewedProductEvent, TEvent } from './types.mjs';
9
- export { DEFAULT_CURRENCY, EventNames, HARDCODED_HANDLE, eventPublisher, initTracking, initializeEventTracking, publishEvent } from './events/index.mjs';
8
+ export { BaseEvent, EventType, IAddPaymentInfoEvent, IAddToCartEvent, IAddressAddedGKEvent, IAddressCompletedGKEvent, IAddressSelectedGKEvent, IBeginCheckoutEvent, IButtonClickEvent, ICartViewedEvent, ICheckoutCompletedEvent, ICheckoutPaymentEvent, ICheckoutStartedEvent, ICustomEvent, IFirstVisitEvent, IFormStartEvent, IFormSubmissionEvent, IMobileAddedGKEvent, IOrderCompletedEvent, IOrderPlacedEvent, IOrderSuccessEvent, IPCollectionViewEvent, IPageViewEvent, IPaymentCompletedGKEvent, IPaymentMethodSelectedGKEvent, IPinCodeAddedGKEvent, IProductViewEvent, IPurchaseEvent, IRemoveFromCartEvent, IScrollEvent, ISearchEvent, ISessionStartEvent, IStartedCheckoutGKEvent, IUserEngagementEvent, IUserLoginEvent, IUserSignupEvent, IViewContentEvent, IViewItemEvent, IViewSearchResultsEvent, IViewedProductEvent, TEvent } from './types.mjs';
9
+ export { DEFAULT_CURRENCY, EventNames, eventPublisher, initTracking, initializeEventTracking, publishEvent } from './events/index.mjs';
10
10
  import '@shopify/hydrogen-react';
11
11
 
12
12
  interface ShopkitAnalyticsConfig {
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
- import { G as GoogleAdapterConfig, P as PixelAdapterConfig, M as MoengageAdapterConfig, a as PostHogAdapterConfig, S as ShopifyAdapterConfig, K as KwikPassConfig, b as KwikCheckoutConfig, L as LoggerConfig } from './index-BnNRgdUv.js';
3
- export { B as BaseAdapter, d as GoogleAdapter, i as KwikCheckoutAdapter, h as KwikPassAdapter, j as Logger, e as MoengageAdapter, c as PixelAdapter, f as PostHogAdapter, g as ShopifyAdapter, m as createAdapterLogger, k as createLogger, l as logger } from './index-BnNRgdUv.js';
4
- import { T as TrackingAdapter } from './subscriber-43gnCKWe.js';
5
- export { e as eventSubscriber } from './subscriber-43gnCKWe.js';
2
+ import { G as GoogleAdapterConfig, P as PixelAdapterConfig, M as MoengageAdapterConfig, a as PostHogAdapterConfig, S as ShopifyAdapterConfig, K as KwikPassConfig, b as KwikCheckoutConfig, L as LoggerConfig } from './index-DS9OI5Mz.js';
3
+ export { B as BaseAdapter, d as GoogleAdapter, i as KwikCheckoutAdapter, h as KwikPassAdapter, j as Logger, e as MoengageAdapter, c as PixelAdapter, f as PostHogAdapter, g as ShopifyAdapter, m as createAdapterLogger, k as createLogger, l as logger } from './index-DS9OI5Mz.js';
4
+ import { T as TrackingAdapter } from './subscriber-BDAm_BAi.js';
5
+ export { I as IAdapterParams, b as IBaseAdapterParams, a as TAdapterParams, e as eventSubscriber } from './subscriber-BDAm_BAi.js';
6
6
  import { A as AffiliateConfig } from './affiliate-tracker-BgHwibPv.js';
7
7
  export { k as AffiliateData, j as AffiliateParams, a as AffiliateTracker, i as AffiliateTrackerProps, d as captureAffiliateParams, e as clearAffiliateParams, g as getAffiliateParams, f as getAffiliateSource, h as hasAffiliateData, c as useAffiliateSource, u as useAffiliateTracker, b as useHasAffiliateData } from './affiliate-tracker-BgHwibPv.js';
8
- export { BaseEvent, EventType, IAddPaymentInfoEvent, IAddToCartEvent, IAddressAddedGKEvent, IAddressCompletedGKEvent, IAddressSelectedGKEvent, IBeginCheckoutEvent, IButtonClickEvent, ICartPageLandEvent, ICartViewedEvent, ICheckoutCompletedEvent, ICheckoutPaymentEvent, ICheckoutStartedEvent, ICloseCartEvent, ICouponCopiedEvent, ICustomEvent, ICustomerLoggedInEvent, ICustomerRegisteredEvent, IFilterAppliedEvent, IFirstVisitEvent, IFormStartEvent, IFormSubmissionEvent, IItemPurchasedEvent, IKPMPPhoneNumberLoggedInEvent, IKPMPShopifyLoggedInEvent, IKPMPSuccessfullyLoggedOutEvent, IKPMPTruecallerLoggedInEvent, IKPMPWhatsAppLoggedInEvent, IKPPhoneNumberLoggedInEvent, IKPShopifyLoggedInEvent, IKPSuccessfullyLoggedOutEvent, IKPTruecallerLoggedInEvent, IKPWhatsAppLoggedInEvent, IMobileAddedGKEvent, INewsletterSubscriptionEvent, IOrderCompletedEvent, IOrderPlacedEvent, IOrderSuccessEvent, IPCollectionViewEvent, IPageViewEvent, IPagesScreensPerSessionEvent, IPaymentCompletedGKEvent, IPaymentMethodSelectedGKEvent, IPinCodeAddedGKEvent, IProductViewEvent, IPurchaseEvent, IQuantityChangeEvent, IRemoveFromCartEvent, IScrollEvent, ISearchEvent, ISessionStartEvent, IShopifyAbandonedCheckoutEvent, IShopifyAddToCartEvent, IShopifyCheckoutStartedEvent, IShopifyCheckoutUpdatedEvent, IShopifyOrderFulfilledEvent, IShopifyRemoveFromCartEvent, IShopifyUpdateCartEvent, ISpinformResultEvent, IStartedCheckoutGKEvent, IStartedOrderEvent, IUpdateCartEvent, IUserEngagementEvent, IUserLoginEvent, IUserSignupEvent, IViewContentEvent, IViewItemEvent, IViewSearchResultsEvent, IViewedProductEvent, TEvent } from './types.js';
9
- export { DEFAULT_CURRENCY, EventNames, HARDCODED_HANDLE, eventPublisher, initTracking, initializeEventTracking, publishEvent } from './events/index.js';
8
+ export { BaseEvent, EventType, IAddPaymentInfoEvent, IAddToCartEvent, IAddressAddedGKEvent, IAddressCompletedGKEvent, IAddressSelectedGKEvent, IBeginCheckoutEvent, IButtonClickEvent, ICartViewedEvent, ICheckoutCompletedEvent, ICheckoutPaymentEvent, ICheckoutStartedEvent, ICustomEvent, IFirstVisitEvent, IFormStartEvent, IFormSubmissionEvent, IMobileAddedGKEvent, IOrderCompletedEvent, IOrderPlacedEvent, IOrderSuccessEvent, IPCollectionViewEvent, IPageViewEvent, IPaymentCompletedGKEvent, IPaymentMethodSelectedGKEvent, IPinCodeAddedGKEvent, IProductViewEvent, IPurchaseEvent, IRemoveFromCartEvent, IScrollEvent, ISearchEvent, ISessionStartEvent, IStartedCheckoutGKEvent, IUserEngagementEvent, IUserLoginEvent, IUserSignupEvent, IViewContentEvent, IViewItemEvent, IViewSearchResultsEvent, IViewedProductEvent, TEvent } from './types.js';
9
+ export { DEFAULT_CURRENCY, EventNames, eventPublisher, initTracking, initializeEventTracking, publishEvent } from './events/index.js';
10
10
  import '@shopify/hydrogen-react';
11
11
 
12
12
  interface ShopkitAnalyticsConfig {