@metodokorexmk/tracking 1.0.0 → 1.2.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/README.md +69 -61
- package/dist/index.cjs +83 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +227 -199
- package/dist/index.d.ts +227 -199
- package/dist/index.js +79 -37
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +27 -27
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +54 -54
- package/dist/react/index.d.ts +54 -54
- package/dist/react/index.js +27 -27
- package/dist/react/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Shared types and interfaces for @metodokorexmk/tracking.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Main tracking configuration.
|
|
6
|
+
* Passed to `initGA()` to initialize the tracking system.
|
|
7
7
|
*/
|
|
8
8
|
interface TrackingConfig {
|
|
9
|
-
/**
|
|
9
|
+
/** Google Analytics 4 Measurement ID (e.g., 'G-XXXXXXX') */
|
|
10
10
|
trackingId?: string;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* Custom resolver for the GA Tracking ID.
|
|
13
|
+
* Receives the current path and must return the corresponding ID.
|
|
14
|
+
* Takes priority over `trackingId` when provided.
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```ts
|
|
@@ -22,40 +22,40 @@ interface TrackingConfig {
|
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
24
|
resolveTrackingId?: (currentPath: string) => string;
|
|
25
|
-
/**
|
|
25
|
+
/** Google Tag Manager container ID (e.g., 'GTM-XXXXXXX'). If provided, GTM is injected automatically. */
|
|
26
26
|
gtmId?: string;
|
|
27
|
-
/**
|
|
27
|
+
/** Enable IP anonymization in GA4 */
|
|
28
28
|
anonymizeIp?: boolean;
|
|
29
|
-
/**
|
|
29
|
+
/** Debug mode: logs events to the console */
|
|
30
30
|
debug?: boolean;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* LandingTracker configuration (session orchestrator).
|
|
34
34
|
*/
|
|
35
35
|
interface LandingTrackerConfig {
|
|
36
|
-
/**
|
|
36
|
+
/** Landing page path (e.g., '/kin', '/racha') */
|
|
37
37
|
pagePath: string;
|
|
38
|
-
/**
|
|
38
|
+
/** Human-readable landing page name (e.g., 'Kin Landing Page') */
|
|
39
39
|
pageName: string;
|
|
40
|
-
/**
|
|
40
|
+
/** Google Tag Manager container ID (optional) */
|
|
41
41
|
gtmId?: string;
|
|
42
|
-
/**
|
|
42
|
+
/** Enable scroll tracking (milestones 25/50/75/100%). Default: true */
|
|
43
43
|
enableScrollTracking?: boolean;
|
|
44
|
-
/**
|
|
44
|
+
/** Enable automatic CTA click tracking. Default: true */
|
|
45
45
|
enableCTATracking?: boolean;
|
|
46
|
-
/**
|
|
46
|
+
/** Enable page dwell time tracking. Default: true */
|
|
47
47
|
enableTimeTracking?: boolean;
|
|
48
|
-
/**
|
|
48
|
+
/** Enable per-section dwell time via IntersectionObserver. Default: true */
|
|
49
49
|
enableSectionTracking?: boolean;
|
|
50
|
-
/**
|
|
50
|
+
/** Enable automatic form interaction tracking. Default: true */
|
|
51
51
|
enableFormTracking?: boolean;
|
|
52
|
-
/**
|
|
52
|
+
/** Enable click heatmap (X/Y coordinates). Default: false */
|
|
53
53
|
enableHeatmap?: boolean;
|
|
54
|
-
/**
|
|
54
|
+
/** Custom event suffix (e.g., '_kin' produces 'cta_click_kin'). Default: '' */
|
|
55
55
|
eventSuffix?: string;
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
58
|
+
* UTM parameters captured from the URL.
|
|
59
59
|
*/
|
|
60
60
|
interface UTMParams {
|
|
61
61
|
utm_source?: string;
|
|
@@ -65,7 +65,7 @@ interface UTMParams {
|
|
|
65
65
|
utm_content?: string;
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Captured visitor identification data.
|
|
69
69
|
*/
|
|
70
70
|
interface VisitorData {
|
|
71
71
|
userId?: string;
|
|
@@ -75,20 +75,20 @@ interface VisitorData {
|
|
|
75
75
|
entryUrl: string;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
78
|
+
* Video playback statistics.
|
|
79
|
+
* Shared across all adapters (Wistia, Voomly, HTML5).
|
|
80
80
|
*/
|
|
81
81
|
interface VideoStats {
|
|
82
|
-
/**
|
|
82
|
+
/** Total time watched in seconds */
|
|
83
83
|
timeWatched: number;
|
|
84
|
-
/**
|
|
84
|
+
/** Whether the video was completed (>=90-95%) */
|
|
85
85
|
completed: boolean;
|
|
86
|
-
/** Timestamp
|
|
86
|
+
/** Timestamp of the last stats update */
|
|
87
87
|
lastUpdate: number;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
90
|
+
* Detailed internal video tracking state.
|
|
91
|
+
* Used internally by VideoTracker.
|
|
92
92
|
*/
|
|
93
93
|
interface VideoTrackingState {
|
|
94
94
|
videoId: string;
|
|
@@ -111,41 +111,41 @@ interface VideoTrackingState {
|
|
|
111
111
|
playbackSpeed: number;
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
114
|
+
* Options for React video tracking hooks.
|
|
115
115
|
*/
|
|
116
116
|
interface UseVideoTrackingOptions {
|
|
117
|
-
/**
|
|
117
|
+
/** Unique video identifier */
|
|
118
118
|
videoId: string;
|
|
119
|
-
/**
|
|
119
|
+
/** Reference to the HTML <video> element (HTML5 only) */
|
|
120
120
|
videoElement?: HTMLVideoElement | null;
|
|
121
|
-
/** Callback
|
|
121
|
+
/** Callback when the video completes */
|
|
122
122
|
onComplete?: () => void;
|
|
123
|
-
/** Callback
|
|
123
|
+
/** Callback on progress milestones (25, 50, 75) */
|
|
124
124
|
onProgress?: (percentage: number) => void;
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
|
-
* Callback
|
|
127
|
+
* Callback for video stats updates.
|
|
128
128
|
*/
|
|
129
129
|
type VideoUpdateCallback = (stats: VideoStats) => void;
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* Handle returned by video adapters (Wistia, Voomly, HTML5).
|
|
132
132
|
*/
|
|
133
133
|
interface VideoTrackerHandle {
|
|
134
|
-
/**
|
|
134
|
+
/** Get current playback stats */
|
|
135
135
|
getStats: () => VideoStats;
|
|
136
|
-
/**
|
|
136
|
+
/** Register an update callback. Returns an unsubscribe function. */
|
|
137
137
|
onUpdate: (cb: VideoUpdateCallback) => () => void;
|
|
138
|
-
/**
|
|
138
|
+
/** Stop tracking and clean up listeners */
|
|
139
139
|
stop: () => void;
|
|
140
140
|
}
|
|
141
141
|
/**
|
|
142
|
-
*
|
|
142
|
+
* Generic tracking event payload.
|
|
143
143
|
*/
|
|
144
144
|
interface TrackingEventData {
|
|
145
145
|
[key: string]: unknown;
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
|
-
*
|
|
148
|
+
* Captured click data for heatmap visualization.
|
|
149
149
|
*/
|
|
150
150
|
interface ClickData {
|
|
151
151
|
x: number;
|
|
@@ -157,7 +157,7 @@ interface ClickData {
|
|
|
157
157
|
viewportHeight: number;
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
160
|
-
*
|
|
160
|
+
* Session summary emitted on page exit.
|
|
161
161
|
*/
|
|
162
162
|
interface SessionSummary {
|
|
163
163
|
duration: number;
|
|
@@ -168,19 +168,19 @@ interface SessionSummary {
|
|
|
168
168
|
formInteractions: number;
|
|
169
169
|
}
|
|
170
170
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
171
|
+
* HTTP client configuration for the persistence layer.
|
|
172
|
+
* Passed to `initTrackingAPI()`.
|
|
173
173
|
*/
|
|
174
174
|
interface TrackingAPIConfig {
|
|
175
|
-
/**
|
|
175
|
+
/** API base URL (e.g., 'https://api.korex.com/api/v1') */
|
|
176
176
|
baseUrl: string;
|
|
177
|
-
/**
|
|
177
|
+
/** Function that returns the auth token (e.g., from localStorage) */
|
|
178
178
|
getAuthToken?: () => string | null;
|
|
179
|
-
/**
|
|
179
|
+
/** Additional headers for each request */
|
|
180
180
|
getCustomHeaders?: () => Record<string, string>;
|
|
181
181
|
}
|
|
182
182
|
/**
|
|
183
|
-
*
|
|
183
|
+
* Backend tracking lead model.
|
|
184
184
|
*/
|
|
185
185
|
interface TrackingLead {
|
|
186
186
|
id: number;
|
|
@@ -210,7 +210,7 @@ interface TrackingLead {
|
|
|
210
210
|
dwellTime?: number;
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
213
|
-
*
|
|
213
|
+
* Processed lead data with tracking info (response from GET /leads/{id}/with-tracking).
|
|
214
214
|
*/
|
|
215
215
|
interface LeadTrackingData {
|
|
216
216
|
videoVisto: boolean;
|
|
@@ -226,7 +226,7 @@ interface LeadTrackingData {
|
|
|
226
226
|
dwellTime?: number;
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
|
-
*
|
|
229
|
+
* Form data submitted with a lead.
|
|
230
230
|
*/
|
|
231
231
|
interface LeadFormData {
|
|
232
232
|
nombre: string;
|
|
@@ -236,11 +236,15 @@ interface LeadFormData {
|
|
|
236
236
|
[key: string]: unknown;
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
|
-
*
|
|
239
|
+
* URL parameters extracted for lead origin detection.
|
|
240
240
|
*/
|
|
241
241
|
interface UrlParams {
|
|
242
242
|
userId: string;
|
|
243
243
|
idCampana: string;
|
|
244
|
+
/** Meta Ads: ad set identifier (adset_id) — ad traceability */
|
|
245
|
+
adsetId: string;
|
|
246
|
+
/** Meta Ads: individual ad identifier (ad_id) — ad traceability */
|
|
247
|
+
adId: string;
|
|
244
248
|
utmContent: string;
|
|
245
249
|
fbclid: string;
|
|
246
250
|
nombreNetworker: string;
|
|
@@ -251,11 +255,14 @@ interface UrlParams {
|
|
|
251
255
|
utmSource?: string;
|
|
252
256
|
utmMedium?: string;
|
|
253
257
|
utmCampaign?: string;
|
|
258
|
+
/** Spelling correction of leadCampaing */
|
|
259
|
+
leadCampaign?: string;
|
|
260
|
+
/** @deprecated Use leadCampaign instead */
|
|
254
261
|
leadCampaing?: string;
|
|
255
262
|
isOrganico?: boolean;
|
|
256
263
|
}
|
|
257
264
|
/**
|
|
258
|
-
*
|
|
265
|
+
* Result of lead origin detection.
|
|
259
266
|
*/
|
|
260
267
|
interface LeadOrigin {
|
|
261
268
|
type: 'facebook' | 'organic';
|
|
@@ -264,7 +271,7 @@ interface LeadOrigin {
|
|
|
264
271
|
hasCampaign: boolean;
|
|
265
272
|
}
|
|
266
273
|
/**
|
|
267
|
-
*
|
|
274
|
+
* API response when creating/submitting a tracking lead.
|
|
268
275
|
*/
|
|
269
276
|
interface TrackingLeadResponse {
|
|
270
277
|
colaboradorAsignado?: {
|
|
@@ -277,7 +284,7 @@ interface TrackingLeadResponse {
|
|
|
277
284
|
[key: string]: unknown;
|
|
278
285
|
}
|
|
279
286
|
/**
|
|
280
|
-
*
|
|
287
|
+
* Processed response from submitTrackingLead.
|
|
281
288
|
*/
|
|
282
289
|
interface SubmitTrackingLeadResponse {
|
|
283
290
|
ok: boolean;
|
|
@@ -285,7 +292,7 @@ interface SubmitTrackingLeadResponse {
|
|
|
285
292
|
data: TrackingLeadResponse | null;
|
|
286
293
|
}
|
|
287
294
|
/**
|
|
288
|
-
*
|
|
295
|
+
* Additional options for building the lead request body.
|
|
289
296
|
*/
|
|
290
297
|
interface BuildRequestBodyOptions {
|
|
291
298
|
nameForm?: string;
|
|
@@ -298,16 +305,16 @@ interface BuildRequestBodyOptions {
|
|
|
298
305
|
additionalFields?: Record<string, unknown>;
|
|
299
306
|
}
|
|
300
307
|
/**
|
|
301
|
-
*
|
|
308
|
+
* DwellTimeTracker configuration.
|
|
302
309
|
*/
|
|
303
310
|
interface DwellTimeConfig {
|
|
304
|
-
/**
|
|
311
|
+
/** Backend tracking data ID */
|
|
305
312
|
trackingDataId: number | string;
|
|
306
|
-
/**
|
|
313
|
+
/** Enable tracking (default: true) */
|
|
307
314
|
enabled?: boolean;
|
|
308
|
-
/** Callback
|
|
315
|
+
/** Callback on successful send */
|
|
309
316
|
onSuccess?: () => void;
|
|
310
|
-
/** Callback
|
|
317
|
+
/** Callback on error */
|
|
311
318
|
onError?: (error: Error) => void;
|
|
312
319
|
}
|
|
313
320
|
declare global {
|
|
@@ -322,26 +329,25 @@ declare global {
|
|
|
322
329
|
}
|
|
323
330
|
|
|
324
331
|
/**
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
332
|
+
* Google Analytics 4 core module.
|
|
333
|
+
* Initialization, event tracking, and visitor data capture.
|
|
334
|
+
* Framework-agnostic (no Next.js, React, etc. dependency).
|
|
328
335
|
*/
|
|
329
336
|
|
|
330
337
|
/**
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
* Si no, usa el `trackingId` fijo de la config.
|
|
338
|
+
* Returns the current GA Tracking ID.
|
|
339
|
+
* Uses `resolveTrackingId` dynamically if configured, otherwise falls back to the static `trackingId`.
|
|
334
340
|
*/
|
|
335
341
|
declare const getGATrackingId: () => string;
|
|
336
342
|
/**
|
|
337
|
-
*
|
|
343
|
+
* Initializes Google Analytics with the provided configuration.
|
|
338
344
|
*
|
|
339
345
|
* @example
|
|
340
346
|
* ```ts
|
|
341
|
-
* //
|
|
347
|
+
* // With a fixed ID
|
|
342
348
|
* initGA({ trackingId: 'G-XXXXXXX' })
|
|
343
349
|
*
|
|
344
|
-
* //
|
|
350
|
+
* // With dynamic resolution
|
|
345
351
|
* initGA({
|
|
346
352
|
* resolveTrackingId: (path) => {
|
|
347
353
|
* if (path.startsWith('/kin')) return 'G-KIN-ID'
|
|
@@ -352,70 +358,70 @@ declare const getGATrackingId: () => string;
|
|
|
352
358
|
*/
|
|
353
359
|
declare const initGA: (config?: TrackingConfig) => void;
|
|
354
360
|
/**
|
|
355
|
-
*
|
|
356
|
-
*
|
|
361
|
+
* Reinitializes GA with a new Tracking ID.
|
|
362
|
+
* Useful when the ID changes dynamically (e.g., after user login).
|
|
357
363
|
*/
|
|
358
364
|
declare const reinitGA: (newTrackingId: string) => void;
|
|
359
365
|
/**
|
|
360
|
-
*
|
|
366
|
+
* Returns whether GA has been initialized.
|
|
361
367
|
*/
|
|
362
368
|
declare const isGAInitialized: () => boolean;
|
|
363
369
|
/**
|
|
364
|
-
*
|
|
370
|
+
* Extracts UTM parameters from the current URL.
|
|
365
371
|
*/
|
|
366
372
|
declare const captureUTMParams: () => UTMParams | null;
|
|
367
373
|
/**
|
|
368
|
-
*
|
|
369
|
-
*
|
|
374
|
+
* Captures the `user_id` from the URL query string (?user_id=xxx).
|
|
375
|
+
* Caches it internally to include in all subsequent events.
|
|
370
376
|
*/
|
|
371
377
|
declare const captureUserIdFromURL: () => string | null;
|
|
372
378
|
/**
|
|
373
|
-
*
|
|
374
|
-
*
|
|
379
|
+
* Resolves the user name from multiple sources.
|
|
380
|
+
* Priority: URL > in-memory cache > localStorage > null
|
|
375
381
|
*/
|
|
376
382
|
declare const getUserName: () => string | null;
|
|
377
383
|
/**
|
|
378
|
-
*
|
|
384
|
+
* Returns the cached user_id.
|
|
379
385
|
*/
|
|
380
386
|
declare const getUserId: () => string | null;
|
|
381
387
|
/**
|
|
382
|
-
*
|
|
388
|
+
* Manually sets the user_id (e.g., after login).
|
|
383
389
|
*/
|
|
384
390
|
declare const setUserId: (userId: string) => void;
|
|
385
391
|
/**
|
|
386
|
-
*
|
|
392
|
+
* Manually sets the user_name.
|
|
387
393
|
*/
|
|
388
394
|
declare const setUserName: (userName: string) => void;
|
|
389
395
|
/**
|
|
390
|
-
*
|
|
391
|
-
*
|
|
396
|
+
* Sends a pageview to GA4.
|
|
397
|
+
* Automatically includes UTM params and user_id if available.
|
|
392
398
|
*/
|
|
393
399
|
declare const trackPageView: (path: string) => void;
|
|
394
400
|
/**
|
|
395
|
-
*
|
|
396
|
-
*
|
|
397
|
-
*
|
|
401
|
+
* Sends a custom event to GA4.
|
|
402
|
+
* Uses dual dispatch: `window.gtag()` + `ReactGA.event()`.
|
|
403
|
+
* Always includes `user_id` and `user_name` as parameters.
|
|
398
404
|
*
|
|
399
405
|
* @example
|
|
400
406
|
* ```ts
|
|
401
|
-
* trackEvent('CTA', 'click', '
|
|
407
|
+
* trackEvent('CTA', 'click', 'Hero Button', undefined, { section: 'hero' })
|
|
402
408
|
* ```
|
|
403
409
|
*/
|
|
404
410
|
declare const trackEvent: (category: string, action: string, label?: string, value?: number, additionalData?: TrackingEventData) => void;
|
|
405
411
|
/**
|
|
406
|
-
*
|
|
412
|
+
* Resets all internal state (useful for tests and reinitialization).
|
|
407
413
|
*/
|
|
408
414
|
declare const resetAnalytics: () => void;
|
|
409
415
|
|
|
410
416
|
/**
|
|
411
|
-
* Google Tag Manager —
|
|
412
|
-
*
|
|
417
|
+
* Google Tag Manager — Vanilla injection (no Next.js dependency).
|
|
418
|
+
* Provides pushToDataLayer and injectGTMScript.
|
|
413
419
|
*/
|
|
414
420
|
/**
|
|
415
|
-
*
|
|
416
|
-
*
|
|
421
|
+
* Injects the Google Tag Manager script into the document <head>.
|
|
422
|
+
* Framework-agnostic equivalent of Next.js <Script> component.
|
|
417
423
|
*
|
|
418
|
-
* @param gtmId -
|
|
424
|
+
* @param gtmId - GTM container ID (e.g., 'GTM-5GMQNFMN')
|
|
419
425
|
*
|
|
420
426
|
* @example
|
|
421
427
|
* ```ts
|
|
@@ -424,78 +430,78 @@ declare const resetAnalytics: () => void;
|
|
|
424
430
|
*/
|
|
425
431
|
declare const injectGTMScript: (gtmId: string) => void;
|
|
426
432
|
/**
|
|
427
|
-
*
|
|
433
|
+
* Pushes an event to the GTM dataLayer.
|
|
428
434
|
*
|
|
429
|
-
* @param eventName -
|
|
430
|
-
* @param data -
|
|
435
|
+
* @param eventName - Name of the event
|
|
436
|
+
* @param data - Additional event data
|
|
431
437
|
*
|
|
432
438
|
* @example
|
|
433
439
|
* ```ts
|
|
434
440
|
* pushToDataLayer('page_view', { page_path: '/kin' })
|
|
435
|
-
* pushToDataLayer('cta_click', { button_text: '
|
|
441
|
+
* pushToDataLayer('cta_click', { button_text: 'Join Now', section: 'hero' })
|
|
436
442
|
* ```
|
|
437
443
|
*/
|
|
438
444
|
declare const pushToDataLayer: (eventName: string, data?: Record<string, unknown>) => void;
|
|
439
445
|
|
|
440
446
|
/**
|
|
441
|
-
* VideoTracker —
|
|
442
|
-
*
|
|
443
|
-
* Framework-agnostic (no
|
|
447
|
+
* VideoTracker — Advanced video tracking for GA4.
|
|
448
|
+
* Manages per-video playback state and emits events to Google Analytics.
|
|
449
|
+
* Framework-agnostic (no React dependency).
|
|
444
450
|
*/
|
|
445
451
|
|
|
446
452
|
declare class VideoTracker {
|
|
447
453
|
private videos;
|
|
448
454
|
private watchTimeIntervals;
|
|
449
455
|
/**
|
|
450
|
-
*
|
|
456
|
+
* Initializes tracking for a video.
|
|
451
457
|
*/
|
|
452
458
|
initVideo(videoId: string): void;
|
|
453
459
|
/**
|
|
454
|
-
*
|
|
460
|
+
* Tracks a play event.
|
|
455
461
|
*/
|
|
456
462
|
trackPlay(videoId: string, currentTime?: number): void;
|
|
457
463
|
/**
|
|
458
|
-
*
|
|
464
|
+
* Tracks a pause event.
|
|
459
465
|
*/
|
|
460
466
|
trackPause(videoId: string, currentTime: number, duration?: number): void;
|
|
461
467
|
/**
|
|
462
|
-
*
|
|
468
|
+
* Tracks a seek event (timeline jump).
|
|
463
469
|
*/
|
|
464
470
|
trackSeek(videoId: string, fromTime: number, toTime: number): void;
|
|
465
471
|
/**
|
|
466
|
-
*
|
|
472
|
+
* Tracks progress milestones (25%, 50%, 75%).
|
|
467
473
|
*/
|
|
468
474
|
trackProgress(videoId: string, percentage: number, currentTime: number): void;
|
|
469
475
|
/**
|
|
470
|
-
*
|
|
476
|
+
* Tracks video completion (>=95%).
|
|
471
477
|
*/
|
|
472
478
|
trackComplete(videoId: string, totalDuration: number): void;
|
|
473
479
|
/**
|
|
474
|
-
*
|
|
480
|
+
* Tracks video end (native ended event).
|
|
475
481
|
*/
|
|
476
482
|
trackEnd(videoId: string): void;
|
|
477
483
|
/**
|
|
478
|
-
*
|
|
484
|
+
* Tracks playback speed change.
|
|
479
485
|
*/
|
|
480
486
|
trackSpeedChange(videoId: string, speed: number): void;
|
|
481
487
|
/**
|
|
482
|
-
*
|
|
488
|
+
* Tracks fullscreen toggle.
|
|
483
489
|
*/
|
|
484
490
|
trackFullscreen(videoId: string, isFullscreen: boolean): void;
|
|
485
491
|
/**
|
|
486
|
-
*
|
|
492
|
+
* Tracks no interaction (user is on the page but not interacting with the video).
|
|
487
493
|
*/
|
|
488
494
|
trackNoInteraction(videoId: string, timeOnPage: number): void;
|
|
489
495
|
/**
|
|
490
|
-
*
|
|
496
|
+
* Returns the current state of a video.
|
|
491
497
|
*/
|
|
492
498
|
getState(videoId: string): VideoTrackingState | undefined;
|
|
493
499
|
/**
|
|
494
|
-
*
|
|
500
|
+
* Cleans up tracking for a specific video.
|
|
495
501
|
*/
|
|
496
502
|
cleanup(videoId: string): void;
|
|
497
503
|
/**
|
|
498
|
-
*
|
|
504
|
+
* Cleans up all video tracking.
|
|
499
505
|
*/
|
|
500
506
|
cleanupAll(): void;
|
|
501
507
|
private getOrCreateState;
|
|
@@ -503,14 +509,14 @@ declare class VideoTracker {
|
|
|
503
509
|
private stopWatchTimeTracking;
|
|
504
510
|
}
|
|
505
511
|
/**
|
|
506
|
-
*
|
|
507
|
-
*
|
|
512
|
+
* Singleton VideoTracker instance.
|
|
513
|
+
* Use when a single global instance is needed.
|
|
508
514
|
*/
|
|
509
515
|
declare const videoTracker: VideoTracker;
|
|
510
516
|
|
|
511
517
|
/**
|
|
512
|
-
*
|
|
513
|
-
*
|
|
518
|
+
* Generic GA4 event tracking functions.
|
|
519
|
+
* Each function wraps `trackEvent()` with a predefined category and action.
|
|
514
520
|
*/
|
|
515
521
|
|
|
516
522
|
declare const trackCTAClick: (buttonName: string, section: string, additionalData?: TrackingEventData) => void;
|
|
@@ -529,17 +535,40 @@ declare const trackPricingCardClick: (productName: string, price: number | strin
|
|
|
529
535
|
declare const trackContactClick: (method: string) => void;
|
|
530
536
|
declare const trackShare: (platform: string, content: string) => void;
|
|
531
537
|
declare const trackDownload: (fileName: string, fileType: string) => void;
|
|
538
|
+
/**
|
|
539
|
+
* Tracks quiz start (funnel stage 5).
|
|
540
|
+
* The quiz serves as an implicit lead scoring mechanism.
|
|
541
|
+
*/
|
|
542
|
+
declare const trackQuizStart: (quizName: string) => void;
|
|
543
|
+
/**
|
|
544
|
+
* Tracks an individual quiz answer.
|
|
545
|
+
*/
|
|
546
|
+
declare const trackQuizAnswer: (quizName: string, questionIndex: number, answer: string) => void;
|
|
547
|
+
/**
|
|
548
|
+
* Tracks quiz completion (funnel stage 5).
|
|
549
|
+
*/
|
|
550
|
+
declare const trackQuizComplete: (quizName: string, totalQuestions?: number, score?: number) => void;
|
|
551
|
+
/**
|
|
552
|
+
* Tracks a Thank You Page visit (funnel stage 6).
|
|
553
|
+
* Confirms the lead completed the funnel flow.
|
|
554
|
+
*/
|
|
555
|
+
declare const trackThankYouPageVisit: (source?: string) => void;
|
|
556
|
+
/**
|
|
557
|
+
* Tracks a WhatsApp link click (funnel stage 7).
|
|
558
|
+
* Complements markWhatsAppSent() which marks post-hoc.
|
|
559
|
+
*/
|
|
560
|
+
declare const trackWhatsAppClick: (phoneNumber?: string, section?: string) => void;
|
|
532
561
|
|
|
533
562
|
/**
|
|
534
|
-
*
|
|
535
|
-
*
|
|
563
|
+
* Wistia video adapter.
|
|
564
|
+
* Auto-detects the Wistia SDK and binds to its events.
|
|
536
565
|
* Framework-agnostic.
|
|
537
566
|
*/
|
|
538
567
|
|
|
539
568
|
/**
|
|
540
|
-
*
|
|
541
|
-
*
|
|
542
|
-
*
|
|
569
|
+
* Starts tracking a Wistia video by its Media ID.
|
|
570
|
+
* Detects whether to use the native Wistia player or an HTML5 <video> fallback.
|
|
571
|
+
* Returns a handle with getStats(), onUpdate(), and stop().
|
|
543
572
|
*
|
|
544
573
|
* @example
|
|
545
574
|
* ```ts
|
|
@@ -547,59 +576,59 @@ declare const trackDownload: (fileName: string, fileType: string) => void;
|
|
|
547
576
|
* tracker.onUpdate((stats) => {
|
|
548
577
|
* console.log(stats.timeWatched, stats.completed)
|
|
549
578
|
* })
|
|
550
|
-
* //
|
|
579
|
+
* // On unmount:
|
|
551
580
|
* tracker.stop()
|
|
552
581
|
* ```
|
|
553
582
|
*/
|
|
554
583
|
declare const trackWistiaByMediaId: (mediaId: string) => Promise<VideoTrackerHandle | null>;
|
|
555
584
|
|
|
556
585
|
/**
|
|
557
|
-
*
|
|
558
|
-
*
|
|
586
|
+
* Voomly video adapter.
|
|
587
|
+
* Uses 3 complementary strategies to track embedded Voomly videos.
|
|
559
588
|
* Framework-agnostic.
|
|
560
589
|
*/
|
|
561
590
|
|
|
562
591
|
/**
|
|
563
|
-
*
|
|
564
|
-
*
|
|
565
|
-
* 1.
|
|
566
|
-
* 2.
|
|
567
|
-
* 3.
|
|
592
|
+
* Starts tracking a Voomly video by its Embed ID.
|
|
593
|
+
* Uses 3 complementary strategies:
|
|
594
|
+
* 1. Periodic DOM scan (every 2s) searching for <video> inside the embed
|
|
595
|
+
* 2. Fallback polling (every 1s) reading .currentTime
|
|
596
|
+
* 3. Global window events (voomly:video:*)
|
|
568
597
|
*
|
|
569
598
|
* @example
|
|
570
599
|
* ```ts
|
|
571
600
|
* const tracker = await trackVoomlyByEmbedId('my-voomly-id')
|
|
572
601
|
* tracker.onUpdate((stats) => console.log(stats))
|
|
573
|
-
* //
|
|
602
|
+
* // IMPORTANT: call stop() on unmount to prevent memory leaks
|
|
574
603
|
* tracker.stop()
|
|
575
604
|
* ```
|
|
576
605
|
*/
|
|
577
606
|
declare const trackVoomlyByEmbedId: (embedId: string) => Promise<VideoTrackerHandle | null>;
|
|
578
607
|
|
|
579
608
|
/**
|
|
580
|
-
*
|
|
581
|
-
*
|
|
609
|
+
* Native HTML5 video adapter.
|
|
610
|
+
* Pure tracking for <video> elements with no React dependency.
|
|
582
611
|
*/
|
|
583
612
|
|
|
584
613
|
/**
|
|
585
|
-
*
|
|
586
|
-
*
|
|
614
|
+
* Starts tracking a native HTML5 <video> element.
|
|
615
|
+
* Listens to standard browser Video API events.
|
|
587
616
|
*
|
|
588
617
|
* @example
|
|
589
618
|
* ```ts
|
|
590
619
|
* const video = document.querySelector('video')
|
|
591
620
|
* const tracker = trackHTML5Video('hero-video', video)
|
|
592
621
|
* tracker.onUpdate((stats) => console.log(stats))
|
|
593
|
-
* //
|
|
622
|
+
* // On unmount:
|
|
594
623
|
* tracker.stop()
|
|
595
624
|
* ```
|
|
596
625
|
*/
|
|
597
626
|
declare const trackHTML5Video: (videoId: string, videoElement: HTMLVideoElement) => VideoTrackerHandle;
|
|
598
627
|
|
|
599
628
|
/**
|
|
600
|
-
* LandingTracker —
|
|
601
|
-
*
|
|
602
|
-
* form auto-tracking
|
|
629
|
+
* LandingTracker — Full session orchestrator.
|
|
630
|
+
* Initializes and manages scroll tracking, click heatmap, section dwell time,
|
|
631
|
+
* form auto-tracking, and session start/end.
|
|
603
632
|
* Framework-agnostic.
|
|
604
633
|
*/
|
|
605
634
|
|
|
@@ -613,30 +642,30 @@ declare class LandingTracker {
|
|
|
613
642
|
private observers;
|
|
614
643
|
private listeners;
|
|
615
644
|
/**
|
|
616
|
-
*
|
|
645
|
+
* Initializes landing page tracking with the given configuration.
|
|
617
646
|
*/
|
|
618
647
|
init(config: LandingTrackerConfig): void;
|
|
619
648
|
/**
|
|
620
|
-
*
|
|
649
|
+
* Destroys the tracker and cleans up all observers and listeners.
|
|
621
650
|
*/
|
|
622
651
|
destroy(): void;
|
|
623
|
-
/**
|
|
652
|
+
/** Track a CTA click */
|
|
624
653
|
trackCTAClick(buttonName: string, section: string, additionalData?: Record<string, unknown>): void;
|
|
625
|
-
/**
|
|
654
|
+
/** Track a conversion */
|
|
626
655
|
trackConversion(type: string, value?: number, additionalData?: Record<string, unknown>): void;
|
|
627
|
-
/**
|
|
656
|
+
/** Track FAQ expansion */
|
|
628
657
|
trackFAQExpand(question: string, index: number): void;
|
|
629
|
-
/**
|
|
658
|
+
/** Track social link click */
|
|
630
659
|
trackSocialClick(platform: string, action: string): void;
|
|
631
|
-
/**
|
|
660
|
+
/** Track image click */
|
|
632
661
|
trackImageClick(imageName: string, section: string): void;
|
|
633
|
-
/**
|
|
662
|
+
/** Track scroll to a section */
|
|
634
663
|
trackScrollTo(section: string): void;
|
|
635
|
-
/**
|
|
664
|
+
/** Track content share */
|
|
636
665
|
trackShare(platform: string, content: string): void;
|
|
637
|
-
/**
|
|
666
|
+
/** Track file download */
|
|
638
667
|
trackDownload(fileName: string, fileType: string): void;
|
|
639
|
-
/**
|
|
668
|
+
/** Get current session data */
|
|
640
669
|
getSessionData(): {
|
|
641
670
|
duration: number;
|
|
642
671
|
clicks: number;
|
|
@@ -655,7 +684,7 @@ declare class LandingTracker {
|
|
|
655
684
|
private initClickHeatmap;
|
|
656
685
|
}
|
|
657
686
|
/**
|
|
658
|
-
* Factory function
|
|
687
|
+
* Factory function to create a LandingTracker.
|
|
659
688
|
*
|
|
660
689
|
* @example
|
|
661
690
|
* ```ts
|
|
@@ -664,15 +693,15 @@ declare class LandingTracker {
|
|
|
664
693
|
* pageName: 'Kin Landing Page',
|
|
665
694
|
* gtmId: 'GTM-5GMQNFMN',
|
|
666
695
|
* })
|
|
667
|
-
* //
|
|
696
|
+
* // On unmount:
|
|
668
697
|
* tracker.destroy()
|
|
669
698
|
* ```
|
|
670
699
|
*/
|
|
671
700
|
declare const createLandingTracker: (config: LandingTrackerConfig) => LandingTracker;
|
|
672
701
|
|
|
673
702
|
/**
|
|
674
|
-
* API Client —
|
|
675
|
-
* Framework-agnostic.
|
|
703
|
+
* API Client — Configurable HTTP client for backend persistence.
|
|
704
|
+
* Framework-agnostic. Uses native fetch.
|
|
676
705
|
*
|
|
677
706
|
* @example
|
|
678
707
|
* ```ts
|
|
@@ -686,82 +715,81 @@ declare const createLandingTracker: (config: LandingTrackerConfig) => LandingTra
|
|
|
686
715
|
*/
|
|
687
716
|
|
|
688
717
|
/**
|
|
689
|
-
*
|
|
690
|
-
*
|
|
718
|
+
* Initializes the HTTP client for the persistence layer.
|
|
719
|
+
* Must be called before using lead submission, dwell time, or query functions.
|
|
691
720
|
*/
|
|
692
721
|
declare const initTrackingAPI: (config: TrackingAPIConfig) => void;
|
|
693
722
|
/**
|
|
694
|
-
*
|
|
723
|
+
* Returns whether the API client has been initialized.
|
|
695
724
|
*/
|
|
696
725
|
declare const isTrackingAPIInitialized: () => boolean;
|
|
697
726
|
|
|
698
727
|
/**
|
|
699
|
-
* Lead Submission —
|
|
700
|
-
*
|
|
728
|
+
* Lead Submission — Lead creation and update against the backend.
|
|
729
|
+
* Migrated from lead-origin-detector.ts, framework-agnostic.
|
|
701
730
|
*/
|
|
702
731
|
|
|
703
732
|
/**
|
|
704
|
-
*
|
|
733
|
+
* Extracts all relevant parameters from the URL.
|
|
705
734
|
*
|
|
706
|
-
* @param url - URL
|
|
707
|
-
* @returns
|
|
735
|
+
* @param url - Optional URL (defaults to window.location if omitted)
|
|
736
|
+
* @returns Object containing all extracted parameters
|
|
708
737
|
*/
|
|
709
738
|
declare const extractUrlParams: (url?: string) => UrlParams;
|
|
710
739
|
/**
|
|
711
|
-
*
|
|
712
|
-
* Facebook Ads:
|
|
713
|
-
*
|
|
740
|
+
* Detects the lead origin based on URL parameters.
|
|
741
|
+
* Facebook Ads: has fbclid OR campaign_id
|
|
742
|
+
* Organic: has whatsapp AND does NOT have fbclid AND does NOT have campaign_id
|
|
714
743
|
*/
|
|
715
744
|
declare const detectLeadOrigin: (url?: string) => LeadOrigin;
|
|
716
745
|
/**
|
|
717
|
-
*
|
|
746
|
+
* Builds the request body based on the lead origin type.
|
|
718
747
|
*/
|
|
719
748
|
declare const buildTrackingRequestBody: (params: UrlParams, formData: LeadFormData, origin: LeadOrigin, options?: BuildRequestBodyOptions) => Record<string, unknown>;
|
|
720
749
|
/**
|
|
721
|
-
*
|
|
750
|
+
* Submits the lead to the correct endpoint based on its origin.
|
|
722
751
|
*/
|
|
723
752
|
declare const submitTrackingLead: (body: Record<string, unknown>, origin: LeadOrigin) => Promise<SubmitTrackingLeadResponse>;
|
|
724
753
|
/**
|
|
725
|
-
*
|
|
754
|
+
* End-to-end function: detects origin, builds body, and submits the lead.
|
|
726
755
|
*
|
|
727
756
|
* @example
|
|
728
757
|
* ```ts
|
|
729
758
|
* const result = await submitLead(
|
|
730
759
|
* { nombre: 'Juan', correo: 'juan@mail.com', telefono: '+34600...' },
|
|
731
|
-
* { nameForm: '
|
|
760
|
+
* { nameForm: 'Kin Form', videoCompleted: true },
|
|
732
761
|
* );
|
|
733
762
|
* ```
|
|
734
763
|
*/
|
|
735
764
|
declare const submitLead: (formData: LeadFormData, options?: BuildRequestBodyOptions, url?: string) => Promise<SubmitTrackingLeadResponse>;
|
|
736
765
|
/**
|
|
737
|
-
*
|
|
766
|
+
* Updates an existing lead via PATCH.
|
|
738
767
|
*/
|
|
739
768
|
declare const updateTrackingLead: (trackingId: number | string, updates: Record<string, unknown>) => Promise<boolean>;
|
|
740
769
|
/**
|
|
741
|
-
*
|
|
770
|
+
* Marks a lead as "WhatsApp sent".
|
|
742
771
|
*/
|
|
743
772
|
declare const markWhatsAppSent: (leadId: number | string) => Promise<boolean>;
|
|
744
773
|
/**
|
|
745
|
-
*
|
|
774
|
+
* Builds a msgForm as a JSON-stringified value.
|
|
746
775
|
*/
|
|
747
776
|
declare const buildMsgFormJSON: (mensaje: string, datosAdicionales?: Record<string, unknown>) => string;
|
|
748
777
|
|
|
749
778
|
/**
|
|
750
|
-
* DwellTimeTracker —
|
|
751
|
-
*
|
|
779
|
+
* DwellTimeTracker — Dwell time tracking with periodic backend reporting.
|
|
780
|
+
* Migrated from dwell-time.ts (~960 lines -> ~280 clean lines).
|
|
752
781
|
* Framework-agnostic.
|
|
753
782
|
*/
|
|
754
783
|
|
|
755
784
|
/**
|
|
756
|
-
*
|
|
757
|
-
* y lo envía periódicamente al backend de tracking.
|
|
785
|
+
* Measures user dwell time on a page and periodically sends it to the tracking backend.
|
|
758
786
|
*
|
|
759
|
-
*
|
|
760
|
-
* -
|
|
761
|
-
* -
|
|
762
|
-
* - sendBeacon
|
|
763
|
-
* - Retry
|
|
764
|
-
* -
|
|
787
|
+
* Features:
|
|
788
|
+
* - Automatic send every 30 seconds
|
|
789
|
+
* - Auto-pause when tab is hidden
|
|
790
|
+
* - sendBeacon on beforeunload for maximum reliability
|
|
791
|
+
* - Retry pending updates via sessionStorage
|
|
792
|
+
* - Integrated video tracking (videoTimeWatched, videoCompleted)
|
|
765
793
|
*/
|
|
766
794
|
declare class DwellTimeTracker {
|
|
767
795
|
private startTime;
|
|
@@ -782,28 +810,28 @@ declare class DwellTimeTracker {
|
|
|
782
810
|
private boundVisibilityChange;
|
|
783
811
|
constructor();
|
|
784
812
|
/**
|
|
785
|
-
*
|
|
813
|
+
* Starts dwell time tracking.
|
|
786
814
|
*/
|
|
787
815
|
start(config: DwellTimeConfig): void;
|
|
788
816
|
/**
|
|
789
|
-
*
|
|
817
|
+
* Stops tracking and sends accumulated time.
|
|
790
818
|
*/
|
|
791
819
|
stop(): void;
|
|
792
820
|
/**
|
|
793
|
-
*
|
|
821
|
+
* Returns elapsed time in seconds (excluding paused time).
|
|
794
822
|
*/
|
|
795
823
|
getElapsedTime(): number;
|
|
796
824
|
/**
|
|
797
|
-
*
|
|
798
|
-
*
|
|
825
|
+
* Manually updates video time.
|
|
826
|
+
* Called from VideoTracker or other adapters.
|
|
799
827
|
*/
|
|
800
828
|
updateVideoTime(videoTimeWatched: number, videoCompleted?: boolean): void;
|
|
801
829
|
/**
|
|
802
|
-
*
|
|
830
|
+
* Updates the trackingDataId (useful when obtained after registration).
|
|
803
831
|
*/
|
|
804
832
|
updateTrackingId(trackingDataId: number | string): void;
|
|
805
833
|
/**
|
|
806
|
-
*
|
|
834
|
+
* Cleans up all listeners and timers.
|
|
807
835
|
*/
|
|
808
836
|
destroy(): void;
|
|
809
837
|
private checkLocalStorageForId;
|
|
@@ -819,22 +847,22 @@ declare class DwellTimeTracker {
|
|
|
819
847
|
}
|
|
820
848
|
declare const dwellTimeTracker: DwellTimeTracker;
|
|
821
849
|
/**
|
|
822
|
-
*
|
|
850
|
+
* Starts dwell time tracking.
|
|
823
851
|
*/
|
|
824
852
|
declare const startDwellTimeTracking: (config: DwellTimeConfig) => void;
|
|
825
853
|
/**
|
|
826
|
-
*
|
|
854
|
+
* Stops tracking and sends accumulated time.
|
|
827
855
|
*/
|
|
828
856
|
declare const stopDwellTimeTracking: () => void;
|
|
829
857
|
|
|
830
858
|
/**
|
|
831
|
-
* Tracking Queries —
|
|
832
|
-
*
|
|
859
|
+
* Tracking Queries — GET queries to the tracking backend.
|
|
860
|
+
* Migrated from TrackingService.ts and LeadTrackingService.ts.
|
|
833
861
|
* Framework-agnostic.
|
|
834
862
|
*/
|
|
835
863
|
|
|
836
864
|
/**
|
|
837
|
-
*
|
|
865
|
+
* Retrieves tracking lead data by its ID.
|
|
838
866
|
*
|
|
839
867
|
* @example
|
|
840
868
|
* ```ts
|
|
@@ -844,8 +872,8 @@ declare const stopDwellTimeTracking: () => void;
|
|
|
844
872
|
*/
|
|
845
873
|
declare const getTrackingById: (trackingId: number | string) => Promise<TrackingLead>;
|
|
846
874
|
/**
|
|
847
|
-
*
|
|
848
|
-
*
|
|
875
|
+
* Retrieves a lead with its associated tracking data.
|
|
876
|
+
* Processes the response to extract videoVisto, tiempoReproducido, etc.
|
|
849
877
|
*
|
|
850
878
|
* @example
|
|
851
879
|
* ```ts
|
|
@@ -855,15 +883,15 @@ declare const getTrackingById: (trackingId: number | string) => Promise<Tracking
|
|
|
855
883
|
*/
|
|
856
884
|
declare const getLeadWithTracking: (leadId: string) => Promise<LeadTrackingData>;
|
|
857
885
|
/**
|
|
858
|
-
*
|
|
886
|
+
* Generates a tracking link for a funnel.
|
|
859
887
|
*
|
|
860
888
|
* @example
|
|
861
889
|
* ```ts
|
|
862
|
-
* const { link } = await generateTrackingLink(1, '
|
|
890
|
+
* const { link } = await generateTrackingLink(1, 'my-domain.com');
|
|
863
891
|
* ```
|
|
864
892
|
*/
|
|
865
893
|
declare const generateTrackingLink: (funnelId: number, customDomain: string) => Promise<{
|
|
866
894
|
link: string;
|
|
867
895
|
}>;
|
|
868
896
|
|
|
869
|
-
export { type BuildRequestBodyOptions, type ClickData, type DwellTimeConfig, DwellTimeTracker, LandingTracker, type LandingTrackerConfig, type LeadFormData, type LeadOrigin, type LeadTrackingData, type SessionSummary, type SubmitTrackingLeadResponse, type TrackingAPIConfig, type TrackingConfig, type TrackingEventData, type TrackingLead, type TrackingLeadResponse, type UTMParams, type UrlParams, type UseVideoTrackingOptions, type VideoStats, VideoTracker, type VideoTrackerHandle, type VideoTrackingState, type VideoUpdateCallback, type VisitorData, buildMsgFormJSON, buildTrackingRequestBody, captureUTMParams, captureUserIdFromURL, createLandingTracker, detectLeadOrigin, dwellTimeTracker, extractUrlParams, generateTrackingLink, getGATrackingId, getLeadWithTracking, getTrackingById, getUserId, getUserName, initGA, initTrackingAPI, injectGTMScript, isGAInitialized, isTrackingAPIInitialized, markWhatsAppSent, pushToDataLayer, reinitGA, resetAnalytics, setUserId, setUserName, startDwellTimeTracking, stopDwellTimeTracking, submitLead, submitTrackingLead, trackCTAClick, trackContactClick, trackConversion, trackDownload, trackEvent, trackFAQExpand, trackFormFieldComplete, trackFormStart, trackFormSubmit, trackFormValidationError, trackHTML5Video, trackImageClick, trackPageView, trackPricingCardClick, trackScrollTo, trackSectionClick, trackShare, trackSocialClick, trackTimeInSection, trackVoomlyByEmbedId, trackWistiaByMediaId, updateTrackingLead, videoTracker };
|
|
897
|
+
export { type BuildRequestBodyOptions, type ClickData, type DwellTimeConfig, DwellTimeTracker, LandingTracker, type LandingTrackerConfig, type LeadFormData, type LeadOrigin, type LeadTrackingData, type SessionSummary, type SubmitTrackingLeadResponse, type TrackingAPIConfig, type TrackingConfig, type TrackingEventData, type TrackingLead, type TrackingLeadResponse, type UTMParams, type UrlParams, type UseVideoTrackingOptions, type VideoStats, VideoTracker, type VideoTrackerHandle, type VideoTrackingState, type VideoUpdateCallback, type VisitorData, buildMsgFormJSON, buildTrackingRequestBody, captureUTMParams, captureUserIdFromURL, createLandingTracker, detectLeadOrigin, dwellTimeTracker, extractUrlParams, generateTrackingLink, getGATrackingId, getLeadWithTracking, getTrackingById, getUserId, getUserName, initGA, initTrackingAPI, injectGTMScript, isGAInitialized, isTrackingAPIInitialized, markWhatsAppSent, pushToDataLayer, reinitGA, resetAnalytics, setUserId, setUserName, startDwellTimeTracking, stopDwellTimeTracking, submitLead, submitTrackingLead, trackCTAClick, trackContactClick, trackConversion, trackDownload, trackEvent, trackFAQExpand, trackFormFieldComplete, trackFormStart, trackFormSubmit, trackFormValidationError, trackHTML5Video, trackImageClick, trackPageView, trackPricingCardClick, trackQuizAnswer, trackQuizComplete, trackQuizStart, trackScrollTo, trackSectionClick, trackShare, trackSocialClick, trackThankYouPageVisit, trackTimeInSection, trackVoomlyByEmbedId, trackWhatsAppClick, trackWistiaByMediaId, updateTrackingLead, videoTracker };
|