shopkit-analytics 1.0.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.
- package/LICENSE +21 -0
- package/README.md +769 -0
- package/dist/adapters/index.d.mts +4 -0
- package/dist/adapters/index.d.ts +4 -0
- package/dist/adapters/index.js +2405 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/index.mjs +23 -0
- package/dist/adapters/index.mjs.map +1 -0
- package/dist/affiliate/index.d.mts +138 -0
- package/dist/affiliate/index.d.ts +138 -0
- package/dist/affiliate/index.js +816 -0
- package/dist/affiliate/index.js.map +1 -0
- package/dist/affiliate/index.mjs +74 -0
- package/dist/affiliate/index.mjs.map +1 -0
- package/dist/affiliate-tracker-BgHwibPv.d.mts +144 -0
- package/dist/affiliate-tracker-BgHwibPv.d.ts +144 -0
- package/dist/chunk-3TQR5DOP.mjs +79 -0
- package/dist/chunk-3TQR5DOP.mjs.map +1 -0
- package/dist/chunk-4MZH5OLR.mjs +2375 -0
- package/dist/chunk-4MZH5OLR.mjs.map +1 -0
- package/dist/chunk-JVEGG6JV.mjs +213 -0
- package/dist/chunk-JVEGG6JV.mjs.map +1 -0
- package/dist/chunk-P4OJDCEZ.mjs +57 -0
- package/dist/chunk-P4OJDCEZ.mjs.map +1 -0
- package/dist/chunk-TNXTKEGS.mjs +758 -0
- package/dist/chunk-TNXTKEGS.mjs.map +1 -0
- package/dist/events/index.d.mts +112 -0
- package/dist/events/index.d.ts +112 -0
- package/dist/events/index.js +2131 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/index.mjs +30 -0
- package/dist/events/index.mjs.map +1 -0
- package/dist/index-BnNRgdUv.d.ts +676 -0
- package/dist/index-GODWc1s6.d.mts +676 -0
- package/dist/index.d.mts +38 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +3269 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +190 -0
- package/dist/index.mjs.map +1 -0
- package/dist/subscriber-43gnCKWe.d.ts +80 -0
- package/dist/subscriber-IFZJU57V.mjs +8 -0
- package/dist/subscriber-IFZJU57V.mjs.map +1 -0
- package/dist/subscriber-sWesj_5p.d.mts +80 -0
- package/dist/types.d.mts +991 -0
- package/dist/types.d.ts +991 -0
- package/dist/types.js +102 -0
- package/dist/types.js.map +1 -0
- package/dist/types.mjs +8 -0
- package/dist/types.mjs.map +1 -0
- package/package.json +110 -0
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,991 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event types that can be tracked across the application
|
|
3
|
+
*/
|
|
4
|
+
declare enum EventType {
|
|
5
|
+
PRODUCT_VIEW = "product_view",
|
|
6
|
+
STARTED_ORDER = "started_order",
|
|
7
|
+
PAGE_VIEW = "page_view",
|
|
8
|
+
BUTTON_CLICK = "button_click",
|
|
9
|
+
FORM_SUBMISSION = "form_submission",
|
|
10
|
+
VIEW_ITEM = "view_item",
|
|
11
|
+
VIEWED_PRODUCT = "viewed_product",
|
|
12
|
+
CHECKOUT_PAYMENT = "checkout_payment",
|
|
13
|
+
COLLECTION_VIEW = "collection_view",
|
|
14
|
+
ADD_TO_CART = "add_to_cart",
|
|
15
|
+
REMOVE_FROM_CART = "remove_from_cart",
|
|
16
|
+
CHECKOUT_STARTED = "checkout_started",
|
|
17
|
+
CHECKOUT_COMPLETED = "checkout_completed",
|
|
18
|
+
SEARCH = "search",
|
|
19
|
+
CART_PAGE_LAND = "cart_page_land",
|
|
20
|
+
CLOSE_CART = "close_cart",
|
|
21
|
+
QUANTITY_CHANGE = "quantity_change",
|
|
22
|
+
FILTER_APPLIED = "filter_applied",
|
|
23
|
+
NEWSLETTER_SUBSCRIPTION = "newsletter_subscription",
|
|
24
|
+
USER_SIGNUP = "user_signup",
|
|
25
|
+
USER_LOGIN = "user_login",
|
|
26
|
+
CUSTOM = "custom",
|
|
27
|
+
USER_ENGAGEMENT = "user_engagement",
|
|
28
|
+
SESSION_START = "session_start",
|
|
29
|
+
FIRST_VISIT = "first_visit",
|
|
30
|
+
SCROLL = "scroll",
|
|
31
|
+
FORM_START = "form_start",
|
|
32
|
+
ADD_PAYMENT_INFO = "add_payment_info",
|
|
33
|
+
CART_VIEWED = "cart_viewed",
|
|
34
|
+
PAGES_SCREENS_PER_SESSION = "pages_screens_per_session",
|
|
35
|
+
VIEW_CONTENT = "view_content",
|
|
36
|
+
PURCHASE = "purchase",
|
|
37
|
+
VIEW_SEARCH_RESULTS = "view_search_results",
|
|
38
|
+
ORDER_PLACED = "order_placed",
|
|
39
|
+
BEGIN_CHECKOUT = "begin_checkout",
|
|
40
|
+
ITEM_PURCHASED = "item_purchased",
|
|
41
|
+
UPDATE_CART = "update_cart",
|
|
42
|
+
CUSTOMER_REGISTERED = "customer_registered",
|
|
43
|
+
CUSTOMER_LOGGED_IN = "customer_logged_in",
|
|
44
|
+
SHOPIFY_CHECKOUT_UPDATED = "shopify_checkout_updated",
|
|
45
|
+
SHOPIFY_ABANDONED_CHECKOUT = "shopify_abandoned_checkout",
|
|
46
|
+
SHOPIFY_ORDER_FULFILLED = "shopify_order_fulfilled",
|
|
47
|
+
SHOPIFY_CHECKOUT_STARTED = "shopify_checkout_started",
|
|
48
|
+
SHOPIFY_ADD_TO_CART = "shopify_add_to_cart",
|
|
49
|
+
SHOPIFY_REMOVED_FROM_CART = "shopify_removed_from_cart",
|
|
50
|
+
SHOPIFY_UPDATE_CART = "shopify_update_cart",
|
|
51
|
+
SPINFORM_RESULT = "spinform_result",
|
|
52
|
+
COUPON_COPIED = "coupon_copied",
|
|
53
|
+
STARTED_CHECKOUT_GK = "started_checkout_gk",
|
|
54
|
+
MOBILE_ADDED_GK = "mobile_added_gk",
|
|
55
|
+
ADDRESS_SELECTED_GK = "address_selected_gk",
|
|
56
|
+
ADDRESS_COMPLETED_GK = "address_completed_gk",
|
|
57
|
+
PAYMENT_METHOD_SELECTED_GK = "payment_method_selected_gk",
|
|
58
|
+
PAYMENT_COMPLETED_GK = "payment_completed_gk",
|
|
59
|
+
ORDER_SUCCESS = "order_success",
|
|
60
|
+
ORDER_COMPLETED = "order_completed",
|
|
61
|
+
PIN_CODE_ADDED_GK = "pin_code_added_gk",
|
|
62
|
+
ADDRESS_ADDED_GK = "address_added_gk",
|
|
63
|
+
KP_MP_PHONE_NUMBER_LOGGED_IN = "kp_mp_phone_number_logged_in",
|
|
64
|
+
KP_PHONE_NUMBER_LOGGED_IN = "kp_phone_number_logged_in",
|
|
65
|
+
KP_MP_SHOPIFY_LOGGED_IN = "kp_mp_shopify_logged_in",
|
|
66
|
+
KP_MP_SUCCESSFULLY_LOGGED_OUT = "kp_mp_successfully_logged_out",
|
|
67
|
+
KP_WHATSAPP_LOGGED_IN = "kp_whatsapp_logged_in",
|
|
68
|
+
KP_MP_TRUECALLER_LOGGED_IN = "kp_mp_truecaller_logged_in",
|
|
69
|
+
KP_MP_WHATSAPP_LOGGED_IN = "kp_mp_whatsapp_logged_in",
|
|
70
|
+
KP_TRUECALLER_LOGGED_IN = "kp_truecaller_logged_in",
|
|
71
|
+
KP_SHOPIFY_LOGGED_IN = "kp_shopify_logged_in",
|
|
72
|
+
KP_SUCCESSFULLY_LOGGED_OUT = "kp_successfully_logged_out"
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Base event interface that all events should implement
|
|
76
|
+
*/
|
|
77
|
+
interface BaseEvent {
|
|
78
|
+
type: EventType;
|
|
79
|
+
timestamp?: number;
|
|
80
|
+
event_category?: string;
|
|
81
|
+
description?: string;
|
|
82
|
+
[key: string]: any;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Page view event
|
|
86
|
+
*/
|
|
87
|
+
interface IPageViewEvent extends BaseEvent {
|
|
88
|
+
type: EventType.PAGE_VIEW;
|
|
89
|
+
path: string;
|
|
90
|
+
title: string;
|
|
91
|
+
referrer?: string;
|
|
92
|
+
batch_ordering_id?: string;
|
|
93
|
+
batch_page_id?: string;
|
|
94
|
+
campaign?: string;
|
|
95
|
+
campaign_id?: string;
|
|
96
|
+
content?: string;
|
|
97
|
+
debug_mode?: boolean;
|
|
98
|
+
engagement_time_msec?: number;
|
|
99
|
+
entrances?: number;
|
|
100
|
+
ga_session_id?: string;
|
|
101
|
+
ga_session_number?: number;
|
|
102
|
+
gclid?: string;
|
|
103
|
+
ignore_referrer?: boolean;
|
|
104
|
+
medium?: string;
|
|
105
|
+
page_location?: string;
|
|
106
|
+
page_path?: string;
|
|
107
|
+
page_referrer?: string;
|
|
108
|
+
page_title?: string;
|
|
109
|
+
page_source?: string;
|
|
110
|
+
page_term?: string;
|
|
111
|
+
user_id?: string;
|
|
112
|
+
user_properties?: Record<string, any>;
|
|
113
|
+
session_engaged?: boolean;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* User engagement event
|
|
117
|
+
*/
|
|
118
|
+
interface IUserEngagementEvent extends BaseEvent {
|
|
119
|
+
type: EventType.USER_ENGAGEMENT;
|
|
120
|
+
engagementTime?: number;
|
|
121
|
+
pagePath?: string;
|
|
122
|
+
pageTitle?: string;
|
|
123
|
+
scrollDepth?: number;
|
|
124
|
+
formId?: string;
|
|
125
|
+
formName?: string;
|
|
126
|
+
formFields?: Array<{
|
|
127
|
+
fieldName: string;
|
|
128
|
+
fieldValue: string;
|
|
129
|
+
}>;
|
|
130
|
+
buttonId?: string;
|
|
131
|
+
buttonText?: string;
|
|
132
|
+
location?: string;
|
|
133
|
+
customProperties?: Record<string, any>;
|
|
134
|
+
batch_ordering_id?: string;
|
|
135
|
+
batch_page_id?: string;
|
|
136
|
+
campaign?: string;
|
|
137
|
+
ga_session_id?: string;
|
|
138
|
+
ga_session_number?: number;
|
|
139
|
+
gclid?: string;
|
|
140
|
+
ignore_referrer?: boolean;
|
|
141
|
+
medium?: string;
|
|
142
|
+
page_location?: string;
|
|
143
|
+
page_path?: string;
|
|
144
|
+
page_referrer?: string;
|
|
145
|
+
page_title?: string;
|
|
146
|
+
source?: string;
|
|
147
|
+
srsltid?: string;
|
|
148
|
+
term?: string;
|
|
149
|
+
user_id?: string;
|
|
150
|
+
user_properties?: Record<string, any>;
|
|
151
|
+
session_engaged?: boolean;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Session start event
|
|
155
|
+
*/
|
|
156
|
+
interface ISessionStartEvent extends BaseEvent {
|
|
157
|
+
type: EventType.SESSION_START;
|
|
158
|
+
sessionId: string;
|
|
159
|
+
userId?: string;
|
|
160
|
+
userAgent?: string;
|
|
161
|
+
referrer?: string;
|
|
162
|
+
pagePath: string;
|
|
163
|
+
pageTitle: string;
|
|
164
|
+
timestamp: number;
|
|
165
|
+
customProperties?: Record<string, any>;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* First visit event
|
|
169
|
+
*/
|
|
170
|
+
interface IFirstVisitEvent extends BaseEvent {
|
|
171
|
+
type: EventType.FIRST_VISIT;
|
|
172
|
+
userId?: string;
|
|
173
|
+
userAgent?: string;
|
|
174
|
+
referrer?: string;
|
|
175
|
+
pagePath: string;
|
|
176
|
+
pageTitle: string;
|
|
177
|
+
timestamp: number;
|
|
178
|
+
customProperties?: Record<string, any>;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Scroll event
|
|
182
|
+
*/
|
|
183
|
+
interface IScrollEvent extends BaseEvent {
|
|
184
|
+
type: EventType.SCROLL;
|
|
185
|
+
scrollDepth: number;
|
|
186
|
+
pagePath: string;
|
|
187
|
+
pageTitle: string;
|
|
188
|
+
timestamp: number;
|
|
189
|
+
customProperties?: Record<string, any>;
|
|
190
|
+
batch_ordering_id?: string;
|
|
191
|
+
batch_page_id?: string;
|
|
192
|
+
engagement_time_msec?: number;
|
|
193
|
+
ga_session_id?: string;
|
|
194
|
+
ga_session_number?: number;
|
|
195
|
+
ignore_referrer?: boolean;
|
|
196
|
+
page_location?: string;
|
|
197
|
+
page_referrer?: string;
|
|
198
|
+
page_title?: string;
|
|
199
|
+
percent_scrolled?: number;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Form start event
|
|
203
|
+
*/
|
|
204
|
+
interface IFormStartEvent extends BaseEvent {
|
|
205
|
+
type: EventType.FORM_START;
|
|
206
|
+
formId: string;
|
|
207
|
+
formName?: string;
|
|
208
|
+
pagePath: string;
|
|
209
|
+
pageTitle: string;
|
|
210
|
+
timestamp: number;
|
|
211
|
+
customProperties?: Record<string, any>;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Form submission event
|
|
215
|
+
*/
|
|
216
|
+
interface IFormSubmissionEvent extends BaseEvent {
|
|
217
|
+
type: EventType.FORM_SUBMISSION;
|
|
218
|
+
formId: string;
|
|
219
|
+
formName?: string;
|
|
220
|
+
success: boolean;
|
|
221
|
+
pagePath: string;
|
|
222
|
+
pageTitle: string;
|
|
223
|
+
timestamp: number;
|
|
224
|
+
customProperties?: Record<string, any>;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* User signup event
|
|
228
|
+
*/
|
|
229
|
+
interface IUserSignupEvent extends BaseEvent {
|
|
230
|
+
type: EventType.USER_SIGNUP;
|
|
231
|
+
userId?: string;
|
|
232
|
+
method?: string;
|
|
233
|
+
success: boolean;
|
|
234
|
+
pagePath: string;
|
|
235
|
+
pageTitle: string;
|
|
236
|
+
timestamp: number;
|
|
237
|
+
customProperties?: Record<string, any>;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* User login event
|
|
241
|
+
*/
|
|
242
|
+
interface IUserLoginEvent extends BaseEvent {
|
|
243
|
+
type: EventType.USER_LOGIN;
|
|
244
|
+
userId?: string;
|
|
245
|
+
method?: string;
|
|
246
|
+
success: boolean;
|
|
247
|
+
pagePath: string;
|
|
248
|
+
pageTitle: string;
|
|
249
|
+
timestamp: number;
|
|
250
|
+
customProperties?: Record<string, any>;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Button click event
|
|
254
|
+
*/
|
|
255
|
+
interface IButtonClickEvent extends BaseEvent {
|
|
256
|
+
type: EventType.BUTTON_CLICK;
|
|
257
|
+
buttonId?: string;
|
|
258
|
+
buttonText?: string;
|
|
259
|
+
location: string;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* View item event for e-commerce tracking
|
|
263
|
+
*/
|
|
264
|
+
interface IViewItemEvent extends BaseEvent {
|
|
265
|
+
type: EventType.VIEW_ITEM;
|
|
266
|
+
currency: string;
|
|
267
|
+
value: number;
|
|
268
|
+
items: Array<{
|
|
269
|
+
item_id: string;
|
|
270
|
+
item_name: string;
|
|
271
|
+
price: number;
|
|
272
|
+
currency: string;
|
|
273
|
+
}>;
|
|
274
|
+
batch_ordering_id?: string;
|
|
275
|
+
batch_page_id?: string;
|
|
276
|
+
campaign?: string;
|
|
277
|
+
ecomm_pagetype?: string;
|
|
278
|
+
ecomm_prodid?: string;
|
|
279
|
+
ecomm_totalvalue?: number;
|
|
280
|
+
engagement_time_msec?: number;
|
|
281
|
+
ga_session_id?: string;
|
|
282
|
+
ga_session_number?: number;
|
|
283
|
+
gclid?: string;
|
|
284
|
+
ignore_referrer?: boolean;
|
|
285
|
+
medium?: string;
|
|
286
|
+
page_location?: string;
|
|
287
|
+
page_path?: string;
|
|
288
|
+
page_referrer?: string;
|
|
289
|
+
page_title?: string;
|
|
290
|
+
source?: string;
|
|
291
|
+
srsltid?: string;
|
|
292
|
+
term?: string;
|
|
293
|
+
user_id?: string;
|
|
294
|
+
user_properties?: Record<string, any>;
|
|
295
|
+
session_engaged?: boolean;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Checkout payment event
|
|
299
|
+
*/
|
|
300
|
+
interface ICheckoutPaymentEvent extends BaseEvent {
|
|
301
|
+
type: EventType.CHECKOUT_PAYMENT;
|
|
302
|
+
cartValue: number;
|
|
303
|
+
currency: string;
|
|
304
|
+
itemCount: number;
|
|
305
|
+
items: Array<{
|
|
306
|
+
productId: string;
|
|
307
|
+
productName: string;
|
|
308
|
+
price: number;
|
|
309
|
+
quantity: number;
|
|
310
|
+
}>;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Viewed product event after 20 seconds
|
|
314
|
+
*/
|
|
315
|
+
interface IViewedProductEvent extends BaseEvent {
|
|
316
|
+
type: EventType.VIEWED_PRODUCT;
|
|
317
|
+
productId: string;
|
|
318
|
+
productName: string;
|
|
319
|
+
price: number;
|
|
320
|
+
currency: string;
|
|
321
|
+
viewDuration: number;
|
|
322
|
+
}
|
|
323
|
+
interface IPCollectionViewEvent extends BaseEvent {
|
|
324
|
+
type: EventType.COLLECTION_VIEW;
|
|
325
|
+
productId: string;
|
|
326
|
+
productName: string;
|
|
327
|
+
price?: number;
|
|
328
|
+
currency?: string;
|
|
329
|
+
category?: string;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Add to cart event
|
|
333
|
+
*/
|
|
334
|
+
interface IAddToCartEvent extends BaseEvent {
|
|
335
|
+
type: EventType.ADD_TO_CART;
|
|
336
|
+
productId: string;
|
|
337
|
+
productName: string;
|
|
338
|
+
price: number;
|
|
339
|
+
currency?: string;
|
|
340
|
+
quantity?: number;
|
|
341
|
+
variant?: string;
|
|
342
|
+
batch_ordering_id?: string;
|
|
343
|
+
batch_page_id?: string;
|
|
344
|
+
ecomm_pagetype?: string;
|
|
345
|
+
ecomm_prodid?: string;
|
|
346
|
+
ecomm_totalvalue?: number;
|
|
347
|
+
value?: number;
|
|
348
|
+
engagement_time_msec?: number;
|
|
349
|
+
ga_session_id?: string;
|
|
350
|
+
ga_session_number?: number;
|
|
351
|
+
ignore_referrer?: boolean;
|
|
352
|
+
page_location?: string;
|
|
353
|
+
page_referrer?: string;
|
|
354
|
+
page_title?: string;
|
|
355
|
+
user_id?: string;
|
|
356
|
+
user_properties?: Record<string, any>;
|
|
357
|
+
session_engaged?: boolean;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Remove from cart event
|
|
361
|
+
*/
|
|
362
|
+
interface IRemoveFromCartEvent extends BaseEvent {
|
|
363
|
+
type: EventType.REMOVE_FROM_CART;
|
|
364
|
+
productId: string;
|
|
365
|
+
productName: string;
|
|
366
|
+
price: number;
|
|
367
|
+
currency?: string;
|
|
368
|
+
quantity: number;
|
|
369
|
+
variant?: string;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Checkout started event
|
|
373
|
+
*/
|
|
374
|
+
interface ICheckoutStartedEvent extends BaseEvent {
|
|
375
|
+
type: EventType.CHECKOUT_STARTED;
|
|
376
|
+
cartValue: number;
|
|
377
|
+
currency?: string;
|
|
378
|
+
itemCount: number;
|
|
379
|
+
items: Array<{
|
|
380
|
+
productId: string;
|
|
381
|
+
productName: string;
|
|
382
|
+
price: number;
|
|
383
|
+
quantity: number;
|
|
384
|
+
variant?: string;
|
|
385
|
+
}>;
|
|
386
|
+
coupon?: string;
|
|
387
|
+
discount?: number | string;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Checkout completed event
|
|
391
|
+
*/
|
|
392
|
+
interface ICheckoutCompletedEvent extends BaseEvent {
|
|
393
|
+
type: EventType.CHECKOUT_COMPLETED;
|
|
394
|
+
orderId: string;
|
|
395
|
+
cartValue: number;
|
|
396
|
+
currency?: string;
|
|
397
|
+
itemCount: number;
|
|
398
|
+
items: Array<{
|
|
399
|
+
productId: string;
|
|
400
|
+
productName: string;
|
|
401
|
+
price: number;
|
|
402
|
+
quantity: number;
|
|
403
|
+
variant?: string;
|
|
404
|
+
}>;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Cart viewed event
|
|
408
|
+
*/
|
|
409
|
+
interface ICartViewedEvent extends BaseEvent {
|
|
410
|
+
type: EventType.CART_VIEWED;
|
|
411
|
+
cartId: string;
|
|
412
|
+
products: Array<{
|
|
413
|
+
variantId: string;
|
|
414
|
+
price: number;
|
|
415
|
+
quantity: number;
|
|
416
|
+
}>;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Search event
|
|
420
|
+
*/
|
|
421
|
+
interface ISearchEvent extends BaseEvent {
|
|
422
|
+
type: EventType.SEARCH;
|
|
423
|
+
searchTerm: string;
|
|
424
|
+
content_ids: string[];
|
|
425
|
+
resultsCount?: number;
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Filter applied event
|
|
429
|
+
*/
|
|
430
|
+
interface IFilterAppliedEvent extends BaseEvent {
|
|
431
|
+
type: EventType.FILTER_APPLIED;
|
|
432
|
+
filterType: string;
|
|
433
|
+
filterValue: string | number | boolean;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Newsletter subscription event
|
|
437
|
+
*/
|
|
438
|
+
interface INewsletterSubscriptionEvent extends BaseEvent {
|
|
439
|
+
type: EventType.NEWSLETTER_SUBSCRIPTION;
|
|
440
|
+
email: string;
|
|
441
|
+
success: boolean;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* View content event (for Facebook Pixel ViewContent)
|
|
445
|
+
*/
|
|
446
|
+
interface IViewContentEvent extends BaseEvent {
|
|
447
|
+
type: EventType.VIEW_CONTENT;
|
|
448
|
+
content_type?: string;
|
|
449
|
+
content_ids?: string[];
|
|
450
|
+
content_name?: string;
|
|
451
|
+
content_category?: string;
|
|
452
|
+
value?: number;
|
|
453
|
+
currency?: string;
|
|
454
|
+
items?: Array<any>;
|
|
455
|
+
batch_ordering_id?: string;
|
|
456
|
+
batch_page_id?: string;
|
|
457
|
+
campaign?: string;
|
|
458
|
+
ga_session_id?: string;
|
|
459
|
+
engagement_time_msec?: number;
|
|
460
|
+
session_engaged?: boolean;
|
|
461
|
+
page_title?: string;
|
|
462
|
+
page_location?: string;
|
|
463
|
+
page_referrer?: string;
|
|
464
|
+
user_id?: string;
|
|
465
|
+
user_properties?: Record<string, any>;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Purchase event (for Facebook Pixel Purchase)
|
|
469
|
+
*/
|
|
470
|
+
interface IPurchaseEvent extends BaseEvent {
|
|
471
|
+
type: EventType.PURCHASE;
|
|
472
|
+
value: number;
|
|
473
|
+
currency?: string;
|
|
474
|
+
content_type?: string;
|
|
475
|
+
content_ids?: string[];
|
|
476
|
+
num_items?: number;
|
|
477
|
+
contents?: Array<{
|
|
478
|
+
id: string;
|
|
479
|
+
quantity: number;
|
|
480
|
+
item_price?: number;
|
|
481
|
+
}>;
|
|
482
|
+
transaction_id?: string;
|
|
483
|
+
coupon?: string;
|
|
484
|
+
shipping?: number;
|
|
485
|
+
tax?: number;
|
|
486
|
+
items?: Array<any>;
|
|
487
|
+
batch_ordering_id?: string;
|
|
488
|
+
batch_page_id?: string;
|
|
489
|
+
campaign?: string;
|
|
490
|
+
ga_session_id?: string;
|
|
491
|
+
engagement_time_msec?: number;
|
|
492
|
+
session_engaged?: boolean;
|
|
493
|
+
page_title?: string;
|
|
494
|
+
page_location?: string;
|
|
495
|
+
page_referrer?: string;
|
|
496
|
+
user_id?: string;
|
|
497
|
+
user_properties?: Record<string, any>;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* View search results event (for GA4)
|
|
501
|
+
*/
|
|
502
|
+
interface IViewSearchResultsEvent extends BaseEvent {
|
|
503
|
+
type: EventType.VIEW_SEARCH_RESULTS;
|
|
504
|
+
search_term?: string;
|
|
505
|
+
batch_ordering_id?: string;
|
|
506
|
+
batch_page_id?: string;
|
|
507
|
+
campaign?: string;
|
|
508
|
+
campaign_id?: string;
|
|
509
|
+
content?: string;
|
|
510
|
+
ga_session_id?: string;
|
|
511
|
+
ga_session_number?: number;
|
|
512
|
+
gclid?: string;
|
|
513
|
+
medium?: string;
|
|
514
|
+
page_location?: string;
|
|
515
|
+
page_path?: string;
|
|
516
|
+
page_referrer?: string;
|
|
517
|
+
page_title?: string;
|
|
518
|
+
source?: string;
|
|
519
|
+
srsltid?: string;
|
|
520
|
+
term?: string;
|
|
521
|
+
user_id?: string;
|
|
522
|
+
user_properties?: Record<string, any>;
|
|
523
|
+
session_engaged?: boolean;
|
|
524
|
+
engagement_time_msec?: number;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Order placed event (for GA4)
|
|
528
|
+
*/
|
|
529
|
+
interface IOrderPlacedEvent extends BaseEvent {
|
|
530
|
+
type: EventType.ORDER_PLACED;
|
|
531
|
+
transaction_id?: string;
|
|
532
|
+
order_id?: string;
|
|
533
|
+
total_amount?: number;
|
|
534
|
+
value: number;
|
|
535
|
+
currency?: string;
|
|
536
|
+
items?: Array<any>;
|
|
537
|
+
batch_ordering_id?: string;
|
|
538
|
+
batch_page_id?: string;
|
|
539
|
+
coupon?: string;
|
|
540
|
+
discount?: number;
|
|
541
|
+
engagement_time_msec?: number;
|
|
542
|
+
ga_session_id?: string;
|
|
543
|
+
ga_session_number?: number;
|
|
544
|
+
ignore_referrer?: boolean;
|
|
545
|
+
page_location?: string;
|
|
546
|
+
page_referrer?: string;
|
|
547
|
+
page_title?: string;
|
|
548
|
+
payment_type?: string;
|
|
549
|
+
shipping?: number;
|
|
550
|
+
shipping_name?: string;
|
|
551
|
+
tax?: number;
|
|
552
|
+
user_id?: string;
|
|
553
|
+
user_properties?: Record<string, any>;
|
|
554
|
+
session_engaged?: boolean;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Begin checkout event (for GA4)
|
|
558
|
+
*/
|
|
559
|
+
interface IBeginCheckoutEvent extends BaseEvent {
|
|
560
|
+
type: EventType.BEGIN_CHECKOUT;
|
|
561
|
+
currency?: string;
|
|
562
|
+
value: number;
|
|
563
|
+
coupon?: string;
|
|
564
|
+
items?: Array<any>;
|
|
565
|
+
batch_ordering_id?: string;
|
|
566
|
+
batch_page_id?: string;
|
|
567
|
+
ecomm_pagetype?: string;
|
|
568
|
+
ecomm_prodid?: string;
|
|
569
|
+
ecomm_totalvalue?: number;
|
|
570
|
+
engagement_time_msec?: number;
|
|
571
|
+
ga_session_id?: string;
|
|
572
|
+
ga_session_number?: number;
|
|
573
|
+
ignore_referrer?: boolean;
|
|
574
|
+
page_location?: string;
|
|
575
|
+
page_referrer?: string;
|
|
576
|
+
page_title?: string;
|
|
577
|
+
user_id?: string;
|
|
578
|
+
user_properties?: Record<string, any>;
|
|
579
|
+
session_engaged?: boolean;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Custom event for any other tracking needs
|
|
583
|
+
*/
|
|
584
|
+
interface ICustomEvent extends BaseEvent {
|
|
585
|
+
type: EventType.CUSTOM;
|
|
586
|
+
name: string;
|
|
587
|
+
properties?: Record<string, any>;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Add Payment Info event
|
|
591
|
+
*/
|
|
592
|
+
interface IAddPaymentInfoEvent extends BaseEvent {
|
|
593
|
+
type: EventType.ADD_PAYMENT_INFO;
|
|
594
|
+
cartValue: number;
|
|
595
|
+
currency?: string;
|
|
596
|
+
itemCount: number;
|
|
597
|
+
paymentType?: string;
|
|
598
|
+
items: Array<{
|
|
599
|
+
productId: string;
|
|
600
|
+
productName: string;
|
|
601
|
+
price: number;
|
|
602
|
+
quantity: number;
|
|
603
|
+
variant?: string;
|
|
604
|
+
}>;
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Item purchased event
|
|
608
|
+
*/
|
|
609
|
+
interface IItemPurchasedEvent extends BaseEvent {
|
|
610
|
+
type: EventType.ITEM_PURCHASED;
|
|
611
|
+
productId: string;
|
|
612
|
+
productName: string;
|
|
613
|
+
price: number;
|
|
614
|
+
currency?: string;
|
|
615
|
+
quantity: number;
|
|
616
|
+
variant?: string;
|
|
617
|
+
orderId?: string;
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Update cart event
|
|
621
|
+
*/
|
|
622
|
+
interface IUpdateCartEvent extends BaseEvent {
|
|
623
|
+
type: EventType.UPDATE_CART;
|
|
624
|
+
productId: string;
|
|
625
|
+
productName: string;
|
|
626
|
+
price: number;
|
|
627
|
+
currency?: string;
|
|
628
|
+
quantity: number;
|
|
629
|
+
variant?: string;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Customer registered event
|
|
633
|
+
*/
|
|
634
|
+
interface ICustomerRegisteredEvent extends BaseEvent {
|
|
635
|
+
type: EventType.CUSTOMER_REGISTERED;
|
|
636
|
+
userId: string;
|
|
637
|
+
email?: string;
|
|
638
|
+
phone?: string;
|
|
639
|
+
firstName?: string;
|
|
640
|
+
lastName?: string;
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Customer logged in event
|
|
644
|
+
*/
|
|
645
|
+
interface ICustomerLoggedInEvent extends BaseEvent {
|
|
646
|
+
type: EventType.CUSTOMER_LOGGED_IN;
|
|
647
|
+
userId: string;
|
|
648
|
+
email?: string;
|
|
649
|
+
phone?: string;
|
|
650
|
+
method?: string;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Shopify checkout updated event
|
|
654
|
+
*/
|
|
655
|
+
interface IShopifyCheckoutUpdatedEvent extends BaseEvent {
|
|
656
|
+
type: EventType.SHOPIFY_CHECKOUT_UPDATED;
|
|
657
|
+
checkoutId: string;
|
|
658
|
+
cartValue: number;
|
|
659
|
+
currency?: string;
|
|
660
|
+
itemCount: number;
|
|
661
|
+
items: Array<{
|
|
662
|
+
productId: string;
|
|
663
|
+
productName: string;
|
|
664
|
+
price: number;
|
|
665
|
+
quantity: number;
|
|
666
|
+
variant?: string;
|
|
667
|
+
}>;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Shopify abandoned checkout event
|
|
671
|
+
*/
|
|
672
|
+
interface IShopifyAbandonedCheckoutEvent extends BaseEvent {
|
|
673
|
+
type: EventType.SHOPIFY_ABANDONED_CHECKOUT;
|
|
674
|
+
checkoutId: string;
|
|
675
|
+
cartValue: number;
|
|
676
|
+
currency?: string;
|
|
677
|
+
itemCount: number;
|
|
678
|
+
items: Array<{
|
|
679
|
+
productId: string;
|
|
680
|
+
productName: string;
|
|
681
|
+
price: number;
|
|
682
|
+
quantity: number;
|
|
683
|
+
variant?: string;
|
|
684
|
+
}>;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Shopify order fulfilled event
|
|
688
|
+
*/
|
|
689
|
+
interface IShopifyOrderFulfilledEvent extends BaseEvent {
|
|
690
|
+
type: EventType.SHOPIFY_ORDER_FULFILLED;
|
|
691
|
+
orderId: string;
|
|
692
|
+
cartValue: number;
|
|
693
|
+
currency?: string;
|
|
694
|
+
itemCount: number;
|
|
695
|
+
items: Array<{
|
|
696
|
+
productId: string;
|
|
697
|
+
productName: string;
|
|
698
|
+
price: number;
|
|
699
|
+
quantity: number;
|
|
700
|
+
variant?: string;
|
|
701
|
+
}>;
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Shopify checkout started event
|
|
705
|
+
*/
|
|
706
|
+
interface IShopifyCheckoutStartedEvent extends BaseEvent {
|
|
707
|
+
type: EventType.SHOPIFY_CHECKOUT_STARTED;
|
|
708
|
+
checkoutId: string;
|
|
709
|
+
cartValue: number;
|
|
710
|
+
currency?: string;
|
|
711
|
+
itemCount: number;
|
|
712
|
+
items: Array<{
|
|
713
|
+
productId: string;
|
|
714
|
+
productName: string;
|
|
715
|
+
price: number;
|
|
716
|
+
quantity: number;
|
|
717
|
+
variant?: string;
|
|
718
|
+
}>;
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Shopify add to cart event
|
|
722
|
+
*/
|
|
723
|
+
interface IShopifyAddToCartEvent extends BaseEvent {
|
|
724
|
+
type: EventType.SHOPIFY_ADD_TO_CART;
|
|
725
|
+
productId: string;
|
|
726
|
+
productName: string;
|
|
727
|
+
price: number;
|
|
728
|
+
currency?: string;
|
|
729
|
+
quantity: number;
|
|
730
|
+
variant?: string;
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* Shopify remove from cart event
|
|
734
|
+
*/
|
|
735
|
+
interface IShopifyRemoveFromCartEvent extends BaseEvent {
|
|
736
|
+
type: EventType.SHOPIFY_REMOVED_FROM_CART;
|
|
737
|
+
productId: string;
|
|
738
|
+
productName: string;
|
|
739
|
+
price: number;
|
|
740
|
+
currency?: string;
|
|
741
|
+
quantity: number;
|
|
742
|
+
variant?: string;
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Shopify update cart event
|
|
746
|
+
*/
|
|
747
|
+
interface IShopifyUpdateCartEvent extends BaseEvent {
|
|
748
|
+
type: EventType.SHOPIFY_UPDATE_CART;
|
|
749
|
+
productId: string;
|
|
750
|
+
productName: string;
|
|
751
|
+
price: number;
|
|
752
|
+
currency?: string;
|
|
753
|
+
quantity: number;
|
|
754
|
+
variant?: string;
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Spinform result event
|
|
758
|
+
*/
|
|
759
|
+
interface ISpinformResultEvent extends BaseEvent {
|
|
760
|
+
type: EventType.SPINFORM_RESULT;
|
|
761
|
+
result?: string;
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Coupon copied event
|
|
765
|
+
*/
|
|
766
|
+
interface ICouponCopiedEvent extends BaseEvent {
|
|
767
|
+
type: EventType.COUPON_COPIED;
|
|
768
|
+
couponCode?: string;
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* Started checkout GK event
|
|
772
|
+
*/
|
|
773
|
+
interface IStartedCheckoutGKEvent extends BaseEvent {
|
|
774
|
+
type: EventType.STARTED_CHECKOUT_GK;
|
|
775
|
+
cartValue?: number;
|
|
776
|
+
currency?: string;
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Mobile added GK event
|
|
780
|
+
*/
|
|
781
|
+
interface IMobileAddedGKEvent extends BaseEvent {
|
|
782
|
+
type: EventType.MOBILE_ADDED_GK;
|
|
783
|
+
mobile?: string;
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* Address selected GK event
|
|
787
|
+
*/
|
|
788
|
+
interface IAddressSelectedGKEvent extends BaseEvent {
|
|
789
|
+
type: EventType.ADDRESS_SELECTED_GK;
|
|
790
|
+
addressId?: string;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Address completed GK event
|
|
794
|
+
*/
|
|
795
|
+
interface IAddressCompletedGKEvent extends BaseEvent {
|
|
796
|
+
type: EventType.ADDRESS_COMPLETED_GK;
|
|
797
|
+
addressId?: string;
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* Payment method selected GK event
|
|
801
|
+
*/
|
|
802
|
+
interface IPaymentMethodSelectedGKEvent extends BaseEvent {
|
|
803
|
+
type: EventType.PAYMENT_METHOD_SELECTED_GK;
|
|
804
|
+
paymentMethod?: string;
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* Payment completed GK event
|
|
808
|
+
*/
|
|
809
|
+
interface IPaymentCompletedGKEvent extends BaseEvent {
|
|
810
|
+
type: EventType.PAYMENT_COMPLETED_GK;
|
|
811
|
+
amount?: number;
|
|
812
|
+
currency?: string;
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* Order success event
|
|
816
|
+
*/
|
|
817
|
+
interface IOrderSuccessEvent extends BaseEvent {
|
|
818
|
+
type: EventType.ORDER_SUCCESS;
|
|
819
|
+
orderId?: string;
|
|
820
|
+
amount?: number;
|
|
821
|
+
currency?: string;
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* Order completed event
|
|
825
|
+
*/
|
|
826
|
+
interface IOrderCompletedEvent extends BaseEvent {
|
|
827
|
+
type: EventType.ORDER_COMPLETED;
|
|
828
|
+
orderId?: string;
|
|
829
|
+
amount?: number;
|
|
830
|
+
currency?: string;
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Cart page land event
|
|
834
|
+
*/
|
|
835
|
+
interface ICartPageLandEvent extends BaseEvent {
|
|
836
|
+
type: EventType.CART_PAGE_LAND;
|
|
837
|
+
event_category: string;
|
|
838
|
+
description: string;
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* Close cart event
|
|
842
|
+
*/
|
|
843
|
+
interface ICloseCartEvent extends BaseEvent {
|
|
844
|
+
type: EventType.CLOSE_CART;
|
|
845
|
+
event_category: string;
|
|
846
|
+
description: string;
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Quantity change event
|
|
850
|
+
*/
|
|
851
|
+
interface IQuantityChangeEvent extends BaseEvent {
|
|
852
|
+
type: EventType.QUANTITY_CHANGE;
|
|
853
|
+
event_category: string;
|
|
854
|
+
description: string;
|
|
855
|
+
productId: string;
|
|
856
|
+
productName: string;
|
|
857
|
+
price: number;
|
|
858
|
+
quantity: number;
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* PIN code added GK event
|
|
862
|
+
*/
|
|
863
|
+
interface IPinCodeAddedGKEvent extends BaseEvent {
|
|
864
|
+
type: EventType.PIN_CODE_ADDED_GK;
|
|
865
|
+
pinCode?: string;
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* Address added GK event
|
|
869
|
+
*/
|
|
870
|
+
interface IAddressAddedGKEvent extends BaseEvent {
|
|
871
|
+
type: EventType.ADDRESS_ADDED_GK;
|
|
872
|
+
addressId?: string;
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* KP MP phone number logged in event
|
|
876
|
+
*/
|
|
877
|
+
interface IKPMPPhoneNumberLoggedInEvent extends BaseEvent {
|
|
878
|
+
type: EventType.KP_MP_PHONE_NUMBER_LOGGED_IN;
|
|
879
|
+
phone?: string;
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* KP phone number logged in event
|
|
883
|
+
*/
|
|
884
|
+
interface IKPPhoneNumberLoggedInEvent extends BaseEvent {
|
|
885
|
+
type: EventType.KP_PHONE_NUMBER_LOGGED_IN;
|
|
886
|
+
phone?: string;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* KP MP Shopify logged in event
|
|
890
|
+
*/
|
|
891
|
+
interface IKPMPShopifyLoggedInEvent extends BaseEvent {
|
|
892
|
+
type: EventType.KP_MP_SHOPIFY_LOGGED_IN;
|
|
893
|
+
userId?: string;
|
|
894
|
+
}
|
|
895
|
+
/**
|
|
896
|
+
* KP MP successfully logged out event
|
|
897
|
+
*/
|
|
898
|
+
interface IKPMPSuccessfullyLoggedOutEvent extends BaseEvent {
|
|
899
|
+
type: EventType.KP_MP_SUCCESSFULLY_LOGGED_OUT;
|
|
900
|
+
userId?: string;
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* KP WhatsApp logged in event
|
|
904
|
+
*/
|
|
905
|
+
interface IKPWhatsAppLoggedInEvent extends BaseEvent {
|
|
906
|
+
type: EventType.KP_WHATSAPP_LOGGED_IN;
|
|
907
|
+
phone?: string;
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* KP MP Truecaller logged in event
|
|
911
|
+
*/
|
|
912
|
+
interface IKPMPTruecallerLoggedInEvent extends BaseEvent {
|
|
913
|
+
type: EventType.KP_MP_TRUECALLER_LOGGED_IN;
|
|
914
|
+
phone?: string;
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* KP MP WhatsApp logged in event
|
|
918
|
+
*/
|
|
919
|
+
interface IKPMPWhatsAppLoggedInEvent extends BaseEvent {
|
|
920
|
+
type: EventType.KP_MP_WHATSAPP_LOGGED_IN;
|
|
921
|
+
phone?: string;
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* KP Truecaller logged in event
|
|
925
|
+
*/
|
|
926
|
+
interface IKPTruecallerLoggedInEvent extends BaseEvent {
|
|
927
|
+
type: EventType.KP_TRUECALLER_LOGGED_IN;
|
|
928
|
+
phone?: string;
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* KP Shopify logged in event
|
|
932
|
+
*/
|
|
933
|
+
interface IKPShopifyLoggedInEvent extends BaseEvent {
|
|
934
|
+
type: EventType.KP_SHOPIFY_LOGGED_IN;
|
|
935
|
+
userId?: string;
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* KP successfully logged out event
|
|
939
|
+
*/
|
|
940
|
+
interface IKPSuccessfullyLoggedOutEvent extends BaseEvent {
|
|
941
|
+
type: EventType.KP_SUCCESSFULLY_LOGGED_OUT;
|
|
942
|
+
userId?: string;
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* Pages screens per session event
|
|
946
|
+
*/
|
|
947
|
+
interface IPagesScreensPerSessionEvent extends BaseEvent {
|
|
948
|
+
type: EventType.PAGES_SCREENS_PER_SESSION;
|
|
949
|
+
currency: string;
|
|
950
|
+
firebase_conversion: boolean;
|
|
951
|
+
ga_session_id: string;
|
|
952
|
+
ga_session_number: number;
|
|
953
|
+
synthetic_bundle: boolean;
|
|
954
|
+
value: number;
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* Started order event
|
|
958
|
+
*/
|
|
959
|
+
interface IStartedOrderEvent extends BaseEvent {
|
|
960
|
+
type: EventType.STARTED_ORDER;
|
|
961
|
+
cartValue: number;
|
|
962
|
+
currency?: string;
|
|
963
|
+
itemCount: number;
|
|
964
|
+
items: Array<{
|
|
965
|
+
productId: string;
|
|
966
|
+
productName: string;
|
|
967
|
+
price: number;
|
|
968
|
+
quantity: number;
|
|
969
|
+
}>;
|
|
970
|
+
event_category: string;
|
|
971
|
+
description: string;
|
|
972
|
+
}
|
|
973
|
+
/**
|
|
974
|
+
* Product view event
|
|
975
|
+
*/
|
|
976
|
+
interface IProductViewEvent extends BaseEvent {
|
|
977
|
+
type: EventType.PRODUCT_VIEW;
|
|
978
|
+
event_category: string;
|
|
979
|
+
description: string;
|
|
980
|
+
productId: string;
|
|
981
|
+
productName: string;
|
|
982
|
+
price: number;
|
|
983
|
+
currency?: string;
|
|
984
|
+
category?: string;
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* Union type of all possible events
|
|
988
|
+
*/
|
|
989
|
+
type TEvent = IProductViewEvent | IPageViewEvent | IButtonClickEvent | IFormSubmissionEvent | ICartPageLandEvent | ICloseCartEvent | IQuantityChangeEvent | IViewItemEvent | IPCollectionViewEvent | IAddToCartEvent | IRemoveFromCartEvent | ICheckoutStartedEvent | ICheckoutCompletedEvent | ICartViewedEvent | ISearchEvent | IFilterAppliedEvent | INewsletterSubscriptionEvent | IUserSignupEvent | IUserLoginEvent | IViewContentEvent | IPurchaseEvent | IViewSearchResultsEvent | IOrderPlacedEvent | IBeginCheckoutEvent | ICustomEvent | IUserEngagementEvent | ISessionStartEvent | IFirstVisitEvent | IScrollEvent | IFormStartEvent | IAddPaymentInfoEvent | IItemPurchasedEvent | IUpdateCartEvent | ICustomerRegisteredEvent | ICustomerLoggedInEvent | IShopifyCheckoutUpdatedEvent | IShopifyAbandonedCheckoutEvent | IShopifyOrderFulfilledEvent | IShopifyCheckoutStartedEvent | IShopifyAddToCartEvent | IShopifyRemoveFromCartEvent | IShopifyUpdateCartEvent | ISpinformResultEvent | ICouponCopiedEvent | IStartedCheckoutGKEvent | IMobileAddedGKEvent | IAddressSelectedGKEvent | IAddressCompletedGKEvent | IPaymentMethodSelectedGKEvent | IPaymentCompletedGKEvent | IOrderSuccessEvent | IOrderCompletedEvent | IPinCodeAddedGKEvent | IAddressAddedGKEvent | IKPMPPhoneNumberLoggedInEvent | IKPPhoneNumberLoggedInEvent | IKPMPShopifyLoggedInEvent | IKPMPSuccessfullyLoggedOutEvent | IKPWhatsAppLoggedInEvent | IKPMPTruecallerLoggedInEvent | IKPMPWhatsAppLoggedInEvent | IKPTruecallerLoggedInEvent | IKPShopifyLoggedInEvent | IKPSuccessfullyLoggedOutEvent | IPagesScreensPerSessionEvent | IViewedProductEvent | ICheckoutPaymentEvent | IStartedOrderEvent;
|
|
990
|
+
|
|
991
|
+
export { type BaseEvent, EventType, type IAddPaymentInfoEvent, type IAddToCartEvent, type IAddressAddedGKEvent, type IAddressCompletedGKEvent, type IAddressSelectedGKEvent, type IBeginCheckoutEvent, type IButtonClickEvent, type ICartPageLandEvent, type ICartViewedEvent, type ICheckoutCompletedEvent, type ICheckoutPaymentEvent, type ICheckoutStartedEvent, type ICloseCartEvent, type ICouponCopiedEvent, type ICustomEvent, type ICustomerLoggedInEvent, type ICustomerRegisteredEvent, type IFilterAppliedEvent, type IFirstVisitEvent, type IFormStartEvent, type IFormSubmissionEvent, type IItemPurchasedEvent, type IKPMPPhoneNumberLoggedInEvent, type IKPMPShopifyLoggedInEvent, type IKPMPSuccessfullyLoggedOutEvent, type IKPMPTruecallerLoggedInEvent, type IKPMPWhatsAppLoggedInEvent, type IKPPhoneNumberLoggedInEvent, type IKPShopifyLoggedInEvent, type IKPSuccessfullyLoggedOutEvent, type IKPTruecallerLoggedInEvent, type IKPWhatsAppLoggedInEvent, type IMobileAddedGKEvent, type INewsletterSubscriptionEvent, type IOrderCompletedEvent, type IOrderPlacedEvent, type IOrderSuccessEvent, type IPCollectionViewEvent, type IPageViewEvent, type IPagesScreensPerSessionEvent, type IPaymentCompletedGKEvent, type IPaymentMethodSelectedGKEvent, type IPinCodeAddedGKEvent, type IProductViewEvent, type IPurchaseEvent, type IQuantityChangeEvent, type IRemoveFromCartEvent, type IScrollEvent, type ISearchEvent, type ISessionStartEvent, type IShopifyAbandonedCheckoutEvent, type IShopifyAddToCartEvent, type IShopifyCheckoutStartedEvent, type IShopifyCheckoutUpdatedEvent, type IShopifyOrderFulfilledEvent, type IShopifyRemoveFromCartEvent, type IShopifyUpdateCartEvent, type ISpinformResultEvent, type IStartedCheckoutGKEvent, type IStartedOrderEvent, type IUpdateCartEvent, type IUserEngagementEvent, type IUserLoginEvent, type IUserSignupEvent, type IViewContentEvent, type IViewItemEvent, type IViewSearchResultsEvent, type IViewedProductEvent, type TEvent };
|