@aranova/tracking-next 0.5.1 → 0.6.1
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 +150 -0
- package/dist/index.d.mts +383 -48
- package/dist/index.d.ts +383 -48
- package/dist/index.js +26 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -16
- package/dist/index.mjs.map +1 -1
- package/dist/middleware.d.mts +7 -0
- package/dist/middleware.d.ts +7 -0
- package/dist/middleware.js +25 -15
- package/dist/middleware.js.map +1 -1
- package/dist/middleware.mjs +25 -15
- package/dist/middleware.mjs.map +1 -1
- package/dist/server.d.mts +8 -1
- package/dist/server.d.ts +8 -1
- package/dist/server.js +25 -15
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +25 -15
- package/dist/server.mjs.map +1 -1
- package/dist/types-B4VZHWnc.d.mts +127 -0
- package/dist/types-B4VZHWnc.d.ts +127 -0
- package/package.json +3 -2
- package/dist/types-Gp0ioRiQ.d.mts +0 -67
- package/dist/types-Gp0ioRiQ.d.ts +0 -67
package/dist/index.js
CHANGED
|
@@ -282,7 +282,7 @@ var pageViewMetadataSchema = import_zod.z.object({
|
|
|
282
282
|
path: import_zod.z.string(),
|
|
283
283
|
search: import_zod.z.string(),
|
|
284
284
|
hash: import_zod.z.string()
|
|
285
|
-
}),
|
|
285
|
+
}).strict(),
|
|
286
286
|
referrer: import_zod.z.string().nullable(),
|
|
287
287
|
// `.nullable().optional()` — absent (undefined) OR explicit null OR a
|
|
288
288
|
// real viewport object. Mirrors Pydantic's `_Viewport | None = None`
|
|
@@ -290,7 +290,7 @@ var pageViewMetadataSchema = import_zod.z.object({
|
|
|
290
290
|
viewport: import_zod.z.object({
|
|
291
291
|
w: import_zod.z.number(),
|
|
292
292
|
h: import_zod.z.number()
|
|
293
|
-
}).nullable().optional()
|
|
293
|
+
}).strict().nullable().optional()
|
|
294
294
|
}).strict();
|
|
295
295
|
var pageViewConfigSchema = import_zod.z.object({}).strict();
|
|
296
296
|
|
|
@@ -633,7 +633,7 @@ var ctaClickMetadataSchema = import_zod2.z.object({
|
|
|
633
633
|
cta_name: import_zod2.z.string(),
|
|
634
634
|
page: import_zod2.z.object({
|
|
635
635
|
path: import_zod2.z.string()
|
|
636
|
-
}),
|
|
636
|
+
}).strict(),
|
|
637
637
|
section: import_zod2.z.string().nullable().optional(),
|
|
638
638
|
destination_url: import_zod2.z.string().nullable().optional()
|
|
639
639
|
}).strict();
|
|
@@ -660,10 +660,10 @@ var formStartMetadataSchema = import_zod4.z.object({
|
|
|
660
660
|
form: import_zod4.z.object({
|
|
661
661
|
id: import_zod4.z.string(),
|
|
662
662
|
action: import_zod4.z.string().nullable()
|
|
663
|
-
}),
|
|
663
|
+
}).strict(),
|
|
664
664
|
page: import_zod4.z.object({
|
|
665
665
|
path: import_zod4.z.string()
|
|
666
|
-
})
|
|
666
|
+
}).strict()
|
|
667
667
|
}).strict();
|
|
668
668
|
var formStartConfigSchema = import_zod4.z.object({
|
|
669
669
|
selector: import_zod4.z.string().optional()
|
|
@@ -671,6 +671,16 @@ var formStartConfigSchema = import_zod4.z.object({
|
|
|
671
671
|
|
|
672
672
|
// ../tracking-core/src/events/form-submit.ts
|
|
673
673
|
var import_zod5 = require("zod");
|
|
674
|
+
var jsonValueSchema = import_zod5.z.lazy(
|
|
675
|
+
() => import_zod5.z.union([
|
|
676
|
+
import_zod5.z.string(),
|
|
677
|
+
import_zod5.z.number().finite(),
|
|
678
|
+
import_zod5.z.boolean(),
|
|
679
|
+
import_zod5.z.null(),
|
|
680
|
+
import_zod5.z.array(jsonValueSchema),
|
|
681
|
+
import_zod5.z.record(jsonValueSchema)
|
|
682
|
+
])
|
|
683
|
+
);
|
|
674
684
|
var formSubmitMetadataSchema = import_zod5.z.object({
|
|
675
685
|
form: import_zod5.z.object({
|
|
676
686
|
id: import_zod5.z.string(),
|
|
@@ -680,13 +690,13 @@ var formSubmitMetadataSchema = import_zod5.z.object({
|
|
|
680
690
|
name: import_zod5.z.string(),
|
|
681
691
|
type: import_zod5.z.string(),
|
|
682
692
|
label: import_zod5.z.string().nullable(),
|
|
683
|
-
|
|
684
|
-
})
|
|
693
|
+
value: jsonValueSchema
|
|
694
|
+
}).strict()
|
|
685
695
|
).optional()
|
|
686
|
-
}),
|
|
696
|
+
}).strict(),
|
|
687
697
|
page: import_zod5.z.object({
|
|
688
698
|
path: import_zod5.z.string()
|
|
689
|
-
})
|
|
699
|
+
}).strict()
|
|
690
700
|
}).strict();
|
|
691
701
|
var formSubmitConfigSchema = import_zod5.z.object({}).strict();
|
|
692
702
|
|
|
@@ -696,7 +706,7 @@ var multiPageSessionMetadataSchema = import_zod6.z.object({
|
|
|
696
706
|
page_count: import_zod6.z.number().int().min(2),
|
|
697
707
|
page: import_zod6.z.object({
|
|
698
708
|
path: import_zod6.z.string()
|
|
699
|
-
})
|
|
709
|
+
}).strict()
|
|
700
710
|
}).strict();
|
|
701
711
|
var multiPageSessionConfigSchema = import_zod6.z.object({
|
|
702
712
|
pageThreshold: import_zod6.z.number().int().min(2)
|
|
@@ -708,7 +718,7 @@ var phoneClickMetadataSchema = import_zod7.z.object({
|
|
|
708
718
|
phone_number: import_zod7.z.string(),
|
|
709
719
|
page: import_zod7.z.object({
|
|
710
720
|
path: import_zod7.z.string()
|
|
711
|
-
}),
|
|
721
|
+
}).strict(),
|
|
712
722
|
section: import_zod7.z.string().nullable().optional()
|
|
713
723
|
}).strict();
|
|
714
724
|
var phoneClickConfigSchema = import_zod7.z.object({}).strict();
|
|
@@ -719,7 +729,7 @@ var scrollDepthMetadataSchema = import_zod8.z.object({
|
|
|
719
729
|
depth_percent: import_zod8.z.number().int().min(1).max(100),
|
|
720
730
|
page: import_zod8.z.object({
|
|
721
731
|
path: import_zod8.z.string()
|
|
722
|
-
})
|
|
732
|
+
}).strict()
|
|
723
733
|
}).strict();
|
|
724
734
|
var scrollDepthConfigSchema = import_zod8.z.object({
|
|
725
735
|
thresholds: import_zod8.z.array(import_zod8.z.number().int().min(1).max(100)).min(1)
|
|
@@ -742,7 +752,7 @@ var specificPageVisitMetadataSchema = import_zod9.z.object({
|
|
|
742
752
|
page_name: specificPageNameSchema,
|
|
743
753
|
page: import_zod9.z.object({
|
|
744
754
|
path: import_zod9.z.string()
|
|
745
|
-
})
|
|
755
|
+
}).strict()
|
|
746
756
|
}).strict();
|
|
747
757
|
var specificPageVisitConfigSchema = import_zod9.z.object({
|
|
748
758
|
pages: import_zod9.z.array(
|
|
@@ -751,7 +761,7 @@ var specificPageVisitConfigSchema = import_zod9.z.object({
|
|
|
751
761
|
pathPattern: import_zod9.z.custom((value) => value instanceof RegExp, {
|
|
752
762
|
message: "pathPattern must be a RegExp"
|
|
753
763
|
})
|
|
754
|
-
})
|
|
764
|
+
}).strict()
|
|
755
765
|
).min(1)
|
|
756
766
|
}).strict();
|
|
757
767
|
|
|
@@ -761,7 +771,7 @@ var timeOnSiteMetadataSchema = import_zod10.z.object({
|
|
|
761
771
|
duration_ms: import_zod10.z.number().int().nonnegative(),
|
|
762
772
|
page: import_zod10.z.object({
|
|
763
773
|
path: import_zod10.z.string()
|
|
764
|
-
})
|
|
774
|
+
}).strict()
|
|
765
775
|
}).strict();
|
|
766
776
|
var timeOnSiteConfigSchema = import_zod10.z.object({
|
|
767
777
|
thresholdSeconds: import_zod10.z.number().int().positive()
|
|
@@ -1148,7 +1158,7 @@ function GoogleAdsTracking({ gtagId }) {
|
|
|
1148
1158
|
var import_navigation = require("next/navigation");
|
|
1149
1159
|
|
|
1150
1160
|
// package.json
|
|
1151
|
-
var version = "0.
|
|
1161
|
+
var version = "0.6.1";
|
|
1152
1162
|
|
|
1153
1163
|
// src/factory.tsx
|
|
1154
1164
|
var import_react3 = require("react");
|