@metodokorexmk/tracking 1.1.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.
@@ -1,51 +1,51 @@
1
1
  /**
2
- * Configuración del LandingTracker (orquestador de sesión).
2
+ * LandingTracker configuration (session orchestrator).
3
3
  */
4
4
  interface LandingTrackerConfig {
5
- /** Ruta de la landing page (ej: '/kin', '/racha') */
5
+ /** Landing page path (e.g., '/kin', '/racha') */
6
6
  pagePath: string;
7
- /** Nombre legible de la landing (ej: 'Kin Landing Page') */
7
+ /** Human-readable landing page name (e.g., 'Kin Landing Page') */
8
8
  pageName: string;
9
- /** ID de Google Tag Manager (opcional) */
9
+ /** Google Tag Manager container ID (optional) */
10
10
  gtmId?: string;
11
- /** Habilitar tracking de scroll (milestones 25/50/75/100%). Default: true */
11
+ /** Enable scroll tracking (milestones 25/50/75/100%). Default: true */
12
12
  enableScrollTracking?: boolean;
13
- /** Habilitar tracking automático de clicks en CTAs. Default: true */
13
+ /** Enable automatic CTA click tracking. Default: true */
14
14
  enableCTATracking?: boolean;
15
- /** Habilitar tracking de tiempo en página. Default: true */
15
+ /** Enable page dwell time tracking. Default: true */
16
16
  enableTimeTracking?: boolean;
17
- /** Habilitar tracking de tiempo por sección (IntersectionObserver). Default: true */
17
+ /** Enable per-section dwell time via IntersectionObserver. Default: true */
18
18
  enableSectionTracking?: boolean;
19
- /** Habilitar auto-tracking de formularios. Default: true */
19
+ /** Enable automatic form interaction tracking. Default: true */
20
20
  enableFormTracking?: boolean;
21
- /** Habilitar heatmap de clicks (coordenadas X/Y). Default: false */
21
+ /** Enable click heatmap (X/Y coordinates). Default: false */
22
22
  enableHeatmap?: boolean;
23
- /** Sufijo personalizado para eventos (ej: '_kin' para 'cta_click_kin'). Default: '' */
23
+ /** Custom event suffix (e.g., '_kin' produces 'cta_click_kin'). Default: '' */
24
24
  eventSuffix?: string;
25
25
  }
26
26
  /**
27
- * Estadísticas de reproducción de un video.
28
- * Compartido entre todos los adaptadores (Wistia, Voomly, HTML5).
27
+ * Video playback statistics.
28
+ * Shared across all adapters (Wistia, Voomly, HTML5).
29
29
  */
30
30
  interface VideoStats {
31
- /** Tiempo total reproducido en segundos */
31
+ /** Total time watched in seconds */
32
32
  timeWatched: number;
33
- /** Si el video fue completado (90-95%) */
33
+ /** Whether the video was completed (>=90-95%) */
34
34
  completed: boolean;
35
- /** Timestamp de la última actualización */
35
+ /** Timestamp of the last stats update */
36
36
  lastUpdate: number;
37
37
  }
38
38
  /**
39
- * Opciones para los hooks de video en React.
39
+ * Options for React video tracking hooks.
40
40
  */
41
41
  interface UseVideoTrackingOptions {
42
- /** ID único del video */
42
+ /** Unique video identifier */
43
43
  videoId: string;
44
- /** Referencia al elemento <video> HTML (solo para HTML5) */
44
+ /** Reference to the HTML <video> element (HTML5 only) */
45
45
  videoElement?: HTMLVideoElement | null;
46
- /** Callback cuando el video se completa */
46
+ /** Callback when the video completes */
47
47
  onComplete?: () => void;
48
- /** Callback en milestones de progreso (25, 50, 75) */
48
+ /** Callback on progress milestones (25, 50, 75) */
49
49
  onProgress?: (percentage: number) => void;
50
50
  }
