@repobit/dex-data-layer 1.4.0 → 1.5.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/CHANGELOG.md +17 -0
- package/README.md +39 -2
- package/dist/src/adobe-data-layer-service/index.d.ts +6 -3
- package/dist/src/adobe-data-layer-service/index.js +30 -22
- package/dist/src/adobe-data-layer-service/index.js.map +1 -1
- package/dist/src/events/index.d.ts +4 -2
- package/dist/src/events/index.js +3 -1
- package/dist/src/events/index.js.map +1 -1
- package/dist/src/events/page-load-started-event/index.d.ts +0 -8
- package/dist/src/events/page-load-started-event/index.js +3 -24
- package/dist/src/events/page-load-started-event/index.js.map +1 -1
- package/dist/src/events/page-loaded-event/index.d.ts +1 -1
- package/dist/src/events/page-loaded-event/index.js.map +1 -1
- package/dist/src/events/user-detected-event/index.d.ts +1 -0
- package/dist/src/events/user-detected-event/index.js +23 -11
- package/dist/src/events/user-detected-event/index.js.map +1 -1
- package/dist/src/events/utils.d.ts +8 -0
- package/dist/src/events/utils.js +23 -0
- package/dist/src/events/utils.js.map +1 -0
- package/dist/src/events/visitor-id-event/index.d.ts +6 -0
- package/dist/src/events/visitor-id-event/index.js +10 -0
- package/dist/src/events/visitor-id-event/index.js.map +1 -0
- package/dist/src/events/visitor-id-event/typeDefinitions.d.ts +3 -0
- package/dist/src/events/visitor-id-event/typeDefinitions.js +1 -0
- package/dist/src/events/visitor-id-event/typeDefinitions.js.map +1 -0
- package/dist/src/events/window-load-started-event/index.d.ts +3 -2
- package/dist/src/events/window-load-started-event/index.js +6 -1
- package/dist/src/events/window-load-started-event/index.js.map +1 -1
- package/dist/src/events/window-loaded-event/index.d.ts +3 -0
- package/dist/src/events/window-loaded-event/index.js +4 -0
- package/dist/src/events/window-loaded-event/index.js.map +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.5.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-data-layer@1.5.0...@repobit/dex-data-layer@1.5.1) (2025-04-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @repobit/dex-data-layer
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.5.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-data-layer@1.4.0...@repobit/dex-data-layer@1.5.0) (2025-04-10)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **DEX-21820:** added missing events and updated docs ([9d8f064](https://github.com/bitdefender/dex-core/commit/9d8f0642a6f8ca1f1880d17d2c76a90333b7294d))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
## [1.4.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-data-layer@1.3.2...@repobit/dex-data-layer@1.4.0) (2025-04-08)
|
|
7
24
|
|
|
8
25
|
|
package/README.md
CHANGED
|
@@ -107,12 +107,16 @@ Returns an instance of `PageLoadStartedEvent` with:
|
|
|
107
107
|
- `event`: Constant string `page load started`.
|
|
108
108
|
- `pageInstanceID`: A value derived from the page’s environment (e.g., 'dev', 'stage', or 'prod').
|
|
109
109
|
- `page`: A complex object that contains detailed page information (sections, query parameters, server details, etc.) constructed from the provided Page instance and pageData. This object is easily constructed using the `Page class` from the `@repobit/dex-utils` package.
|
|
110
|
+
### Description:
|
|
111
|
+
Important to note: this event should only appear once in the project. For other cases like modals please use `WindowLoadStartedEvent`.
|
|
110
112
|
|
|
111
113
|
## PageLoadedEvent
|
|
112
114
|
### Constructor: constructor()
|
|
113
115
|
### Return Type:
|
|
114
116
|
Returns an instance of `PageLoadedEvent` with:
|
|
115
117
|
- `event`: Constant string `page loaded`.
|
|
118
|
+
### Description:
|
|
119
|
+
Important to note: this event should only appear once in the project. For other cases like modals please use `WindowLoadedEvent`.
|
|
116
120
|
|
|
117
121
|
## ProductLoadedEvent
|
|
118
122
|
### Constructor: constructor(option: ProductOption | { ID: string }, type: 'all' | 'info' | 'comparison' | string)
|
|
@@ -120,14 +124,46 @@ Returns an instance of `PageLoadedEvent` with:
|
|
|
120
124
|
Returns an instance of `ProductLoadedEvent` with:
|
|
121
125
|
- `event`: Constant string `product loaded`.
|
|
122
126
|
- `product`: An object where keys are the product type (e.g., all, info) and the values are arrays of product details (either raw product IDs or detailed option information).
|
|
127
|
+
### Description:
|
|
128
|
+
Important to note: all the product loaded events are stored in a class variable untill a `PageLoadedEvent` is pushed. When that happens, a `ProductLoadedEvent` gets pushed before the `PageLoadedEvent`.
|
|
123
129
|
|
|
124
130
|
## UserDetectedEvent
|
|
125
|
-
###
|
|
131
|
+
### Constructors:
|
|
132
|
+
- ### constructor(page: Page, userData: UserDataObject) -> for when the page gets initialised
|
|
133
|
+
- ### constructor() -> for when a modal opens. This will copy the already existing UserDetectedEvent from the data layer
|
|
126
134
|
### Return Type:
|
|
127
135
|
Returns an instance of `UserDetectedEvent` with:
|
|
128
136
|
- `event`: Constant string `user detected`.
|
|
129
137
|
- `user`: An object that includes user detection details (e.g., login status, unique identifiers).
|
|
130
138
|
|
|
139
|
+
## VisitorIdEvent
|
|
140
|
+
### Constructor: constructor(visitorId: string)
|
|
141
|
+
### Return Type:
|
|
142
|
+
Returns an instance of `VisitorIdEvent` with:
|
|
143
|
+
- `event`: Constant string `visitorID ready`.
|
|
144
|
+
- `user`: An object containing the provided `visitorId`.
|
|
145
|
+
|
|
146
|
+
## WindowLoadStartedEvent
|
|
147
|
+
### Constructor: constructor(pageInfo: (info: PageLoadStartedCompletePageObject['info']) => PageLoadStartedCompletePageObject['info'] | PageLoadStartedInfo, pageAttributes?: PageLoadStartedAttributes)
|
|
148
|
+
### Return Type:
|
|
149
|
+
Returns an instance of `WindowLoadStartedEvent` with:
|
|
150
|
+
- `event`: Constant string `page load started`.
|
|
151
|
+
- `pageInstanceID`: A value derived from the page’s environment (e.g., 'dev', 'stage', or 'prod').
|
|
152
|
+
- `page`: A complex object like the one in `PageLoadStartedEvent`. This one, however contains new data, or can construct on top of the `PageLoadStartedEvent`.
|
|
153
|
+
### Description:
|
|
154
|
+
The `WindowLoadStartedEvent` class is designed to update or extend the data from an already existing page load started event. It accesses an existing PageLoadStartedEvent stored in the global `window.adobeDataLayer` by filtering on the event property. Once found, it merges the existing page information with the new data provided via the constructor parameters:
|
|
155
|
+
- If pageInfo is a function, it allows a dynamic transformation on the current page info.
|
|
156
|
+
- If pageInfo is an object, it simply merges with the existing info.
|
|
157
|
+
Likewise, any provided pageAttributes override or extend the current attributes from the existing event.
|
|
158
|
+
|
|
159
|
+
## WindowLoadedEvent
|
|
160
|
+
### Constructor: constructor()
|
|
161
|
+
### Return Type:
|
|
162
|
+
Returns an instance of `WindowLoadedEvent` with:
|
|
163
|
+
- `event`: Constant string `page loaded`.
|
|
164
|
+
### Description:
|
|
165
|
+
This class was designed to be a mirror of the `PageLoadedEvent` for modals.
|
|
166
|
+
|
|
131
167
|
---
|
|
132
168
|
|
|
133
169
|
# Usage Examples
|
|
@@ -169,7 +205,8 @@ The code below is just for example purposes. Product Option is generated by the
|
|
|
169
205
|
```typescript
|
|
170
206
|
const option = new ProductOption({ /* product details */ });
|
|
171
207
|
AdobeDataLayerService.push(new ProductLoadedEvent(option, 'all'));
|
|
172
|
-
|
|
208
|
+
// For products to get loaded there needs to be a page loaded event
|
|
209
|
+
AdobeDataLayerService.push(new PageLoadedEvent());
|
|
173
210
|
const insertedEvent = window.adobeDataLayer[0] as ProductLoadedEvent;
|
|
174
211
|
console.log(insertedEvent.event); // "product loaded"
|
|
175
212
|
```
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { DataLayerEvent } from "../events/index.js";
|
|
2
2
|
export declare class AdobeDataLayerService {
|
|
3
|
-
private static
|
|
3
|
+
private static _dataLayer;
|
|
4
4
|
private static combineMerge;
|
|
5
|
-
static push(event: DataLayerEvent): void;
|
|
6
5
|
/**
|
|
7
6
|
* add the values from the local object to adobeDataLayer
|
|
8
7
|
*/
|
|
9
|
-
static pushEventsToDataLayer
|
|
8
|
+
private static pushEventsToDataLayer;
|
|
9
|
+
static get dataLayer(): {
|
|
10
|
+
[key: string]: DataLayerEvent;
|
|
11
|
+
};
|
|
12
|
+
static push(event: DataLayerEvent): void;
|
|
10
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ProductLoadedEvent } from "../events/index.js";
|
|
1
|
+
import { PageLoadedEvent, ProductLoadedEvent } from "../events/index.js";
|
|
2
2
|
import merge from 'deepmerge';
|
|
3
3
|
export class AdobeDataLayerService {
|
|
4
|
-
static
|
|
4
|
+
static _dataLayer = {};
|
|
5
5
|
static {
|
|
6
6
|
window.adobeDataLayer = window.adobeDataLayer || [];
|
|
7
7
|
}
|
|
@@ -19,13 +19,36 @@ export class AdobeDataLayerService {
|
|
|
19
19
|
}
|
|
20
20
|
return [...mergeResult].map(value => JSON.parse(value));
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* add the values from the local object to adobeDataLayer
|
|
24
|
+
*/
|
|
25
|
+
static pushEventsToDataLayer() {
|
|
26
|
+
const productLoadedObject = this._dataLayer['product loaded'];
|
|
27
|
+
if (productLoadedObject) {
|
|
28
|
+
const productObject = productLoadedObject['product'];
|
|
29
|
+
productObject.all = productObject.all?.filter(product => !productObject.info?.some(mainProduct => JSON.stringify(product) === JSON.stringify(mainProduct)));
|
|
30
|
+
Object.keys(productObject).forEach(key => {
|
|
31
|
+
if (!productObject[key] || !productObject[key].length) {
|
|
32
|
+
delete productObject[key];
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
Object.keys(this._dataLayer).forEach(dataLayerKey => {
|
|
37
|
+
window.adobeDataLayer.push({ ...this._dataLayer[dataLayerKey] });
|
|
38
|
+
delete this._dataLayer[dataLayerKey];
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// getter for funcionality checks
|
|
42
|
+
static get dataLayer() {
|
|
43
|
+
return this._dataLayer;
|
|
44
|
+
}
|
|
22
45
|
static push(event) {
|
|
23
46
|
/**
|
|
24
47
|
* keep adding values to the already existing event
|
|
25
48
|
*/
|
|
26
49
|
if (event instanceof ProductLoadedEvent) {
|
|
27
50
|
/**
|
|
28
|
-
* start constructing an object for the local
|
|
51
|
+
* start constructing an object for the local _dataLayer where the event name is the key
|
|
29
52
|
* Example: {
|
|
30
53
|
* "product loaded": new ProductsLoadedEvent
|
|
31
54
|
* }
|
|
@@ -33,28 +56,13 @@ export class AdobeDataLayerService {
|
|
|
33
56
|
const eventObject = {
|
|
34
57
|
[event.event]: event
|
|
35
58
|
};
|
|
36
|
-
this.
|
|
59
|
+
this._dataLayer = merge(this._dataLayer, eventObject, { arrayMerge: this.combineMerge });
|
|
37
60
|
return;
|
|
38
61
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* add the values from the local object to adobeDataLayer
|
|
43
|
-
*/
|
|
44
|
-
static pushEventsToDataLayer() {
|
|
45
|
-
const productLoadedObject = this.dataLayer['product loaded'];
|
|
46
|
-
if (productLoadedObject) {
|
|
47
|
-
const productObject = productLoadedObject['product'];
|
|
48
|
-
productObject.all = productObject.all.filter(product => !productObject.info?.some(mainProduct => JSON.stringify(product) === JSON.stringify(mainProduct)));
|
|
49
|
-
Object.keys(productObject).forEach(key => {
|
|
50
|
-
if (!productObject[key].length) {
|
|
51
|
-
delete productObject[key];
|
|
52
|
-
}
|
|
53
|
-
});
|
|
62
|
+
else if (event instanceof PageLoadedEvent) {
|
|
63
|
+
this.pushEventsToDataLayer();
|
|
54
64
|
}
|
|
55
|
-
|
|
56
|
-
window.adobeDataLayer.push({ ...this.dataLayer[dataLayerKey] });
|
|
57
|
-
});
|
|
65
|
+
window.adobeDataLayer.push({ ...event });
|
|
58
66
|
}
|
|
59
67
|
}
|
|
60
68
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adobe-data-layer-service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adobe-data-layer-service/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -7,7 +7,9 @@ import { PageLoadStartedEvent } from "./page-load-started-event/index.js";
|
|
|
7
7
|
import { PageLoadedEvent } from "./page-loaded-event/index.js";
|
|
8
8
|
import { ProductLoadedEvent } from "./product-loaded-event/index.js";
|
|
9
9
|
import { UserDetectedEvent } from "./user-detected-event/index.js";
|
|
10
|
+
import { VisitorIdEvent } from "./visitor-id-event/index.js";
|
|
10
11
|
import { WindowLoadStartedEvent } from "./window-load-started-event/index.js";
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
import { WindowLoadedEvent } from "./window-loaded-event/index.js";
|
|
13
|
+
type DataLayerEvent = ProductLoadedEvent | PageLoadStartedEvent | UserDetectedEvent | ButtonClickEvent | FormEvent | OneClickPurchaseEvent | WindowLoadedEvent | PageErrorEvent | PageLoadedEvent | CdpEvent | WindowLoadStartedEvent | VisitorIdEvent;
|
|
14
|
+
export { ButtonClickEvent, CdpEvent, FormEvent, OneClickPurchaseEvent, PageErrorEvent, PageLoadedEvent, PageLoadStartedEvent, ProductLoadedEvent, UserDetectedEvent, VisitorIdEvent, WindowLoadedEvent, WindowLoadStartedEvent };
|
|
13
15
|
export type { DataLayerEvent };
|
package/dist/src/events/index.js
CHANGED
|
@@ -7,6 +7,8 @@ import { PageLoadStartedEvent } from "./page-load-started-event/index.js";
|
|
|
7
7
|
import { PageLoadedEvent } from "./page-loaded-event/index.js";
|
|
8
8
|
import { ProductLoadedEvent } from "./product-loaded-event/index.js";
|
|
9
9
|
import { UserDetectedEvent } from "./user-detected-event/index.js";
|
|
10
|
+
import { VisitorIdEvent } from "./visitor-id-event/index.js";
|
|
10
11
|
import { WindowLoadStartedEvent } from "./window-load-started-event/index.js";
|
|
11
|
-
|
|
12
|
+
import { WindowLoadedEvent } from "./window-loaded-event/index.js";
|
|
13
|
+
export { ButtonClickEvent, CdpEvent, FormEvent, OneClickPurchaseEvent, PageErrorEvent, PageLoadedEvent, PageLoadStartedEvent, ProductLoadedEvent, UserDetectedEvent, VisitorIdEvent, WindowLoadedEvent, WindowLoadStartedEvent };
|
|
12
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/events/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/events/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAM1D,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,qBAAqB,EAAE,cAAc,EAAE,eAAe,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -5,12 +5,4 @@ export declare class PageLoadStartedEvent {
|
|
|
5
5
|
pageInstanceID: 'dev' | 'stage' | 'prod';
|
|
6
6
|
page: PageLoadStartedCompletePageObject;
|
|
7
7
|
constructor(page: Page, pageInfo: PageLoadStartedInfo, pageAttributes?: PageLoadStartedAttributes);
|
|
8
|
-
/**
|
|
9
|
-
* Returns the current user time in the format HH:MM|HH:00-HH:59|dayOfWeek|timezone
|
|
10
|
-
*/
|
|
11
|
-
private getCurrentTime;
|
|
12
|
-
/**
|
|
13
|
-
* Returns the current GMT date in the format DD/MM/YYYY
|
|
14
|
-
*/
|
|
15
|
-
private getCurrentDate;
|
|
16
8
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UserAgent } from "@repobit/dex-utils";
|
|
2
|
+
import { getCurrentDate, getCurrentTime } from '../utils.js';
|
|
2
3
|
export class PageLoadStartedEvent {
|
|
3
4
|
event = 'page load started';
|
|
4
5
|
pageInstanceID;
|
|
@@ -26,35 +27,13 @@ export class PageLoadStartedEvent {
|
|
|
26
27
|
promotionID: page.getParamValue('pid') || '',
|
|
27
28
|
internalPromotionID: page.getParamValue('icid') || '',
|
|
28
29
|
trackingID: page.getParamValue('cid') || '',
|
|
29
|
-
time:
|
|
30
|
-
date:
|
|
30
|
+
time: getCurrentTime(),
|
|
31
|
+
date: getCurrentDate(),
|
|
31
32
|
domain: topLevelDomain,
|
|
32
33
|
domainPeriod: window.location.hostname.split('.').length - 1,
|
|
33
34
|
...pageAttributes
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Returns the current user time in the format HH:MM|HH:00-HH:59|dayOfWeek|timezone
|
|
39
|
-
*/
|
|
40
|
-
getCurrentTime() {
|
|
41
|
-
const date = new Date();
|
|
42
|
-
const hours = date.getHours();
|
|
43
|
-
const minutes = date.getMinutes();
|
|
44
|
-
const dayOfWeek = date.getDay();
|
|
45
|
-
const timezone = date.toTimeString().split(' ')[1];
|
|
46
|
-
const weekday = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
47
|
-
return `${hours}:${minutes}|${hours}:00-${hours}:59|${weekday[dayOfWeek]}|${timezone}`;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Returns the current GMT date in the format DD/MM/YYYY
|
|
51
|
-
*/
|
|
52
|
-
getCurrentDate() {
|
|
53
|
-
const date = new Date();
|
|
54
|
-
const day = date.getDate();
|
|
55
|
-
const month = date.getMonth() + 1;
|
|
56
|
-
const year = date.getFullYear();
|
|
57
|
-
return `${day}/${month}/${year}`;
|
|
58
|
-
}
|
|
59
38
|
}
|
|
60
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/page-load-started-event/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/page-load-started-event/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1D,MAAM,OAAO,oBAAoB;IACxB,KAAK,GAAY,mBAA4B,CAAC;IAC9C,cAAc,CAA2B;IACzC,IAAI,CAA8C;IAEzD,YAAY,IAAU,EAAE,QAA6B,EAAE,iBAA4C,EAAE;QACnG,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC;QAEvC,MAAM,CAAC,OAAO,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,aAAa,GAAG,EAAE,EAAE,gBAAgB,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5G,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;aACpE,IAAI,CAAC,GAAG,CAAC,CAAC;QAEb,IAAI,CAAC,IAAI,GAAG;YACV,IAAI,EAAE;gBACJ,GAAG,QAAQ;gBACX,OAAO;gBACP,UAAU;gBACV,aAAa;gBACb,gBAAgB;gBAChB,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;gBACpC,WAAW,EAAK,MAAM,CAAC,QAAQ,CAAC,MAAM;gBACtC,YAAY,EAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,IAAI,QAAQ,CAAC,QAAQ;gBACpG,UAAU,EAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ;gBACxC,MAAM,EAAU,SAAS,CAAC,EAAE,IAAI,EAAE;gBAClC,QAAQ,EAAQ,IAAI,CAAC,MAAM;aAC5B;YACD,UAAU,EAAE;gBACV,WAAW,EAAU,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE;gBACpD,mBAAmB,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE;gBACrD,UAAU,EAAW,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE;gBACpD,IAAI,EAAiB,cAAc,EAAE;gBACrC,IAAI,EAAiB,cAAc,EAAE;gBACrC,MAAM,EAAe,cAAc;gBACnC,YAAY,EAAS,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC;gBACnE,GAAG,cAAc;aAClB;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/page-loaded-event/index.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,eAAe;IAC1B,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/page-loaded-event/index.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,eAAe;IAC1B,KAAK,GAAG,aAAsB,CAAC;CAChC"}
|
|
@@ -2,18 +2,30 @@ export class UserDetectedEvent {
|
|
|
2
2
|
event = 'user detected';
|
|
3
3
|
user;
|
|
4
4
|
constructor(page, userData) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
if (page && userData) {
|
|
6
|
+
const emarsysID = page.getParamValue('ems-uid') || page.getParamValue('sc_uid') || undefined;
|
|
7
|
+
this.user = {
|
|
8
|
+
loggedIN: userData.ID ? true : false
|
|
9
|
+
};
|
|
10
|
+
if (userData.ID) {
|
|
11
|
+
this.user.ID = userData.ID;
|
|
12
|
+
}
|
|
13
|
+
if (emarsysID) {
|
|
14
|
+
this.user.emarsysID = emarsysID;
|
|
15
|
+
}
|
|
16
|
+
if (userData.productFinding) {
|
|
17
|
+
this.user.productFinding = userData.productFinding;
|
|
18
|
+
}
|
|
11
19
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
else {
|
|
21
|
+
// find the existing user detected entry
|
|
22
|
+
const existingUserDetectedEvent = window.adobeDataLayer.find(adobeDataLayerEntry => adobeDataLayerEntry.event === 'user detected');
|
|
23
|
+
if (existingUserDetectedEvent) {
|
|
24
|
+
this.user = { ...existingUserDetectedEvent.user };
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
this.user = { loggedIN: false };
|
|
28
|
+
}
|
|
17
29
|
}
|
|
18
30
|
}
|
|
19
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/user-detected-event/index.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,iBAAiB;IAC5B,KAAK,GAAG,eAAwB,CAAC;IACjC,IAAI,CAA6B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/user-detected-event/index.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,iBAAiB;IAC5B,KAAK,GAAG,eAAwB,CAAC;IACjC,IAAI,CAA6B;IAIjC,YAAY,IAAW,EAAE,QAAyB;QAChD,IAAI,IAAI,IAAI,QAAQ,EAAE,CAAC;YACrB,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,SAAS,CAAC;YAE7F,IAAI,CAAC,IAAI,GAAG;gBACV,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;aACrC,CAAA;YAED,IAAI,QAAQ,CAAC,EAAE,EAAE,CAAC;gBAChB,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,EAAE,CAAC;YAC7B,CAAC;YAED,IAAI,SAAS,EAAE,CAAC;gBACd,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAClC,CAAC;YAED,IAAI,QAAQ,CAAC,cAAc,EAAE,CAAC;gBAC5B,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;YACrD,CAAC;QACH,CAAC;aAAM,CAAC;YACN,wCAAwC;YACxC,MAAM,yBAAyB,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,CACjF,mBAAmB,CAAC,KAAK,KAAK,eAAe,CACzB,CAAC;YAEvB,IAAI,yBAAyB,EAAE,CAAC;gBAC9B,IAAI,CAAC,IAAI,GAAG,EAAE,GAAG,yBAAyB,CAAC,IAAI,EAAE,CAAC;YACpD,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,IAAI,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;YACjC,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the current user time in the format HH:MM|HH:00-HH:59|dayOfWeek|timezone
|
|
3
|
+
*/
|
|
4
|
+
export declare function getCurrentTime(): string;
|
|
5
|
+
/**
|
|
6
|
+
* Returns the current GMT date in the format DD/MM/YYYY
|
|
7
|
+
*/
|
|
8
|
+
export declare function getCurrentDate(): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the current user time in the format HH:MM|HH:00-HH:59|dayOfWeek|timezone
|
|
3
|
+
*/
|
|
4
|
+
export function getCurrentTime() {
|
|
5
|
+
const date = new Date();
|
|
6
|
+
const hours = date.getHours();
|
|
7
|
+
const minutes = date.getMinutes();
|
|
8
|
+
const dayOfWeek = date.getDay();
|
|
9
|
+
const timezone = date.toTimeString().split(' ')[1];
|
|
10
|
+
const weekday = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
11
|
+
return `${hours}:${minutes}|${hours}:00-${hours}:59|${weekday[dayOfWeek]}|${timezone}`;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Returns the current GMT date in the format DD/MM/YYYY
|
|
15
|
+
*/
|
|
16
|
+
export function getCurrentDate() {
|
|
17
|
+
const date = new Date();
|
|
18
|
+
const day = date.getDate();
|
|
19
|
+
const month = date.getMonth() + 1;
|
|
20
|
+
const year = date.getFullYear();
|
|
21
|
+
return `${day}/${month}/${year}`;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/events/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;IAClC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC/F,OAAO,GAAG,KAAK,IAAI,OAAO,IAAI,KAAK,OAAO,KAAK,OAAO,OAAO,CAAC,SAAS,CAAC,IAAI,QAAQ,EAAE,CAAC;AACzF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAClC,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAChC,OAAO,GAAG,GAAG,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/visitor-id-event/index.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,cAAc;IACzB,KAAK,GAAG,iBAA0B,CAAC;IACnC,IAAI,CAA2B;IAE/B,YAAY,SAAiB;QAC3B,IAAI,CAAC,IAAI,GAAG;YACV,SAAS;SACV,CAAA;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=typeDefinitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeDefinitions.js","sourceRoot":"","sources":["../../../../src/events/visitor-id-event/typeDefinitions.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { PageLoadStartedAttributes, PageLoadStartedCompletePageObject } from
|
|
2
|
-
import { PageLoadStartedInfo } from
|
|
1
|
+
import { PageLoadStartedAttributes, PageLoadStartedCompletePageObject } from '../page-load-started-event/typeDefinitions.js';
|
|
2
|
+
import { PageLoadStartedInfo } from './typeDefinitions.js';
|
|
3
3
|
export declare class WindowLoadStartedEvent {
|
|
4
4
|
event: "page load started";
|
|
5
|
+
pageInstanceID: 'dev' | 'stage' | 'prod';
|
|
5
6
|
page: PageLoadStartedCompletePageObject;
|
|
6
7
|
constructor(pageInfo: ((info: PageLoadStartedCompletePageObject['info']) => PageLoadStartedCompletePageObject['info']) | PageLoadStartedInfo, pageAttributes?: PageLoadStartedAttributes);
|
|
7
8
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { getCurrentDate, getCurrentTime } from '../utils.js';
|
|
1
2
|
export class WindowLoadStartedEvent {
|
|
2
3
|
event = 'page load started';
|
|
4
|
+
pageInstanceID;
|
|
3
5
|
page;
|
|
4
6
|
constructor(pageInfo, pageAttributes = {}) {
|
|
5
7
|
const existingPageLoadedEvent = window.adobeDataLayer.find(adobeDataLayerEntry => adobeDataLayerEntry.event === 'page load started');
|
|
8
|
+
this.pageInstanceID = existingPageLoadedEvent.pageInstanceID;
|
|
6
9
|
const existingPageLoadedObject = existingPageLoadedEvent.page;
|
|
7
10
|
const info = pageInfo instanceof Function
|
|
8
11
|
? pageInfo({ ...existingPageLoadedObject.info })
|
|
@@ -14,7 +17,9 @@ export class WindowLoadStartedEvent {
|
|
|
14
17
|
info,
|
|
15
18
|
attributes: {
|
|
16
19
|
...existingPageLoadedObject.attributes,
|
|
17
|
-
...pageAttributes
|
|
20
|
+
...pageAttributes,
|
|
21
|
+
time: getCurrentTime(),
|
|
22
|
+
date: getCurrentDate()
|
|
18
23
|
}
|
|
19
24
|
};
|
|
20
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/window-load-started-event/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/window-load-started-event/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1D,MAAM,OAAO,sBAAsB;IAC1B,KAAK,GAAG,mBAA4B,CAAC;IACrC,cAAc,CAA2B;IACzC,IAAI,CAA8C;IAEzD,YAAY,QAAgI,EAAE,iBAA4C,EAAE;QAC1L,MAAM,uBAAuB,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,mBAAmB,CAAC,KAAK,KAAK,mBAAmB,CAAyB,CAAC;QAC7J,IAAI,CAAC,cAAc,GAAG,uBAAuB,CAAC,cAAc,CAAC;QAE7D,MAAM,wBAAwB,GAAG,uBAAuB,CAAC,IAAI,CAAC;QAC9D,MAAM,IAAI,GAAG,QAAQ,YAAY,QAAQ;YACvC,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,wBAAwB,CAAC,IAAI,EAAE,CAAC;YAChD,CAAC,CAAC;gBACA,GAAG,wBAAwB,CAAC,IAAI;gBAChC,GAAI,QAAgC;aACrC,CAAC;QAEJ,IAAI,CAAC,IAAI,GAAG;YACV,IAAI;YACJ,UAAU,EAAE;gBACV,GAAG,wBAAwB,CAAC,UAAU;gBACtC,GAAG,cAAc;gBACjB,IAAI,EAAE,cAAc,EAAE;gBACtB,IAAI,EAAE,cAAc,EAAE;aACvB;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/events/window-loaded-event/index.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,iBAAiB;IAC5B,KAAK,GAAG,aAAsB,CAAC;CAChC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataLayerEvent } from "./events/index.js";
|
|
2
2
|
export { AdobeDataLayerService } from './adobe-data-layer-service/index.js';
|
|
3
|
-
export { ButtonClickEvent, CdpEvent, FormEvent, OneClickPurchaseEvent, PageErrorEvent, PageLoadedEvent, PageLoadStartedEvent, ProductLoadedEvent, UserDetectedEvent, WindowLoadStartedEvent } from './events/index.js';
|
|
3
|
+
export { ButtonClickEvent, CdpEvent, FormEvent, OneClickPurchaseEvent, PageErrorEvent, PageLoadedEvent, PageLoadStartedEvent, ProductLoadedEvent, UserDetectedEvent, VisitorIdEvent, WindowLoadedEvent, WindowLoadStartedEvent } from './events/index.js';
|
|
4
4
|
declare global {
|
|
5
5
|
interface Window {
|
|
6
6
|
adobeDataLayer: DataLayerEvent[];
|
package/dist/src/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { AdobeDataLayerService } from './adobe-data-layer-service/index.js';
|
|
2
|
-
export { ButtonClickEvent, CdpEvent, FormEvent, OneClickPurchaseEvent, PageErrorEvent, PageLoadedEvent, PageLoadStartedEvent, ProductLoadedEvent, UserDetectedEvent, WindowLoadStartedEvent } from './events/index.js';
|
|
2
|
+
export { ButtonClickEvent, CdpEvent, FormEvent, OneClickPurchaseEvent, PageErrorEvent, PageLoadedEvent, PageLoadStartedEvent, ProductLoadedEvent, UserDetectedEvent, VisitorIdEvent, WindowLoadedEvent, WindowLoadStartedEvent } from './events/index.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobit/dex-data-layer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Client for Adobe Data Layer",
|
|
5
5
|
"author": "Constantin Ioan Mihai <iconstantin@bitdefender.com>",
|
|
6
6
|
"homepage": "https://github.com/bitdefender/dex-core#readme",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"volta": {
|
|
38
38
|
"node": "22.14.0"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "862c515280259adf1a7afc80d2872fee3bcf885e"
|
|
41
41
|
}
|