@aranova/tracking-react 0.4.1 → 0.5.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/dist/index.d.mts +422 -56
- package/dist/index.d.ts +422 -56
- package/dist/index.js +384 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +384 -45
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -176,7 +176,8 @@ type PageViewMetadata = z.infer<typeof pageViewMetadataSchema>;
|
|
|
176
176
|
declare const pageViewConfigSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
177
177
|
type PageViewConfig = z.infer<typeof pageViewConfigSchema>;
|
|
178
178
|
|
|
179
|
-
declare const
|
|
179
|
+
declare const ctaClickMetadataSchema: z.ZodObject<{
|
|
180
|
+
cta_name: z.ZodString;
|
|
180
181
|
page: z.ZodObject<{
|
|
181
182
|
path: z.ZodString;
|
|
182
183
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -184,35 +185,110 @@ declare const contactPageVisitMetadataSchema: z.ZodObject<{
|
|
|
184
185
|
}, {
|
|
185
186
|
path: string;
|
|
186
187
|
}>;
|
|
188
|
+
section: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
|
+
destination_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
187
190
|
}, "strict", z.ZodTypeAny, {
|
|
188
191
|
page: {
|
|
189
192
|
path: string;
|
|
190
193
|
};
|
|
194
|
+
cta_name: string;
|
|
195
|
+
section?: string | null | undefined;
|
|
196
|
+
destination_url?: string | null | undefined;
|
|
191
197
|
}, {
|
|
192
198
|
page: {
|
|
193
199
|
path: string;
|
|
194
200
|
};
|
|
201
|
+
cta_name: string;
|
|
202
|
+
section?: string | null | undefined;
|
|
203
|
+
destination_url?: string | null | undefined;
|
|
195
204
|
}>;
|
|
196
|
-
type
|
|
197
|
-
declare const
|
|
198
|
-
|
|
205
|
+
type CtaClickMetadata = z.infer<typeof ctaClickMetadataSchema>;
|
|
206
|
+
declare const ctaClickConfigSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
207
|
+
type CtaClickConfig = z.infer<typeof ctaClickConfigSchema>;
|
|
208
|
+
|
|
209
|
+
declare const formStartMetadataSchema: z.ZodObject<{
|
|
210
|
+
form: z.ZodObject<{
|
|
211
|
+
id: z.ZodString;
|
|
212
|
+
action: z.ZodNullable<z.ZodString>;
|
|
213
|
+
}, "strip", z.ZodTypeAny, {
|
|
214
|
+
id: string;
|
|
215
|
+
action: string | null;
|
|
216
|
+
}, {
|
|
217
|
+
id: string;
|
|
218
|
+
action: string | null;
|
|
219
|
+
}>;
|
|
220
|
+
page: z.ZodObject<{
|
|
221
|
+
path: z.ZodString;
|
|
222
|
+
}, "strip", z.ZodTypeAny, {
|
|
223
|
+
path: string;
|
|
224
|
+
}, {
|
|
225
|
+
path: string;
|
|
226
|
+
}>;
|
|
227
|
+
}, "strict", z.ZodTypeAny, {
|
|
228
|
+
form: {
|
|
229
|
+
id: string;
|
|
230
|
+
action: string | null;
|
|
231
|
+
};
|
|
232
|
+
page: {
|
|
233
|
+
path: string;
|
|
234
|
+
};
|
|
235
|
+
}, {
|
|
236
|
+
form: {
|
|
237
|
+
id: string;
|
|
238
|
+
action: string | null;
|
|
239
|
+
};
|
|
240
|
+
page: {
|
|
241
|
+
path: string;
|
|
242
|
+
};
|
|
243
|
+
}>;
|
|
244
|
+
type FormStartMetadata = z.infer<typeof formStartMetadataSchema>;
|
|
245
|
+
declare const formStartConfigSchema: z.ZodObject<{
|
|
246
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
199
247
|
}, "strict", z.ZodTypeAny, {
|
|
200
|
-
|
|
248
|
+
selector?: string | undefined;
|
|
201
249
|
}, {
|
|
202
|
-
|
|
250
|
+
selector?: string | undefined;
|
|
203
251
|
}>;
|
|
204
|
-
type
|
|
252
|
+
type FormStartConfig = z.infer<typeof formStartConfigSchema>;
|
|
205
253
|
|
|
206
254
|
declare const formSubmitMetadataSchema: z.ZodObject<{
|
|
207
255
|
form: z.ZodObject<{
|
|
208
256
|
id: z.ZodString;
|
|
209
257
|
action: z.ZodNullable<z.ZodString>;
|
|
258
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
259
|
+
name: z.ZodString;
|
|
260
|
+
type: z.ZodString;
|
|
261
|
+
label: z.ZodNullable<z.ZodString>;
|
|
262
|
+
has_value: z.ZodBoolean;
|
|
263
|
+
}, "strip", z.ZodTypeAny, {
|
|
264
|
+
label: string | null;
|
|
265
|
+
type: string;
|
|
266
|
+
name: string;
|
|
267
|
+
has_value: boolean;
|
|
268
|
+
}, {
|
|
269
|
+
label: string | null;
|
|
270
|
+
type: string;
|
|
271
|
+
name: string;
|
|
272
|
+
has_value: boolean;
|
|
273
|
+
}>, "many">>;
|
|
210
274
|
}, "strip", z.ZodTypeAny, {
|
|
211
275
|
id: string;
|
|
212
276
|
action: string | null;
|
|
277
|
+
fields?: {
|
|
278
|
+
label: string | null;
|
|
279
|
+
type: string;
|
|
280
|
+
name: string;
|
|
281
|
+
has_value: boolean;
|
|
282
|
+
}[] | undefined;
|
|
213
283
|
}, {
|
|
214
284
|
id: string;
|
|
215
285
|
action: string | null;
|
|
286
|
+
fields?: {
|
|
287
|
+
label: string | null;
|
|
288
|
+
type: string;
|
|
289
|
+
name: string;
|
|
290
|
+
has_value: boolean;
|
|
291
|
+
}[] | undefined;
|
|
216
292
|
}>;
|
|
217
293
|
page: z.ZodObject<{
|
|
218
294
|
path: z.ZodString;
|
|
@@ -225,6 +301,12 @@ declare const formSubmitMetadataSchema: z.ZodObject<{
|
|
|
225
301
|
form: {
|
|
226
302
|
id: string;
|
|
227
303
|
action: string | null;
|
|
304
|
+
fields?: {
|
|
305
|
+
label: string | null;
|
|
306
|
+
type: string;
|
|
307
|
+
name: string;
|
|
308
|
+
has_value: boolean;
|
|
309
|
+
}[] | undefined;
|
|
228
310
|
};
|
|
229
311
|
page: {
|
|
230
312
|
path: string;
|
|
@@ -233,6 +315,12 @@ declare const formSubmitMetadataSchema: z.ZodObject<{
|
|
|
233
315
|
form: {
|
|
234
316
|
id: string;
|
|
235
317
|
action: string | null;
|
|
318
|
+
fields?: {
|
|
319
|
+
label: string | null;
|
|
320
|
+
type: string;
|
|
321
|
+
name: string;
|
|
322
|
+
has_value: boolean;
|
|
323
|
+
}[] | undefined;
|
|
236
324
|
};
|
|
237
325
|
page: {
|
|
238
326
|
path: string;
|
|
@@ -242,20 +330,38 @@ type FormSubmitMetadata = z.infer<typeof formSubmitMetadataSchema>;
|
|
|
242
330
|
declare const formSubmitConfigSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
243
331
|
type FormSubmitConfig = z.infer<typeof formSubmitConfigSchema>;
|
|
244
332
|
|
|
245
|
-
declare const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
href: z.ZodString;
|
|
333
|
+
declare const multiPageSessionMetadataSchema: z.ZodObject<{
|
|
334
|
+
page_count: z.ZodNumber;
|
|
335
|
+
page: z.ZodObject<{
|
|
336
|
+
path: z.ZodString;
|
|
250
337
|
}, "strip", z.ZodTypeAny, {
|
|
251
|
-
|
|
252
|
-
tag: string;
|
|
253
|
-
href: string;
|
|
338
|
+
path: string;
|
|
254
339
|
}, {
|
|
255
|
-
|
|
256
|
-
tag: string;
|
|
257
|
-
href: string;
|
|
340
|
+
path: string;
|
|
258
341
|
}>;
|
|
342
|
+
}, "strict", z.ZodTypeAny, {
|
|
343
|
+
page: {
|
|
344
|
+
path: string;
|
|
345
|
+
};
|
|
346
|
+
page_count: number;
|
|
347
|
+
}, {
|
|
348
|
+
page: {
|
|
349
|
+
path: string;
|
|
350
|
+
};
|
|
351
|
+
page_count: number;
|
|
352
|
+
}>;
|
|
353
|
+
type MultiPageSessionMetadata = z.infer<typeof multiPageSessionMetadataSchema>;
|
|
354
|
+
declare const multiPageSessionConfigSchema: z.ZodObject<{
|
|
355
|
+
pageThreshold: z.ZodNumber;
|
|
356
|
+
}, "strict", z.ZodTypeAny, {
|
|
357
|
+
pageThreshold: number;
|
|
358
|
+
}, {
|
|
359
|
+
pageThreshold: number;
|
|
360
|
+
}>;
|
|
361
|
+
type MultiPageSessionConfig = z.infer<typeof multiPageSessionConfigSchema>;
|
|
362
|
+
|
|
363
|
+
declare const phoneClickMetadataSchema: z.ZodObject<{
|
|
364
|
+
phone_number: z.ZodString;
|
|
259
365
|
page: z.ZodObject<{
|
|
260
366
|
path: z.ZodString;
|
|
261
367
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -263,29 +369,101 @@ declare const phoneClickMetadataSchema: z.ZodObject<{
|
|
|
263
369
|
}, {
|
|
264
370
|
path: string;
|
|
265
371
|
}>;
|
|
372
|
+
section: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
266
373
|
}, "strict", z.ZodTypeAny, {
|
|
267
374
|
page: {
|
|
268
375
|
path: string;
|
|
269
376
|
};
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
tag: string;
|
|
273
|
-
href: string;
|
|
274
|
-
};
|
|
377
|
+
phone_number: string;
|
|
378
|
+
section?: string | null | undefined;
|
|
275
379
|
}, {
|
|
276
380
|
page: {
|
|
277
381
|
path: string;
|
|
278
382
|
};
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
tag: string;
|
|
282
|
-
href: string;
|
|
283
|
-
};
|
|
383
|
+
phone_number: string;
|
|
384
|
+
section?: string | null | undefined;
|
|
284
385
|
}>;
|
|
285
386
|
type PhoneClickMetadata = z.infer<typeof phoneClickMetadataSchema>;
|
|
286
387
|
declare const phoneClickConfigSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
287
388
|
type PhoneClickConfig = z.infer<typeof phoneClickConfigSchema>;
|
|
288
389
|
|
|
390
|
+
declare const scrollDepthMetadataSchema: z.ZodObject<{
|
|
391
|
+
depth_percent: z.ZodNumber;
|
|
392
|
+
page: z.ZodObject<{
|
|
393
|
+
path: z.ZodString;
|
|
394
|
+
}, "strip", z.ZodTypeAny, {
|
|
395
|
+
path: string;
|
|
396
|
+
}, {
|
|
397
|
+
path: string;
|
|
398
|
+
}>;
|
|
399
|
+
}, "strict", z.ZodTypeAny, {
|
|
400
|
+
page: {
|
|
401
|
+
path: string;
|
|
402
|
+
};
|
|
403
|
+
depth_percent: number;
|
|
404
|
+
}, {
|
|
405
|
+
page: {
|
|
406
|
+
path: string;
|
|
407
|
+
};
|
|
408
|
+
depth_percent: number;
|
|
409
|
+
}>;
|
|
410
|
+
type ScrollDepthMetadata = z.infer<typeof scrollDepthMetadataSchema>;
|
|
411
|
+
declare const scrollDepthConfigSchema: z.ZodObject<{
|
|
412
|
+
thresholds: z.ZodArray<z.ZodNumber, "many">;
|
|
413
|
+
}, "strict", z.ZodTypeAny, {
|
|
414
|
+
thresholds: number[];
|
|
415
|
+
}, {
|
|
416
|
+
thresholds: number[];
|
|
417
|
+
}>;
|
|
418
|
+
type ScrollDepthConfig = z.infer<typeof scrollDepthConfigSchema>;
|
|
419
|
+
|
|
420
|
+
declare const SPECIFIC_PAGE_NAMES: readonly ["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"];
|
|
421
|
+
type SpecificPageName = (typeof SPECIFIC_PAGE_NAMES)[number];
|
|
422
|
+
declare const specificPageVisitMetadataSchema: z.ZodObject<{
|
|
423
|
+
page_name: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
|
|
424
|
+
page: z.ZodObject<{
|
|
425
|
+
path: z.ZodString;
|
|
426
|
+
}, "strip", z.ZodTypeAny, {
|
|
427
|
+
path: string;
|
|
428
|
+
}, {
|
|
429
|
+
path: string;
|
|
430
|
+
}>;
|
|
431
|
+
}, "strict", z.ZodTypeAny, {
|
|
432
|
+
page: {
|
|
433
|
+
path: string;
|
|
434
|
+
};
|
|
435
|
+
page_name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
|
|
436
|
+
}, {
|
|
437
|
+
page: {
|
|
438
|
+
path: string;
|
|
439
|
+
};
|
|
440
|
+
page_name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
|
|
441
|
+
}>;
|
|
442
|
+
type SpecificPageVisitMetadata = z.infer<typeof specificPageVisitMetadataSchema>;
|
|
443
|
+
declare const specificPageVisitConfigSchema: z.ZodObject<{
|
|
444
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
445
|
+
name: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
|
|
446
|
+
pathPattern: z.ZodType<RegExp, z.ZodTypeDef, RegExp>;
|
|
447
|
+
}, "strip", z.ZodTypeAny, {
|
|
448
|
+
name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
|
|
449
|
+
pathPattern: RegExp;
|
|
450
|
+
}, {
|
|
451
|
+
name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
|
|
452
|
+
pathPattern: RegExp;
|
|
453
|
+
}>, "many">;
|
|
454
|
+
}, "strict", z.ZodTypeAny, {
|
|
455
|
+
pages: {
|
|
456
|
+
name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
|
|
457
|
+
pathPattern: RegExp;
|
|
458
|
+
}[];
|
|
459
|
+
}, {
|
|
460
|
+
pages: {
|
|
461
|
+
name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
|
|
462
|
+
pathPattern: RegExp;
|
|
463
|
+
}[];
|
|
464
|
+
}>;
|
|
465
|
+
type SpecificPageVisitConfig = z.infer<typeof specificPageVisitConfigSchema>;
|
|
466
|
+
|
|
289
467
|
declare const timeOnSiteMetadataSchema: z.ZodObject<{
|
|
290
468
|
duration_ms: z.ZodNumber;
|
|
291
469
|
page: z.ZodObject<{
|
|
@@ -404,9 +582,10 @@ declare const EVENT_REGISTRY: {
|
|
|
404
582
|
thresholdSeconds: number;
|
|
405
583
|
}>;
|
|
406
584
|
};
|
|
407
|
-
readonly
|
|
585
|
+
readonly specific_page_visit: {
|
|
408
586
|
readonly kind: "automatic";
|
|
409
587
|
readonly metadataSchema: z.ZodObject<{
|
|
588
|
+
page_name: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
|
|
410
589
|
page: z.ZodObject<{
|
|
411
590
|
path: z.ZodString;
|
|
412
591
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -418,17 +597,139 @@ declare const EVENT_REGISTRY: {
|
|
|
418
597
|
page: {
|
|
419
598
|
path: string;
|
|
420
599
|
};
|
|
600
|
+
page_name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
|
|
421
601
|
}, {
|
|
422
602
|
page: {
|
|
423
603
|
path: string;
|
|
424
604
|
};
|
|
605
|
+
page_name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
|
|
425
606
|
}>;
|
|
426
607
|
readonly configSchema: z.ZodObject<{
|
|
427
|
-
|
|
608
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
609
|
+
name: z.ZodEnum<["contact_page", "about_page", "services_page", "booking_page", "location_page", "pricing_page", "faq_page", "testimonials_page"]>;
|
|
610
|
+
pathPattern: z.ZodType<RegExp, z.ZodTypeDef, RegExp>;
|
|
611
|
+
}, "strip", z.ZodTypeAny, {
|
|
612
|
+
name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
|
|
613
|
+
pathPattern: RegExp;
|
|
614
|
+
}, {
|
|
615
|
+
name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
|
|
616
|
+
pathPattern: RegExp;
|
|
617
|
+
}>, "many">;
|
|
428
618
|
}, "strict", z.ZodTypeAny, {
|
|
429
|
-
|
|
619
|
+
pages: {
|
|
620
|
+
name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
|
|
621
|
+
pathPattern: RegExp;
|
|
622
|
+
}[];
|
|
430
623
|
}, {
|
|
431
|
-
|
|
624
|
+
pages: {
|
|
625
|
+
name: "contact_page" | "about_page" | "services_page" | "booking_page" | "location_page" | "pricing_page" | "faq_page" | "testimonials_page";
|
|
626
|
+
pathPattern: RegExp;
|
|
627
|
+
}[];
|
|
628
|
+
}>;
|
|
629
|
+
};
|
|
630
|
+
readonly scroll_depth: {
|
|
631
|
+
readonly kind: "automatic";
|
|
632
|
+
readonly metadataSchema: z.ZodObject<{
|
|
633
|
+
depth_percent: z.ZodNumber;
|
|
634
|
+
page: z.ZodObject<{
|
|
635
|
+
path: z.ZodString;
|
|
636
|
+
}, "strip", z.ZodTypeAny, {
|
|
637
|
+
path: string;
|
|
638
|
+
}, {
|
|
639
|
+
path: string;
|
|
640
|
+
}>;
|
|
641
|
+
}, "strict", z.ZodTypeAny, {
|
|
642
|
+
page: {
|
|
643
|
+
path: string;
|
|
644
|
+
};
|
|
645
|
+
depth_percent: number;
|
|
646
|
+
}, {
|
|
647
|
+
page: {
|
|
648
|
+
path: string;
|
|
649
|
+
};
|
|
650
|
+
depth_percent: number;
|
|
651
|
+
}>;
|
|
652
|
+
readonly configSchema: z.ZodObject<{
|
|
653
|
+
thresholds: z.ZodArray<z.ZodNumber, "many">;
|
|
654
|
+
}, "strict", z.ZodTypeAny, {
|
|
655
|
+
thresholds: number[];
|
|
656
|
+
}, {
|
|
657
|
+
thresholds: number[];
|
|
658
|
+
}>;
|
|
659
|
+
};
|
|
660
|
+
readonly multi_page_session: {
|
|
661
|
+
readonly kind: "automatic";
|
|
662
|
+
readonly metadataSchema: z.ZodObject<{
|
|
663
|
+
page_count: z.ZodNumber;
|
|
664
|
+
page: z.ZodObject<{
|
|
665
|
+
path: z.ZodString;
|
|
666
|
+
}, "strip", z.ZodTypeAny, {
|
|
667
|
+
path: string;
|
|
668
|
+
}, {
|
|
669
|
+
path: string;
|
|
670
|
+
}>;
|
|
671
|
+
}, "strict", z.ZodTypeAny, {
|
|
672
|
+
page: {
|
|
673
|
+
path: string;
|
|
674
|
+
};
|
|
675
|
+
page_count: number;
|
|
676
|
+
}, {
|
|
677
|
+
page: {
|
|
678
|
+
path: string;
|
|
679
|
+
};
|
|
680
|
+
page_count: number;
|
|
681
|
+
}>;
|
|
682
|
+
readonly configSchema: z.ZodObject<{
|
|
683
|
+
pageThreshold: z.ZodNumber;
|
|
684
|
+
}, "strict", z.ZodTypeAny, {
|
|
685
|
+
pageThreshold: number;
|
|
686
|
+
}, {
|
|
687
|
+
pageThreshold: number;
|
|
688
|
+
}>;
|
|
689
|
+
};
|
|
690
|
+
readonly form_start: {
|
|
691
|
+
readonly kind: "automatic";
|
|
692
|
+
readonly metadataSchema: z.ZodObject<{
|
|
693
|
+
form: z.ZodObject<{
|
|
694
|
+
id: z.ZodString;
|
|
695
|
+
action: z.ZodNullable<z.ZodString>;
|
|
696
|
+
}, "strip", z.ZodTypeAny, {
|
|
697
|
+
id: string;
|
|
698
|
+
action: string | null;
|
|
699
|
+
}, {
|
|
700
|
+
id: string;
|
|
701
|
+
action: string | null;
|
|
702
|
+
}>;
|
|
703
|
+
page: z.ZodObject<{
|
|
704
|
+
path: z.ZodString;
|
|
705
|
+
}, "strip", z.ZodTypeAny, {
|
|
706
|
+
path: string;
|
|
707
|
+
}, {
|
|
708
|
+
path: string;
|
|
709
|
+
}>;
|
|
710
|
+
}, "strict", z.ZodTypeAny, {
|
|
711
|
+
form: {
|
|
712
|
+
id: string;
|
|
713
|
+
action: string | null;
|
|
714
|
+
};
|
|
715
|
+
page: {
|
|
716
|
+
path: string;
|
|
717
|
+
};
|
|
718
|
+
}, {
|
|
719
|
+
form: {
|
|
720
|
+
id: string;
|
|
721
|
+
action: string | null;
|
|
722
|
+
};
|
|
723
|
+
page: {
|
|
724
|
+
path: string;
|
|
725
|
+
};
|
|
726
|
+
}>;
|
|
727
|
+
readonly configSchema: z.ZodObject<{
|
|
728
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
729
|
+
}, "strict", z.ZodTypeAny, {
|
|
730
|
+
selector?: string | undefined;
|
|
731
|
+
}, {
|
|
732
|
+
selector?: string | undefined;
|
|
432
733
|
}>;
|
|
433
734
|
};
|
|
434
735
|
readonly form_submit: {
|
|
@@ -437,12 +738,40 @@ declare const EVENT_REGISTRY: {
|
|
|
437
738
|
form: z.ZodObject<{
|
|
438
739
|
id: z.ZodString;
|
|
439
740
|
action: z.ZodNullable<z.ZodString>;
|
|
741
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
742
|
+
name: z.ZodString;
|
|
743
|
+
type: z.ZodString;
|
|
744
|
+
label: z.ZodNullable<z.ZodString>;
|
|
745
|
+
has_value: z.ZodBoolean;
|
|
746
|
+
}, "strip", z.ZodTypeAny, {
|
|
747
|
+
label: string | null;
|
|
748
|
+
type: string;
|
|
749
|
+
name: string;
|
|
750
|
+
has_value: boolean;
|
|
751
|
+
}, {
|
|
752
|
+
label: string | null;
|
|
753
|
+
type: string;
|
|
754
|
+
name: string;
|
|
755
|
+
has_value: boolean;
|
|
756
|
+
}>, "many">>;
|
|
440
757
|
}, "strip", z.ZodTypeAny, {
|
|
441
758
|
id: string;
|
|
442
759
|
action: string | null;
|
|
760
|
+
fields?: {
|
|
761
|
+
label: string | null;
|
|
762
|
+
type: string;
|
|
763
|
+
name: string;
|
|
764
|
+
has_value: boolean;
|
|
765
|
+
}[] | undefined;
|
|
443
766
|
}, {
|
|
444
767
|
id: string;
|
|
445
768
|
action: string | null;
|
|
769
|
+
fields?: {
|
|
770
|
+
label: string | null;
|
|
771
|
+
type: string;
|
|
772
|
+
name: string;
|
|
773
|
+
has_value: boolean;
|
|
774
|
+
}[] | undefined;
|
|
446
775
|
}>;
|
|
447
776
|
page: z.ZodObject<{
|
|
448
777
|
path: z.ZodString;
|
|
@@ -455,6 +784,12 @@ declare const EVENT_REGISTRY: {
|
|
|
455
784
|
form: {
|
|
456
785
|
id: string;
|
|
457
786
|
action: string | null;
|
|
787
|
+
fields?: {
|
|
788
|
+
label: string | null;
|
|
789
|
+
type: string;
|
|
790
|
+
name: string;
|
|
791
|
+
has_value: boolean;
|
|
792
|
+
}[] | undefined;
|
|
458
793
|
};
|
|
459
794
|
page: {
|
|
460
795
|
path: string;
|
|
@@ -463,6 +798,12 @@ declare const EVENT_REGISTRY: {
|
|
|
463
798
|
form: {
|
|
464
799
|
id: string;
|
|
465
800
|
action: string | null;
|
|
801
|
+
fields?: {
|
|
802
|
+
label: string | null;
|
|
803
|
+
type: string;
|
|
804
|
+
name: string;
|
|
805
|
+
has_value: boolean;
|
|
806
|
+
}[] | undefined;
|
|
466
807
|
};
|
|
467
808
|
page: {
|
|
468
809
|
path: string;
|
|
@@ -473,19 +814,34 @@ declare const EVENT_REGISTRY: {
|
|
|
473
814
|
readonly phone_click: {
|
|
474
815
|
readonly kind: "manual";
|
|
475
816
|
readonly metadataSchema: z.ZodObject<{
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
href: z.ZodString;
|
|
817
|
+
phone_number: z.ZodString;
|
|
818
|
+
page: z.ZodObject<{
|
|
819
|
+
path: z.ZodString;
|
|
480
820
|
}, "strip", z.ZodTypeAny, {
|
|
481
|
-
|
|
482
|
-
tag: string;
|
|
483
|
-
href: string;
|
|
821
|
+
path: string;
|
|
484
822
|
}, {
|
|
485
|
-
|
|
486
|
-
tag: string;
|
|
487
|
-
href: string;
|
|
823
|
+
path: string;
|
|
488
824
|
}>;
|
|
825
|
+
section: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
826
|
+
}, "strict", z.ZodTypeAny, {
|
|
827
|
+
page: {
|
|
828
|
+
path: string;
|
|
829
|
+
};
|
|
830
|
+
phone_number: string;
|
|
831
|
+
section?: string | null | undefined;
|
|
832
|
+
}, {
|
|
833
|
+
page: {
|
|
834
|
+
path: string;
|
|
835
|
+
};
|
|
836
|
+
phone_number: string;
|
|
837
|
+
section?: string | null | undefined;
|
|
838
|
+
}>;
|
|
839
|
+
readonly configSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
840
|
+
};
|
|
841
|
+
readonly cta_click: {
|
|
842
|
+
readonly kind: "manual";
|
|
843
|
+
readonly metadataSchema: z.ZodObject<{
|
|
844
|
+
cta_name: z.ZodString;
|
|
489
845
|
page: z.ZodObject<{
|
|
490
846
|
path: z.ZodString;
|
|
491
847
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -493,24 +849,22 @@ declare const EVENT_REGISTRY: {
|
|
|
493
849
|
}, {
|
|
494
850
|
path: string;
|
|
495
851
|
}>;
|
|
852
|
+
section: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
853
|
+
destination_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
496
854
|
}, "strict", z.ZodTypeAny, {
|
|
497
855
|
page: {
|
|
498
856
|
path: string;
|
|
499
857
|
};
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
href: string;
|
|
504
|
-
};
|
|
858
|
+
cta_name: string;
|
|
859
|
+
section?: string | null | undefined;
|
|
860
|
+
destination_url?: string | null | undefined;
|
|
505
861
|
}, {
|
|
506
862
|
page: {
|
|
507
863
|
path: string;
|
|
508
864
|
};
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
href: string;
|
|
513
|
-
};
|
|
865
|
+
cta_name: string;
|
|
866
|
+
section?: string | null | undefined;
|
|
867
|
+
destination_url?: string | null | undefined;
|
|
514
868
|
}>;
|
|
515
869
|
readonly configSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
516
870
|
};
|
|
@@ -525,16 +879,24 @@ type ManualEventName = {
|
|
|
525
879
|
type MetadataByName = {
|
|
526
880
|
page_view: PageViewMetadata;
|
|
527
881
|
time_on_site: TimeOnSiteMetadata;
|
|
528
|
-
|
|
882
|
+
specific_page_visit: SpecificPageVisitMetadata;
|
|
883
|
+
scroll_depth: ScrollDepthMetadata;
|
|
884
|
+
multi_page_session: MultiPageSessionMetadata;
|
|
885
|
+
form_start: FormStartMetadata;
|
|
529
886
|
form_submit: FormSubmitMetadata;
|
|
530
887
|
phone_click: PhoneClickMetadata;
|
|
888
|
+
cta_click: CtaClickMetadata;
|
|
531
889
|
};
|
|
532
890
|
type ConfigByName = {
|
|
533
891
|
page_view: PageViewConfig;
|
|
534
892
|
time_on_site: TimeOnSiteConfig;
|
|
535
|
-
|
|
893
|
+
specific_page_visit: SpecificPageVisitConfig;
|
|
894
|
+
scroll_depth: ScrollDepthConfig;
|
|
895
|
+
multi_page_session: MultiPageSessionConfig;
|
|
896
|
+
form_start: FormStartConfig;
|
|
536
897
|
form_submit: FormSubmitConfig;
|
|
537
898
|
phone_click: PhoneClickConfig;
|
|
899
|
+
cta_click: CtaClickConfig;
|
|
538
900
|
};
|
|
539
901
|
type EventMetadata<K extends EventName> = MetadataByName[K];
|
|
540
902
|
type EventConfig<K extends EventName> = ConfigByName[K];
|
|
@@ -543,11 +905,15 @@ type TriggerRegistryConfig = {
|
|
|
543
905
|
page_view: EventConfig<'page_view'>;
|
|
544
906
|
} & Partial<{
|
|
545
907
|
time_on_site: EventConfig<'time_on_site'>;
|
|
546
|
-
|
|
908
|
+
specific_page_visit: EventConfig<'specific_page_visit'>;
|
|
909
|
+
scroll_depth: EventConfig<'scroll_depth'>;
|
|
910
|
+
multi_page_session: EventConfig<'multi_page_session'>;
|
|
911
|
+
form_start: EventConfig<'form_start'>;
|
|
547
912
|
}>;
|
|
548
913
|
manual?: Partial<{
|
|
549
914
|
form_submit: EventConfig<'form_submit'>;
|
|
550
915
|
phone_click: EventConfig<'phone_click'>;
|
|
916
|
+
cta_click: EventConfig<'cta_click'>;
|
|
551
917
|
}>;
|
|
552
918
|
};
|
|
553
919
|
type RegisteredManualEvents<TRegistry extends TriggerRegistryConfig> = Extract<keyof NonNullable<TRegistry['manual']>, ManualEventName>;
|
|
@@ -604,4 +970,4 @@ interface CreateTrackingResult<TRegistry extends TriggerRegistryConfig> {
|
|
|
604
970
|
}
|
|
605
971
|
declare function createTracking<TRegistry extends TriggerRegistryConfig>(options: CreateTrackingOptions<TRegistry>): CreateTrackingResult<TRegistry>;
|
|
606
972
|
|
|
607
|
-
export { type AutomaticEventName, ConsentBanner, type ConsentState, type
|
|
973
|
+
export { type AutomaticEventName, ConsentBanner, type ConsentState, type CreateTrackingOptions, type CreateTrackingResult, type CtaClickConfig, type CtaClickMetadata, type EventConfig, type EventMetadata, type EventName, type FormStartConfig, type FormStartMetadata, type FormSubmitConfig, type FormSubmitMetadata, GoogleAdsTracking, type GoogleAdsTrackingProps, type ManualEventName, type MultiPageSessionConfig, type MultiPageSessionMetadata, type PageViewConfig, type PageViewMetadata, type PhoneClickConfig, type PhoneClickMetadata, type RegisteredAutomaticEvents, type RegisteredManualEvents, type ScrollDepthConfig, type ScrollDepthMetadata, type SpecificPageName, type SpecificPageVisitConfig, type SpecificPageVisitMetadata, TRACKING_PARAM_KEYS, type TimeOnSiteConfig, type TimeOnSiteMetadata, type TrackingClient, type TrackingClientContext, type TrackingEventCreatePayload, type TrackingInitConfig, type TrackingInstallSurface, type TrackingParams, type TrackingProviderProps, type TrackingSessionUpsertPayload, type TriggerRegistryConfig, type TypedTrackEventOptions, type TypedTrackingClient, captureTrackingParamsFromLocation, createTracking, createTrackingClientContext, createTrackingEventCreatePayload, createTrackingSessionUpsertPayload, getConsentState, setConsentState, useConsentState, useGclid, useTrackingParams };
|