51
51
  declare global {
@@ -60,9 +60,9 @@ declare global {
60
60
  }
61
61
 
62
62
  /**
63
- * LandingTracker — Orquestador de sesión completa
64
- * Inicializa y gestiona scroll tracking, click heatmap, section dwell time,
65
- * form auto-tracking y sesión start/end.
63
+ * LandingTracker — Full session orchestrator.
64
+ * Initializes and manages scroll tracking, click heatmap, section dwell time,
65
+ * form auto-tracking, and session start/end.
66
66
  * Framework-agnostic.
67
67
  */
68
68
 
@@ -76,30 +76,30 @@ declare class LandingTracker {
76
76
  private observers;
77
77
  private listeners;
78
78
  /**
79
- * Inicializa el tracking de la landing con la configuración dada.
79
+ * Initializes landing page tracking with the given configuration.
80
80
  */
81
81
  init(config: LandingTrackerConfig): void;
82
82
  /**
83
- * Destruye el tracker y limpia todos los observers y listeners.
83
+ * Destroys the tracker and cleans up all observers and listeners.
84
84
  */
85
85
  destroy(): void;
86
- /** Trackear click en un CTA */
86
+ /** Track a CTA click */
87
87
  trackCTAClick(buttonName: string, section: string, additionalData?: Record<string, unknown>): void;
88
- /** Trackear conversión */
88
+ /** Track a conversion */
89
89
  trackConversion(type: string, value?: number, additionalData?: Record<string, unknown>): void;
90
- /** Trackear click en FAQs */
90
+ /** Track FAQ expansion */
91
91
  trackFAQExpand(question: string, index: number): void;
92
- /** Trackear click social */
92
+ /** Track social link click */
93
93
  trackSocialClick(platform: string, action: string): void;
94
- /** Trackear click en imagen */
94
+ /** Track image click */
95
95
  trackImageClick(imageName: string, section: string): void;
96
- /** Trackear scroll a sección */
96
+ /** Track scroll to a section */
97
97
  trackScrollTo(section: string): void;
98
- /** Trackear share */
98
+ /** Track content share */
99
99
  trackShare(platform: string, content: string): void;
100
- /** Trackear descarga */
100
+ /** Track file download */
101
101
  trackDownload(fileName: string, fileType: string): void;
102
- /** Obtener datos de la sesión actual */
102
+ /** Get current session data */
103
103
  getSessionData(): {
104
104
  duration: number;
105
105
  clicks: number;
@@ -120,13 +120,13 @@ declare class LandingTracker {
120
120
 
121
121
  /**
122
122
  * React Hook: useLandingPageTracking
123
- * Inicializa el tracking completo de una landing page.
124
- * Wrapper React del LandingTracker framework-agnostic.
123
+ * Initializes full landing page tracking.
124
+ * React wrapper for the framework-agnostic LandingTracker.
125
125
  */
126
126
 
127
127
  /**
128
- * Hook para inicializar tracking completo de una landing page.
129
- * Crea un LandingTracker, lo inicializa y lo destruye al desmontar.
128
+ * Hook to initialize full landing page tracking.
129
+ * Creates a LandingTracker, initializes it, and destroys it on unmount.
130
130
  *
131
131
  * @example
132
132
  * ```tsx
@@ -137,8 +137,8 @@ declare class LandingTracker {
137
137
  * gtmId: 'GTM-5GMQNFMN',
138
138
  * })
139
139
  *
140
- * // Usar tracker para eventos manuales
141
- * const handleClick = () => tracker?.trackCTAClick('Unirse', 'hero')
140
+ * // Use tracker for manual events
141
+ * const handleClick = () => tracker?.trackCTAClick('Join', 'hero')
142
142
  * }
143
143
  * ```
144
144
  */
@@ -146,21 +146,21 @@ declare function useLandingPageTracking(config: LandingTrackerConfig): LandingTr
146
146
 
147
147
  /**
148
148
  * React Hooks: useVideoTracking, useWistiaVideoTracking
149
- * Hooks para integrar tracking de video en componentes React.
149
+ * Hooks for integrating video tracking in React components.
150
150
  */
151
151
 
152
152
  interface VideoTrackingReturn {
153
- /** Porcentaje de progreso (0-100) */
153
+ /** Progress percentage (0-100) */
154
154
  progress: number;
155
- /** Si el video se está reproduciendo */
155
+ /** Whether the video is currently playing */
156
156
  isPlaying: boolean;
157
- /** Tiempo actual en segundos */
157
+ /** Current playback time in seconds */
158
158
  currentTime: number;
159
- /** Duración total en segundos */
159
+ /** Total duration in seconds */
160
160
  duration: number;
161
161
  }
162
162
  /**
163
- * Hook para tracking de un elemento <video> HTML5 nativo.
163
+ * Hook for tracking a native HTML5 <video> element.
164
164
  *
165
165
  * @example
166
166
  * ```tsx
@@ -169,8 +169,8 @@ interface VideoTrackingReturn {
169
169
  * const { progress, isPlaying } = useVideoTracking({
170
170
  * videoId: 'hero-video',
171
171
  * videoElement: videoRef.current,
172
- * onComplete: () => console.log('Video completado'),
173
- * onProgress: (pct) => console.log(`Progreso: ${pct}%`),
172
+ * onComplete: () => console.log('Video completed'),
173
+ * onProgress: (pct) => console.log(`Progress: ${pct}%`),
174
174
  * })
175
175
  *
176
176
  * return <video ref={videoRef} src="/video.mp4" />
@@ -179,20 +179,20 @@ interface VideoTrackingReturn {
179
179
  */
180
180
  declare function useVideoTracking({ videoId, videoElement, onComplete, onProgress }: UseVideoTrackingOptions): VideoTrackingReturn;
181
181
  interface WistiaTrackingReturn {
182
- /** Estadísticas actuales del video */
182
+ /** Current video stats */
183
183
  stats: VideoStats;
184
- /** Si el video fue completado */
184
+ /** Whether the video was completed */
185
185
  isCompleted: boolean;
186
186
  }
187
187
  /**
188
- * Hook para tracking de un video Wistia.
189
- * Sondea window._wq hasta que el SDK de Wistia esté listo.
188
+ * Hook for tracking a Wistia video.
189
+ * Polls window._wq until the Wistia SDK is ready.
190
190
  *
191
191
  * @example
192
192
  * ```tsx
193
193
  * function WistiaPlayer({ mediaId }: { mediaId: string }) {
194
194
  * const { stats, isCompleted } = useWistiaVideoTracking(mediaId)
195
- * return <div>Visto: {stats.timeWatched}s {isCompleted && '✅'}</div>
195
+ * return <div>Watched: {stats.timeWatched}s {isCompleted && '✅'}</div>
196
196
  * }
197
197
  * ```
198
198
  */
@@ -1,51 +1,51 @@
1
1
  /**
2
- * Configuración del LandingTracker (orquestador de sesión).
2
+ * LandingTracker configuration (session orchestrator).
3
3
  */
4
4
  interface LandingTrackerConfig {
5
- /** Ruta de la landing page (ej: '/kin', '/racha') */
5
+ /** Landing page path (e.g., '/kin', '/racha') */
6
6
  pagePath: string;
7
- /** Nombre legible de la landing (ej: 'Kin Landing Page') */
7
+ /** Human-readable landing page name (e.g., 'Kin Landing Page') */
8
8
  pageName: string;
9
- /** ID de Google Tag Manager (opcional) */
9
+ /** Google Tag Manager container ID (optional) */
10
10
  gtmId?: string;
11
- /** Habilitar tracking de scroll (milestones 25/50/75/100%). Default: true */
11
+ /** Enable scroll tracking (milestones 25/50/75/100%). Default: true */
12
12
  enableScrollTracking?: boolean;
13
- /** Habilitar tracking automático de clicks en CTAs. Default: true */
13
+ /** Enable automatic CTA click tracking. Default: true */
14
14
  enableCTATracking?: boolean;
15
- /** Habilitar tracking de tiempo en página. Default: true */
15
+ /** Enable page dwell time tracking. Default: true */
16
16
  enableTimeTracking?: boolean;
17
- /** Habilitar tracking de tiempo por sección (IntersectionObserver). Default: true */
17
+ /** Enable per-section dwell time via IntersectionObserver. Default: true */
18
18
  enableSectionTracking?: boolean;
19
- /** Habilitar auto-tracking de formularios. Default: true */
19
+ /** Enable automatic form interaction tracking. Default: true */
20
20
  enableFormTracking?: boolean;
21
- /** Habilitar heatmap de clicks (coordenadas X/Y). Default: false */
21
+ /** Enable click heatmap (X/Y coordinates). Default: false */
22
22
  enableHeatmap?: boolean;
23
- /** Sufijo personalizado para eventos (ej: '_kin' para 'cta_click_kin'). Default: '' */
23
+ /** Custom event suffix (e.g., '_kin' produces 'cta_click_kin'). Default: '' */
24
24
  eventSuffix?: string;
25
25
  }
26
26
  /**
27
- * Estadísticas de reproducción de un video.
28
- * Compartido entre todos los adaptadores (Wistia, Voomly, HTML5).
27
+ * Video playback statistics.
28
+ * Shared across all adapters (Wistia, Voomly, HTML5).
29
29
  */
30
30
  interface VideoStats {
31
- /** Tiempo total reproducido en segundos */
31
+ /** Total time watched in seconds */
32
32
  timeWatched: number;
33
- /** Si el video fue completado (90-95%) */
33
+ /** Whether the video was completed (>=90-95%) */
34
34
  completed: boolean;
35
- /** Timestamp de la última actualización */
35
+ /** Timestamp of the last stats update */
36
36
  lastUpdate: number;
37
37
  }
38
38
  /**
39
- * Opciones para los hooks de video en React.
39
+ * Options for React video tracking hooks.
40
40
  */
41
41
  interface UseVideoTrackingOptions {
42
- /** ID único del video */
42
+ /** Unique video identifier */
43
43
  videoId: string;
44
- /** Referencia al elemento <video> HTML (solo para HTML5) */
44
+ /** Reference to the HTML <video> element (HTML5 only) */
45
45
  videoElement?: HTMLVideoElement | null;
46
- /** Callback cuando el video se completa */
46
+ /** Callback when the video completes */
47
47
  onComplete?: () => void;
48
- /** Callback en milestones de progreso (25, 50, 75) */
48
+ /** Callback on progress milestones (25, 50, 75) */
49
49
  onProgress?: (percentage: number) => void;
50
50
  }
51
51
  declare global {
@@ -60,9 +60,9 @@ declare global {
60
60
  }
61
61
 
62
62
  /**
63
- * LandingTracker — Orquestador de sesión completa
64
- * Inicializa y gestiona scroll tracking, click heatmap, section dwell time,
65
- * form auto-tracking y sesión start/end.
63
+ * LandingTracker — Full session orchestrator.
64
+ * Initializes and manages scroll tracking, click heatmap, section dwell time,
65
+ * form auto-tracking, and session start/end.
66
66
  * Framework-agnostic.
67
67
  */
68
68
 
@@ -76,30 +76,30 @@ declare class LandingTracker {
76
76
  private observers;
77
77
  private listeners;
78
78
  /**
79
- * Inicializa el tracking de la landing con la configuración dada.
79
+ * Initializes landing page tracking with the given configuration.
80
80
  */
81
81
  init(config: LandingTrackerConfig): void;
82
82
  /**
83
- * Destruye el tracker y limpia todos los observers y listeners.
83
+ * Destroys the tracker and cleans up all observers and listeners.
84
84
  */
85
85
  destroy(): void;
86
- /** Trackear click en un CTA */
86
+ /** Track a CTA click */
87
87
  trackCTAClick(buttonName: string, section: string, additionalData?: Record<string, unknown>): void;
88
- /** Trackear conversión */
88
+ /** Track a conversion */
89
89
  trackConversion(type: string, value?: number, additionalData?: Record<string, unknown>): void;
90
- /** Trackear click en FAQs */
90
+ /** Track FAQ expansion */
91
91
  trackFAQExpand(question: string, index: number): void;
92
- /** Trackear click social */
92
+ /** Track social link click */
93
93
  trackSocialClick(platform: string, action: string): void;
94
- /** Trackear click en imagen */
94
+ /** Track image click */
95
95
  trackImageClick(imageName: string, section: string): void;
96
- /** Trackear scroll a sección */
96
+ /** Track scroll to a section */
97
97
  trackScrollTo(section: string): void;
98
- /** Trackear share */
98
+ /** Track content share */
99
99
  trackShare(platform: string, content: string): void;
100
- /** Trackear descarga */
100
+ /** Track file download */
101
101
  trackDownload(fileName: string, fileType: string): void;
102
- /** Obtener datos de la sesión actual */
102
+ /** Get current session data */
103
103
  getSessionData(): {
104
104
  duration: number;
105
105
  clicks: number;
@@ -120,13 +120,13 @@ declare class LandingTracker {
120
120
 
121
121
  /**
122
122
  * React Hook: useLandingPageTracking
123
- * Inicializa el tracking completo de una landing page.
124
- * Wrapper React del LandingTracker framework-agnostic.
123
+ * Initializes full landing page tracking.
124
+ * React wrapper for the framework-agnostic LandingTracker.
125
125
  */
126
126
 
127
127
  /**
128
- * Hook para inicializar tracking completo de una landing page.
129
- * Crea un LandingTracker, lo inicializa y lo destruye al desmontar.
128
+ * Hook to initialize full landing page tracking.
129
+ * Creates a LandingTracker, initializes it, and destroys it on unmount.
130
130
  *
131
131
  * @example
132
132
  * ```tsx
@@ -137,8 +137,8 @@ declare class LandingTracker {
137
137
  * gtmId: 'GTM-5GMQNFMN',
138
138
  * })
139
139
  *
140
- * // Usar tracker para eventos manuales
141
- * const handleClick = () => tracker?.trackCTAClick('Unirse', 'hero')
140
+ * // Use tracker for manual events
141
+ * const handleClick = () => tracker?.trackCTAClick('Join', 'hero')
142
142
  * }
143
143
  * ```
144
144
  */
@@ -146,21 +146,21 @@ declare function useLandingPageTracking(config: LandingTrackerConfig): LandingTr
146
146
 
147
147
  /**
148
148
  * React Hooks: useVideoTracking, useWistiaVideoTracking
149
- * Hooks para integrar tracking de video en componentes React.
149
+ * Hooks for integrating video tracking in React components.
150
150
  */
151
151
 
152
152
  interface VideoTrackingReturn {
153
- /** Porcentaje de progreso (0-100) */
153
+ /** Progress percentage (0-100) */
154
154
  progress: number;
155
- /** Si el video se está reproduciendo */
155
+ /** Whether the video is currently playing */
156
156
  isPlaying: boolean;
157
- /** Tiempo actual en segundos */
157
+ /** Current playback time in seconds */
158
158
  currentTime: number;
159
- /** Duración total en segundos */
159
+ /** Total duration in seconds */
160
160
  duration: number;
161
161
  }
162
162
  /**
163
- * Hook para tracking de un elemento <video> HTML5 nativo.
163
+ * Hook for tracking a native HTML5 <video> element.
164
164
  *
165
165
  * @example
166
166
  * ```tsx
@@ -169,8 +169,8 @@ interface VideoTrackingReturn {
169
169
  * const { progress, isPlaying } = useVideoTracking({
170
170
  * videoId: 'hero-video',
171
171
  * videoElement: videoRef.current,
172
- * onComplete: () => console.log('Video completado'),
173
- * onProgress: (pct) => console.log(`Progreso: ${pct}%`),
172
+ * onComplete: () => console.log('Video completed'),
173
+ * onProgress: (pct) => console.log(`Progress: ${pct}%`),
174
174
  * })
175
175
  *
176
176
  * return <video ref={videoRef} src="/video.mp4" />
@@ -179,20 +179,20 @@ interface VideoTrackingReturn {
179
179
  */
180
180
  declare function useVideoTracking({ videoId, videoElement, onComplete, onProgress }: UseVideoTrackingOptions): VideoTrackingReturn;
181
181
  interface WistiaTrackingReturn {
182
- /** Estadísticas actuales del video */
182
+ /** Current video stats */
183
183
  stats: VideoStats;
184
- /** Si el video fue completado */
184
+ /** Whether the video was completed */
185
185
  isCompleted: boolean;
186
186
  }
187
187
  /**
188
- * Hook para tracking de un video Wistia.
189
- * Sondea window._wq hasta que el SDK de Wistia esté listo.
188
+ * Hook for tracking a Wistia video.
189
+ * Polls window._wq until the Wistia SDK is ready.
190
190
  *
191
191
  * @example
192
192
  * ```tsx
193
193
  * function WistiaPlayer({ mediaId }: { mediaId: string }) {
194
194
  * const { stats, isCompleted } = useWistiaVideoTracking(mediaId)
195
- * return <div>Visto: {stats.timeWatched}s {isCompleted && '✅'}</div>
195
+ * return <div>Watched: {stats.timeWatched}s {isCompleted && '✅'}</div>
196
196
  * }
197
197
  * ```
198
198
  */
@@ -221,7 +221,7 @@ var LandingTracker = class {
221
221
  this.listeners = [];
222
222
  }
223
223
  /**
224
- * Inicializa el tracking de la landing con la configuración dada.
224
+ * Initializes landing page tracking with the given configuration.
225
225
  */
226
226
  init(config) {
227
227
  if (typeof window === "undefined") return;
@@ -257,7 +257,7 @@ var LandingTracker = class {
257
257
  this.trackSessionStart();
258
258
  }
259
259
  /**
260
- * Destruye el tracker y limpia todos los observers y listeners.
260
+ * Destroys the tracker and cleans up all observers and listeners.
261
261
  */
262
262
  destroy() {
263
263
  this.observers.forEach((obs) => obs.disconnect());
@@ -273,43 +273,43 @@ var LandingTracker = class {
273
273
  this.sectionTimers.clear();
274
274
  }
275
275
  // ====================================
276
- // MÉTODOS PÚBLICOS DE TRACKING
276
+ // PUBLIC TRACKING METHODS
277
277
  // ====================================
278
- /** Trackear click en un CTA */
278
+ /** Track a CTA click */
279
279
  trackCTAClick(buttonName, section, additionalData) {
280
280
  trackCTAClick(buttonName, section, additionalData);
281
281
  this.pushGTMEvent("cta_click", { button_text: buttonName, section });
282
282
  }
283
- /** Trackear conversión */
283
+ /** Track a conversion */
284
284
  trackConversion(type, value, additionalData) {
285
285
  trackEvent("Conversion", type, void 0, value, additionalData);
286
286
  this.pushGTMEvent("conversion", { conversion_type: type, value });
287
287
  }
288
- /** Trackear click en FAQs */
288
+ /** Track FAQ expansion */
289
289
  trackFAQExpand(question, index) {
290
290
  trackEvent("FAQ", "expand", question, index);
291
291
  }
292
- /** Trackear click social */
292
+ /** Track social link click */
293
293
  trackSocialClick(platform, action) {
294
294
  trackEvent("Social", "click", platform, void 0, { social_action: action });
295
295
  }
296
- /** Trackear click en imagen */
296
+ /** Track image click */
297
297
  trackImageClick(imageName, section) {
298
298
  trackEvent("Engagement", "image_click", imageName, void 0, { section });
299
299
  }
300
- /** Trackear scroll a sección */
300
+ /** Track scroll to a section */
301
301
  trackScrollTo(section) {
302
302
  trackEvent("Navigation", "scroll_to", section);
303
303
  }
304
- /** Trackear share */
304
+ /** Track content share */
305
305
  trackShare(platform, content) {
306
306
  trackEvent("Share", "click", platform, void 0, { share_content: content });
307
307
  }
308
- /** Trackear descarga */
308
+ /** Track file download */
309
309
  trackDownload(fileName, fileType) {
310
310
  trackEvent("Download", "click", fileName, void 0, { file_type: fileType });
311
311
  }
312
- /** Obtener datos de la sesión actual */
312
+ /** Get current session data */
313
313
  getSessionData() {
314
314
  return {
315
315
  duration: Math.round((Date.now() - this.sessionStartTime) / 1e3),
@@ -318,7 +318,7 @@ var LandingTracker = class {
318
318
  };
319
319
  }
320
320
  // ====================================
321
- // MÉTODOS PRIVADOS
321
+ // PRIVATE METHODS
322
322
  // ====================================
323
323
  captureInitialData() {
324
324
  const utmParams = captureUTMParams();
@@ -516,7 +516,7 @@ var VideoTracker = class {
516
516
  this.watchTimeIntervals = /* @__PURE__ */ new Map();
517
517
  }
518
518
  /**
519
- * Inicializa el tracking para un video.
519
+ * Initializes tracking for a video.
520
520
  */
521
521
  initVideo(videoId) {
522
522
  if (this.videos.has(videoId)) return;
@@ -544,7 +544,7 @@ var VideoTracker = class {
544
544
  });
545
545
  }
546
546
  /**
547
- * Tracking de evento play.
547
+ * Tracks a play event.
548
548
  */
549
549
  trackPlay(videoId, currentTime = 0) {
550
550
  const state = this.getOrCreateState(videoId);
@@ -560,7 +560,7 @@ var VideoTracker = class {
560
560
  });
561
561
  }
562
562
  /**
563
- * Tracking de evento pause.
563
+ * Tracks a pause event.
564
564
  */
565
565
  trackPause(videoId, currentTime, duration) {
566
566
  const state = this.getOrCreateState(videoId);
@@ -582,7 +582,7 @@ var VideoTracker = class {
582
582
  });
583
583
  }
584
584
  /**
585
- * Tracking de evento seek (saltar en el timeline).
585
+ * Tracks a seek event (timeline jump).
586
586
  */
587
587
  trackSeek(videoId, fromTime, toTime) {
588
588
  const state = this.getOrCreateState(videoId);
@@ -597,7 +597,7 @@ var VideoTracker = class {
597
597
  });
598
598
  }
599
599
  /**
600
- * Tracking de progreso (milestones: 25%, 50%, 75%).
600
+ * Tracks progress milestones (25%, 50%, 75%).
601
601
  */
602
602
  trackProgress(videoId, percentage, currentTime) {
603
603
  const state = this.getOrCreateState(videoId);
@@ -613,7 +613,7 @@ var VideoTracker = class {
613
613
  }
614
614
  }
615
615
  /**
616
- * Tracking de completación del video (95%).
616
+ * Tracks video completion (>=95%).
617
617
  */
618
618
  trackComplete(videoId, totalDuration) {
619
619
  const state = this.getOrCreateState(videoId);
@@ -630,7 +630,7 @@ var VideoTracker = class {
630
630
  });
631
631
  }
632
632
  /**
633
- * Tracking de fin del video (evento ended nativo).
633
+ * Tracks video end (native ended event).
634
634
  */
635
635
  trackEnd(videoId) {
636
636
  const state = this.getOrCreateState(videoId);
@@ -643,7 +643,7 @@ var VideoTracker = class {
643
643
  });
644
644
  }
645
645
  /**
646
- * Tracking de cambio de velocidad de reproducción.
646
+ * Tracks playback speed change.
647
647
  */
648
648
  trackSpeedChange(videoId, speed) {
649
649
  const state = this.getOrCreateState(videoId);
@@ -654,7 +654,7 @@ var VideoTracker = class {
654
654
  });
655
655
  }
656
656
  /**
657
- * Tracking de pantalla completa.
657
+ * Tracks fullscreen toggle.
658
658
  */
659
659
  trackFullscreen(videoId, isFullscreen) {
660
660
  trackEvent("Video", isFullscreen ? "fullscreen_enter" : "fullscreen_exit", videoId, void 0, {
@@ -663,7 +663,7 @@ var VideoTracker = class {
663
663
  });
664
664
  }
665
665
  /**
666
- * Tracking de no interacción (el usuario está en la página pero no interactúa con el video).
666
+ * Tracks no interaction (user is on the page but not interacting with the video).
667
667
  */
668
668
  trackNoInteraction(videoId, timeOnPage) {
669
669
  trackEvent("Video", "no_interaction", videoId, void 0, {
@@ -672,20 +672,20 @@ var VideoTracker = class {
672
672
  });
673
673
  }
674
674
  /**
675
- * Obtiene el estado actual de un video.
675
+ * Returns the current state of a video.
676
676
  */
677
677
  getState(videoId) {
678
678
  return this.videos.get(videoId);
679
679
  }
680
680
  /**
681
- * Limpia el tracking de un video específico.
681
+ * Cleans up tracking for a specific video.
682
682
  */
683
683
  cleanup(videoId) {
684
684
  this.stopWatchTimeTracking(videoId);
685
685
  this.videos.delete(videoId);
686
686
  }
687
687
  /**
688
- * Limpia todo el tracking.
688
+ * Cleans up all video tracking.
689
689
  */
690
690
  cleanupAll() {
691
691
  for (const videoId of this.videos.keys()) {
@@ -693,7 +693,7 @@ var VideoTracker = class {
693
693
  }
694
694
  this.videos.clear();
695
695
  }
696
- // --- Métodos privados ---
696
+ // --- Private methods ---
697
697
  getOrCreateState(videoId) {
698
698
  if (!this.videos.has(videoId)) {
699
699
  this.initVideo(videoId);