@azzas/azzas-tracker-web 2.0.0-preview.4 → 2.0.0-preview.6
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/mod.cjs +272 -234
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.d.cts +6 -2
- package/dist/mod.d.ts +6 -2
- package/dist/mod.global.js +271 -234
- package/dist/mod.global.js.map +1 -1
- package/dist/mod.js +271 -234
- package/dist/mod.js.map +1 -1
- package/dist/mod.vtex.global.js +315 -263
- package/package.json +1 -1
package/dist/mod.d.cts
CHANGED
|
@@ -1401,6 +1401,10 @@ declare global {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
}
|
|
1403
1403
|
type EventName = keyof typeof EVENTS;
|
|
1404
|
+
type InitialConfig = {
|
|
1405
|
+
brand: string;
|
|
1406
|
+
currency: string;
|
|
1407
|
+
};
|
|
1404
1408
|
type ProductMeta = {
|
|
1405
1409
|
index?: number;
|
|
1406
1410
|
item_list_name?: string | undefined | null;
|
|
@@ -1439,11 +1443,11 @@ interface TrackMeta {
|
|
|
1439
1443
|
creative_name?: string;
|
|
1440
1444
|
creative_slot?: string;
|
|
1441
1445
|
coupon_code?: string;
|
|
1442
|
-
currency?: string;
|
|
1443
1446
|
}
|
|
1444
1447
|
type RequiredMetaKeys<E extends EventName> = Extract<RequiredParamsOf<E>, keyof TrackMeta>;
|
|
1445
1448
|
type MetaForEvent<E extends EventName> = Required<Pick<TrackMeta, RequiredMetaKeys<E>>> & Omit<TrackMeta, RequiredMetaKeys<E>>;
|
|
1446
1449
|
|
|
1450
|
+
declare function initTracker(c: InitialConfig): void;
|
|
1447
1451
|
declare function trackWebEvent<E extends EventName>(event: E, context: AdapterPayload & {
|
|
1448
1452
|
meta: MetaForEvent<E>;
|
|
1449
1453
|
window?: unknown;
|
|
@@ -1629,4 +1633,4 @@ declare const _default: {
|
|
|
1629
1633
|
};
|
|
1630
1634
|
};
|
|
1631
1635
|
|
|
1632
|
-
export { EVENTS, _default as default, trackWebEvent };
|
|
1636
|
+
export { EVENTS, _default as default, initTracker, trackWebEvent };
|
package/dist/mod.d.ts
CHANGED
|
@@ -1401,6 +1401,10 @@ declare global {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
}
|
|
1403
1403
|
type EventName = keyof typeof EVENTS;
|
|
1404
|
+
type InitialConfig = {
|
|
1405
|
+
brand: string;
|
|
1406
|
+
currency: string;
|
|
1407
|
+
};
|
|
1404
1408
|
type ProductMeta = {
|
|
1405
1409
|
index?: number;
|
|
1406
1410
|
item_list_name?: string | undefined | null;
|
|
@@ -1439,11 +1443,11 @@ interface TrackMeta {
|
|
|
1439
1443
|
creative_name?: string;
|
|
1440
1444
|
creative_slot?: string;
|
|
1441
1445
|
coupon_code?: string;
|
|
1442
|
-
currency?: string;
|
|
1443
1446
|
}
|
|
1444
1447
|
type RequiredMetaKeys<E extends EventName> = Extract<RequiredParamsOf<E>, keyof TrackMeta>;
|
|
1445
1448
|
type MetaForEvent<E extends EventName> = Required<Pick<TrackMeta, RequiredMetaKeys<E>>> & Omit<TrackMeta, RequiredMetaKeys<E>>;
|
|
1446
1449
|
|
|
1450
|
+
declare function initTracker(c: InitialConfig): void;
|
|
1447
1451
|
declare function trackWebEvent<E extends EventName>(event: E, context: AdapterPayload & {
|
|
1448
1452
|
meta: MetaForEvent<E>;
|
|
1449
1453
|
window?: unknown;
|
|
@@ -1629,4 +1633,4 @@ declare const _default: {
|
|
|
1629
1633
|
};
|
|
1630
1634
|
};
|
|
1631
1635
|
|
|
1632
|
-
export { EVENTS, _default as default, trackWebEvent };
|
|
1636
|
+
export { EVENTS, _default as default, initTracker, trackWebEvent };
|