@empathyco/x-components 6.0.0-alpha.45 → 6.0.0-alpha.47
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 +18 -0
- package/design-system/deprecated-full-theme.css +242 -242
- package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice._constructor_.md → x-components.defaultexternaltaggingservice._constructor_.md} +3 -3
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.add_to_cart_id_key.md +13 -0
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.instance.md +13 -0
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.localstorageservice.md +11 -0
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.md +43 -0
- package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.movetosessionstorage.md → x-components.defaultexternaltaggingservice.movetosessionstorage.md} +2 -2
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.result_clicked_id_key.md +13 -0
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.sessionstorageservice.md +11 -0
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storagekey.md +11 -0
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storagettlms.md +11 -0
- package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.store.md → x-components.defaultexternaltaggingservice.store.md} +2 -2
- package/docs/API-reference/api/x-components.defaultexternaltaggingservice.storeaddtocart.md +24 -0
- package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.storeresultclicked.md → x-components.defaultexternaltaggingservice.storeresultclicked.md} +3 -3
- package/docs/API-reference/api/{x-components.defaultpdpaddtocartservice.trackaddtocart.md → x-components.defaultexternaltaggingservice.trackaddtocart.md} +3 -3
- package/docs/API-reference/api/x-components.externaltaggingservice.md +23 -0
- package/docs/API-reference/api/{x-components.pdpaddtocartservice.movetosessionstorage.md → x-components.externaltaggingservice.movetosessionstorage.md} +2 -2
- package/docs/API-reference/api/x-components.externaltaggingservice.storeaddtocart.md +24 -0
- package/docs/API-reference/api/{x-components.pdpaddtocartservice.storeresultclicked.md → x-components.externaltaggingservice.storeresultclicked.md} +3 -3
- package/docs/API-reference/api/{x-components.pdpaddtocartservice.trackaddtocart.md → x-components.externaltaggingservice.trackaddtocart.md} +3 -3
- package/docs/API-reference/api/x-components.md +2 -2
- package/docs/API-reference/api/x-components.tagging.md +6 -6
- package/docs/API-reference/api/x-components.taggingconfig.md +2 -2
- package/docs/API-reference/api/{x-components.taggingconfig.clickedresultstoragekey.md → x-components.taggingconfig.storagekey.md} +3 -3
- package/docs/API-reference/api/x-components.taggingconfig.storagettlms.md +13 -0
- package/docs/API-reference/api/x-components.taggingxevents.md +1 -1
- package/docs/API-reference/api/x-components.taggingxevents.resulturltrackingenabled.md +1 -1
- package/docs/API-reference/components/tagging/x-components.tagging.md +15 -16
- package/js/index.js +1 -1
- package/js/x-modules/tagging/components/tagging.vue.js +8 -7
- package/js/x-modules/tagging/components/tagging.vue.js.map +1 -1
- package/js/x-modules/tagging/service/{pdp-add-to-cart.service.js → external-tagging.service.js} +56 -25
- package/js/x-modules/tagging/service/external-tagging.service.js.map +1 -0
- package/js/x-modules/tagging/store/emitters.js +1 -1
- package/js/x-modules/tagging/store/emitters.js.map +1 -1
- package/js/x-modules/tagging/store/module.js +2 -2
- package/js/x-modules/tagging/store/module.js.map +1 -1
- package/js/x-modules/tagging/wiring.js +14 -7
- package/js/x-modules/tagging/wiring.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue.js.map +1 -1
- package/js/x-modules/url/components/url-handler.vue2.js +2 -1
- package/js/x-modules/url/components/url-handler.vue2.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +768 -639
- package/report/x-components.api.md +45 -41
- package/tagging/index.js +1 -1
- package/types/x-modules/tagging/components/tagging.vue.d.ts +14 -12
- package/types/x-modules/tagging/components/tagging.vue.d.ts.map +1 -1
- package/types/x-modules/tagging/config.types.d.ts +3 -3
- package/types/x-modules/tagging/config.types.d.ts.map +1 -1
- package/types/x-modules/tagging/events.types.d.ts +2 -2
- package/types/x-modules/tagging/service/{pdp-add-to-cart.service.d.ts → external-tagging.service.d.ts} +31 -13
- package/types/x-modules/tagging/service/external-tagging.service.d.ts.map +1 -0
- package/types/x-modules/tagging/service/index.d.ts +1 -1
- package/types/x-modules/tagging/service/index.d.ts.map +1 -1
- package/types/x-modules/tagging/service/types.d.ts +13 -4
- package/types/x-modules/tagging/service/types.d.ts.map +1 -1
- package/types/x-modules/tagging/wiring.d.ts +1 -0
- package/types/x-modules/tagging/wiring.d.ts.map +1 -1
- package/types/x-modules/url/components/url-handler.vue.d.ts.map +1 -1
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.clickedresultstoragekey.md +0 -11
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.clickedresultstoragettlms.md +0 -11
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.instance.md +0 -13
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.localstorageservice.md +0 -11
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.md +0 -41
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.result_clicked_id_key.md +0 -13
- package/docs/API-reference/api/x-components.defaultpdpaddtocartservice.sessionstorageservice.md +0 -11
- package/docs/API-reference/api/x-components.pdpaddtocartservice.md +0 -22
- package/docs/API-reference/api/x-components.taggingconfig.clickedresultstoragettlms.md +0 -13
- package/js/x-modules/tagging/service/pdp-add-to-cart.service.js.map +0 -1
- package/types/x-modules/tagging/service/pdp-add-to-cart.service.d.ts.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [(constructor)](./x-components.defaultexternaltaggingservice._constructor_.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## DefaultExternalTaggingService.(constructor)
|
|
6
6
|
|
|
7
|
-
Constructs a new instance of the `
|
|
7
|
+
Constructs a new instance of the `DefaultExternalTaggingService` class
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
package/docs/API-reference/api/x-components.defaultexternaltaggingservice.add_to_cart_id_key.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [ADD\_TO\_CART\_ID\_KEY](./x-components.defaultexternaltaggingservice.add_to_cart_id_key.md)
|
|
4
|
+
|
|
5
|
+
## DefaultExternalTaggingService.ADD\_TO\_CART\_ID\_KEY property
|
|
6
|
+
|
|
7
|
+
Session id key to use as key in the storage for add to carts.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
static readonly ADD_TO_CART_ID_KEY = "checkout";
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [instance](./x-components.defaultexternaltaggingservice.instance.md)
|
|
4
|
+
|
|
5
|
+
## DefaultExternalTaggingService.instance property
|
|
6
|
+
|
|
7
|
+
Global instance of the [ExternalTaggingService](./x-components.externaltaggingservice.md)<!-- -->.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
static instance: ExternalTaggingService;
|
|
13
|
+
```
|
package/docs/API-reference/api/x-components.defaultexternaltaggingservice.localstorageservice.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [localStorageService](./x-components.defaultexternaltaggingservice.localstorageservice.md)
|
|
4
|
+
|
|
5
|
+
## DefaultExternalTaggingService.localStorageService property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
protected localStorageService: StorageService;
|
|
11
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md)
|
|
4
|
+
|
|
5
|
+
## DefaultExternalTaggingService class
|
|
6
|
+
|
|
7
|
+
Default implementation for the [ExternalTaggingService](./x-components.externaltaggingservice.md)<!-- -->.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare class DefaultExternalTaggingService implements ExternalTaggingService
|
|
13
|
+
```
|
|
14
|
+
**Implements:** [ExternalTaggingService](./x-components.externaltaggingservice.md)
|
|
15
|
+
|
|
16
|
+
## Constructors
|
|
17
|
+
|
|
18
|
+
| Constructor | Modifiers | Description |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| [(constructor)(localStorageService, sessionStorageService)](./x-components.defaultexternaltaggingservice._constructor_.md) | | Constructs a new instance of the <code>DefaultExternalTaggingService</code> class |
|
|
21
|
+
|
|
22
|
+
## Properties
|
|
23
|
+
|
|
24
|
+
| Property | Modifiers | Type | Description |
|
|
25
|
+
| --- | --- | --- | --- |
|
|
26
|
+
| [ADD\_TO\_CART\_ID\_KEY](./x-components.defaultexternaltaggingservice.add_to_cart_id_key.md) | <p><code>static</code></p><p><code>readonly</code></p> | (not declared) | Session id key to use as key in the storage for add to carts. |
|
|
27
|
+
| [instance](./x-components.defaultexternaltaggingservice.instance.md) | <code>static</code> | [ExternalTaggingService](./x-components.externaltaggingservice.md) | Global instance of the [ExternalTaggingService](./x-components.externaltaggingservice.md)<!-- -->. |
|
|
28
|
+
| [localStorageService](./x-components.defaultexternaltaggingservice.localstorageservice.md) | <code>protected</code> | StorageService | |
|
|
29
|
+
| [RESULT\_CLICKED\_ID\_KEY](./x-components.defaultexternaltaggingservice.result_clicked_id_key.md) | <p><code>static</code></p><p><code>readonly</code></p> | (not declared) | Session id key to use as key in the storage for result clicks. |
|
|
30
|
+
| [sessionStorageService](./x-components.defaultexternaltaggingservice.sessionstorageservice.md) | <code>protected</code> | StorageService | |
|
|
31
|
+
| [storageKey](./x-components.defaultexternaltaggingservice.storagekey.md) | <p><code>protected</code></p><p><code>readonly</code></p> | string | |
|
|
32
|
+
| [storageTTLMs](./x-components.defaultexternaltaggingservice.storagettlms.md) | <p><code>protected</code></p><p><code>readonly</code></p> | number | |
|
|
33
|
+
| [store](./x-components.defaultexternaltaggingservice.store.md) | <p><code>protected</code></p><p><code>readonly</code></p> | Store<[RootXStoreState](./x-components.rootxstorestate.md)<!-- -->> | |
|
|
34
|
+
|
|
35
|
+
## Methods
|
|
36
|
+
|
|
37
|
+
| Method | Modifiers | Description |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| [moveToSessionStorage(id)](./x-components.defaultexternaltaggingservice.movetosessionstorage.md) | | Checks if the local storage contains a result information for the given id and moves the result info from the local storage to the session storage. |
|
|
40
|
+
| [storeAddToCart(result)](./x-components.defaultexternaltaggingservice.storeaddtocart.md) | | Stores in the session storage the information from the Result added to the cart by the user in order to be able to track the checkout later on when the checkout process has been completed by shopper. |
|
|
41
|
+
| [storeResultClicked(result)](./x-components.defaultexternaltaggingservice.storeresultclicked.md) | | Stores in the local storage the information from the Result clicked by the user in order to be able to track the add to cart later on the result's PDP. |
|
|
42
|
+
| [trackAddToCart(id)](./x-components.defaultexternaltaggingservice.trackaddtocart.md) | | Checks if the session storage contains a result information for a given id or the current url. If exists, it tracks the add to cart and saves the add to cart information into session storage. |
|
|
43
|
+
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [moveToSessionStorage](./x-components.defaultexternaltaggingservice.movetosessionstorage.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## DefaultExternalTaggingService.moveToSessionStorage() method
|
|
6
6
|
|
|
7
7
|
Checks if the local storage contains a result information for the given id and moves the result info from the local storage to the session storage.
|
|
8
8
|
|
package/docs/API-reference/api/x-components.defaultexternaltaggingservice.result_clicked_id_key.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [RESULT\_CLICKED\_ID\_KEY](./x-components.defaultexternaltaggingservice.result_clicked_id_key.md)
|
|
4
|
+
|
|
5
|
+
## DefaultExternalTaggingService.RESULT\_CLICKED\_ID\_KEY property
|
|
6
|
+
|
|
7
|
+
Session id key to use as key in the storage for result clicks.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
static readonly RESULT_CLICKED_ID_KEY = "add-to-cart";
|
|
13
|
+
```
|
package/docs/API-reference/api/x-components.defaultexternaltaggingservice.sessionstorageservice.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [sessionStorageService](./x-components.defaultexternaltaggingservice.sessionstorageservice.md)
|
|
4
|
+
|
|
5
|
+
## DefaultExternalTaggingService.sessionStorageService property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
protected sessionStorageService: StorageService;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [storageKey](./x-components.defaultexternaltaggingservice.storagekey.md)
|
|
4
|
+
|
|
5
|
+
## DefaultExternalTaggingService.storageKey property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
protected get storageKey(): string;
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [storageTTLMs](./x-components.defaultexternaltaggingservice.storagettlms.md)
|
|
4
|
+
|
|
5
|
+
## DefaultExternalTaggingService.storageTTLMs property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
protected get storageTTLMs(): number;
|
|
11
|
+
```
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [store](./x-components.defaultexternaltaggingservice.store.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## DefaultExternalTaggingService.store property
|
|
6
6
|
|
|
7
7
|
**Signature:**
|
|
8
8
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [storeAddToCart](./x-components.defaultexternaltaggingservice.storeaddtocart.md)
|
|
4
|
+
|
|
5
|
+
## DefaultExternalTaggingService.storeAddToCart() method
|
|
6
|
+
|
|
7
|
+
Stores in the session storage the information from the Result added to the cart by the user in order to be able to track the checkout later on when the checkout process has been completed by shopper.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
storeAddToCart(result: Result): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| result | Result | The result to store. |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [storeResultClicked](./x-components.defaultexternaltaggingservice.storeresultclicked.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## DefaultExternalTaggingService.storeResultClicked() method
|
|
6
6
|
|
|
7
|
-
Stores in the local storage the information from the Result clicked by the user in order to be able to track later on.
|
|
7
|
+
Stores in the local storage the information from the Result clicked by the user in order to be able to track the add to cart later on the result's PDP.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) > [trackAddToCart](./x-components.defaultexternaltaggingservice.trackaddtocart.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## DefaultExternalTaggingService.trackAddToCart() method
|
|
6
6
|
|
|
7
|
-
Checks if the session storage contains a result information for given id or the current url
|
|
7
|
+
Checks if the session storage contains a result information for a given id or the current url. If exists, it tracks the add to cart and saves the add to cart information into session storage.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [ExternalTaggingService](./x-components.externaltaggingservice.md)
|
|
4
|
+
|
|
5
|
+
## ExternalTaggingService interface
|
|
6
|
+
|
|
7
|
+
Service to handle the workflow for tracking add to cart from PDP.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface ExternalTaggingService
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
| Method | Description |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| [moveToSessionStorage(id)](./x-components.externaltaggingservice.movetosessionstorage.md) | Checks if the local storage contains a result information for the given id and moves the result info from the local storage to the session storage. |
|
|
20
|
+
| [storeAddToCart(result)](./x-components.externaltaggingservice.storeaddtocart.md) | Stores in the session storage the information from the Result added to the cart by the user in order to be able to track the checkout later on when the checkout process has been completed by shopper. |
|
|
21
|
+
| [storeResultClicked(result)](./x-components.externaltaggingservice.storeresultclicked.md) | Stores in the local storage the information from the Result clicked by the user in order to be able to track the add to cart later on the result's PDP. |
|
|
22
|
+
| [trackAddToCart(id)](./x-components.externaltaggingservice.trackaddtocart.md) | Checks if the session storage contains a result information for a given id or the current url. If exists, it tracks the add to cart and saves the add to cart information into session storage. |
|
|
23
|
+
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [ExternalTaggingService](./x-components.externaltaggingservice.md) > [moveToSessionStorage](./x-components.externaltaggingservice.movetosessionstorage.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## ExternalTaggingService.moveToSessionStorage() method
|
|
6
6
|
|
|
7
7
|
Checks if the local storage contains a result information for the given id and moves the result info from the local storage to the session storage.
|
|
8
8
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [ExternalTaggingService](./x-components.externaltaggingservice.md) > [storeAddToCart](./x-components.externaltaggingservice.storeaddtocart.md)
|
|
4
|
+
|
|
5
|
+
## ExternalTaggingService.storeAddToCart() method
|
|
6
|
+
|
|
7
|
+
Stores in the session storage the information from the Result added to the cart by the user in order to be able to track the checkout later on when the checkout process has been completed by shopper.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
storeAddToCart(result: Result): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| result | Result | The result to store. |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [ExternalTaggingService](./x-components.externaltaggingservice.md) > [storeResultClicked](./x-components.externaltaggingservice.storeresultclicked.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## ExternalTaggingService.storeResultClicked() method
|
|
6
6
|
|
|
7
|
-
Stores in the local storage the information from the Result clicked by the user in order to be able to track later on.
|
|
7
|
+
Stores in the local storage the information from the Result clicked by the user in order to be able to track the add to cart later on the result's PDP.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [ExternalTaggingService](./x-components.externaltaggingservice.md) > [trackAddToCart](./x-components.externaltaggingservice.trackaddtocart.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## ExternalTaggingService.trackAddToCart() method
|
|
6
6
|
|
|
7
|
-
Checks if the session storage contains a result information for given id or the current url
|
|
7
|
+
Checks if the session storage contains a result information for a given id or the current url. If exists, it tracks the add to cart and saves the add to cart information into session storage.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
@@ -12,8 +12,8 @@ X-Components is a library usable everywhere not only for search experiences.
|
|
|
12
12
|
| --- | --- |
|
|
13
13
|
| [AddQueryToHistoryAction](./x-components.addquerytohistoryaction.md) | Class implementation for the [HistoryQueriesActions.addQueryToHistory()](./x-components.historyqueriesactions.addquerytohistory.md) action. |
|
|
14
14
|
| [BaseXAPI](./x-components.basexapi.md) | Default implementation for [XAPI](./x-components.xapi.md)<!-- -->. |
|
|
15
|
+
| [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) | Default implementation for the [ExternalTaggingService](./x-components.externaltaggingservice.md)<!-- -->. |
|
|
15
16
|
| [DefaultFacetsService](./x-components.defaultfacetsservice.md) | Default implementation for the [FacetsService](./x-components.facetsservice.md)<!-- -->. |
|
|
16
|
-
| [DefaultPDPAddToCartService](./x-components.defaultpdpaddtocartservice.md) | Default implementation for the [PDPAddToCartService](./x-components.pdpaddtocartservice.md)<!-- -->. |
|
|
17
17
|
| [DirectionalFocusNavigationService](./x-components.directionalfocusnavigationservice.md) | Implementation of [SpatialNavigation](./x-components.spatialnavigation.md) using directional focus. |
|
|
18
18
|
| [HistoryQueriesGetter](./x-components.historyqueriesgetter.md) | Class implementation for the [HistoryQueriesGetters.historyQueries](./x-components.historyqueriesgetters.historyqueries.md) getter. |
|
|
19
19
|
| [QuerySuggestionsGetter](./x-components.querysuggestionsgetter.md) | Class implementation for the [QuerySuggestionsGetter.querySuggestions()](./x-components.querysuggestionsgetter.querysuggestions.md) getter. |
|
|
@@ -128,6 +128,7 @@ X-Components is a library usable everywhere not only for search experiences.
|
|
|
128
128
|
| [ExperienceControlsMutations](./x-components.experiencecontrolsmutations.md) | Experience Controls store mutations. |
|
|
129
129
|
| [ExperienceControlsState](./x-components.experiencecontrolsstate.md) | Experience Controls store state. |
|
|
130
130
|
| [ExperienceControlsXEvents](./x-components.experiencecontrolsxevents.md) | Dictionary of the events of Experience Controls XModule. |
|
|
131
|
+
| [ExternalTaggingService](./x-components.externaltaggingservice.md) | Service to handle the workflow for tracking add to cart from PDP. |
|
|
131
132
|
| [ExtraParamsActions](./x-components.extraparamsactions.md) | ExtraParams store actions. |
|
|
132
133
|
| [ExtraParamsGetters](./x-components.extraparamsgetters.md) | ExtraParams store getters. |
|
|
133
134
|
| [ExtraParamsMutations](./x-components.extraparamsmutations.md) | ExtraParams store mutations. |
|
|
@@ -172,7 +173,6 @@ X-Components is a library usable everywhere not only for search experiences.
|
|
|
172
173
|
| [NextQueriesMutations](./x-components.nextqueriesmutations.md) | Next queries module mutations. |
|
|
173
174
|
| [NextQueriesState](./x-components.nextqueriesstate.md) | Next queries module state. |
|
|
174
175
|
| [NextQueriesXEvents](./x-components.nextqueriesxevents.md) | Dictionary of the events of NextQueries XModule, where each key is the event name, and the value is the event payload type or <code>void</code> if it has no payload. |
|
|
175
|
-
| [PDPAddToCartService](./x-components.pdpaddtocartservice.md) | Service to handle the workflow for tracking add to cart from PDP. |
|
|
176
176
|
| [PopularSearchesActions](./x-components.popularsearchesactions.md) | Popular searches module actions. |
|
|
177
177
|
| [PopularSearchesConfig](./x-components.popularsearchesconfig.md) | Configuration options for the popular searches module. |
|
|
178
178
|
| [PopularSearchesGetters](./x-components.popularsearchesgetters.md) | Popular searches module getters. |
|
|
@@ -10,11 +10,11 @@ This component enables and manages the sending of information to the \[Empathy T
|
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
_default: import("vue").DefineComponent<{
|
|
13
|
-
|
|
13
|
+
storageTTLMs: {
|
|
14
14
|
type: NumberConstructor;
|
|
15
15
|
default: number;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
storageKey: {
|
|
18
18
|
type: StringConstructor;
|
|
19
19
|
default: string;
|
|
20
20
|
};
|
|
@@ -28,11 +28,11 @@ _default: import("vue").DefineComponent<{
|
|
|
28
28
|
default: null;
|
|
29
29
|
};
|
|
30
30
|
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
-
|
|
31
|
+
storageTTLMs: {
|
|
32
32
|
type: NumberConstructor;
|
|
33
33
|
default: number;
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
storageKey: {
|
|
36
36
|
type: StringConstructor;
|
|
37
37
|
default: string;
|
|
38
38
|
};
|
|
@@ -46,8 +46,8 @@ _default: import("vue").DefineComponent<{
|
|
|
46
46
|
default: null;
|
|
47
47
|
};
|
|
48
48
|
}>>, {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
storageTTLMs: number;
|
|
50
|
+
storageKey: string;
|
|
51
51
|
queryTaggingDebounceMs: number;
|
|
52
52
|
consent: boolean;
|
|
53
53
|
}, {}>
|
|
@@ -16,8 +16,8 @@ export interface TaggingConfig
|
|
|
16
16
|
|
|
17
17
|
| Property | Modifiers | Type | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
-
| [clickedResultStorageKey](./x-components.taggingconfig.clickedresultstoragekey.md) | | string \| null | Field of the [result](./x-types.result.md) to use as id for storing the information. |
|
|
20
|
-
| [clickedResultStorageTTLMs](./x-components.taggingconfig.clickedresultstoragettlms.md) | | number \| null | Time in milliseconds to keep the information for a result clicked by the user. |
|
|
21
19
|
| [queryTaggingDebounceMs](./x-components.taggingconfig.querytaggingdebouncems.md) | | number | Time in milliseconds to track the query. |
|
|
22
20
|
| [sessionTTLMs](./x-components.taggingconfig.sessionttlms.md) | | number | Time in milliseconds to keep the session alive. After this time has passed with no user interaction, the session will be cleared. |
|
|
21
|
+
| [storageKey](./x-components.taggingconfig.storagekey.md) | | string \| null | Field of the [result](./x-types.result.md) to use as id for storing the information. |
|
|
22
|
+
| [storageTTLMs](./x-components.taggingconfig.storagettlms.md) | | number \| null | Time in milliseconds to keep the information for a result. |
|
|
23
23
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
2
|
|
|
3
|
-
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [TaggingConfig](./x-components.taggingconfig.md) > [
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [TaggingConfig](./x-components.taggingconfig.md) > [storageKey](./x-components.taggingconfig.storagekey.md)
|
|
4
4
|
|
|
5
|
-
## TaggingConfig.
|
|
5
|
+
## TaggingConfig.storageKey property
|
|
6
6
|
|
|
7
7
|
Field of the [result](./x-types.result.md) to use as id for storing the information.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
|
|
12
|
+
storageKey: string | null;
|
|
13
13
|
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [TaggingConfig](./x-components.taggingconfig.md) > [storageTTLMs](./x-components.taggingconfig.storagettlms.md)
|
|
4
|
+
|
|
5
|
+
## TaggingConfig.storageTTLMs property
|
|
6
|
+
|
|
7
|
+
Time in milliseconds to keep the information for a result.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
storageTTLMs: number | null;
|
|
13
|
+
```
|
|
@@ -19,7 +19,7 @@ export interface TaggingXEvents
|
|
|
19
19
|
| [ConsentChanged](./x-components.taggingxevents.consentchanged.md) | | boolean | Consent has changed. Payload: The new consent value. |
|
|
20
20
|
| [ConsentProvided](./x-components.taggingxevents.consentprovided.md) | | boolean | Consent has been provided. Payload: The new consent value. |
|
|
21
21
|
| [PDPIsLoaded](./x-components.taggingxevents.pdpisloaded.md) | | string | A product description page has been loaded. Payload: the id of the product. |
|
|
22
|
-
| [ResultURLTrackingEnabled](./x-components.taggingxevents.resulturltrackingenabled.md) | | string |
|
|
22
|
+
| [ResultURLTrackingEnabled](./x-components.taggingxevents.resulturltrackingenabled.md) | | string | StorageKey has been configured to use the [result](./x-types.result.md) url. Payload: The new storageKey. |
|
|
23
23
|
| [SearchTaggingReceived](./x-components.taggingxevents.searchtaggingreceived.md) | | TaggingRequest | Query tagging info has changed. Payload: The new query tagging info. |
|
|
24
24
|
| [TaggingConfigProvided](./x-components.taggingxevents.taggingconfigprovided.md) | | [TaggingConfig](./x-components.taggingconfig.md) | The configuration for the tagging has been provided. Payload: The tagging configuration. |
|
|
25
25
|
| [TrackableElementDisplayed](./x-components.taggingxevents.trackableelementdisplayed.md) | | Taggable | Display trackable element has appeared in the viewport. Payload: The display tagging info. |
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## TaggingXEvents.ResultURLTrackingEnabled property
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
StorageKey has been configured to use the [result](./x-types.result.md) url. Payload: The new storageKey.
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
@@ -12,13 +12,13 @@ It allows you to activate or deactivate the session id management through the `c
|
|
|
12
12
|
|
|
13
13
|
## Props
|
|
14
14
|
|
|
15
|
-
| Name
|
|
16
|
-
|
|
|
17
|
-
| <code>
|
|
18
|
-
| <code>
|
|
19
|
-
| <code>sessionTTLMs</code>
|
|
20
|
-
| <code>queryTaggingDebounceMs</code>
|
|
21
|
-
| <code>consent</code>
|
|
15
|
+
| Name | Description | Type | Default |
|
|
16
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------ |
|
|
17
|
+
| <code>storageTTLMs</code> | The TTL in milliseconds for storing the result info. | <code>number</code> | <code>30000</code> |
|
|
18
|
+
| <code>storageKey</code> | The Object key of the @empathyco/x-types#Result clicked or added to the cart by the user<br />that will be used as id for the storage.<br />By default, the Result url will be used. | <code>string</code> | <code>'url'</code> |
|
|
19
|
+
| <code>sessionTTLMs</code> | The session TTL in milliseconds. | <code>number</code> | <code></code> |
|
|
20
|
+
| <code>queryTaggingDebounceMs</code> | The debounce time in milliseconds to track the query. | <code>number</code> | <code>2000</code> |
|
|
21
|
+
| <code>consent</code> | The consent to be emitted. | <code>boolean</code> | <code>null</code> |
|
|
22
22
|
|
|
23
23
|
## Events
|
|
24
24
|
|
|
@@ -53,13 +53,12 @@ doesn't render elements to the DOM.
|
|
|
53
53
|
|
|
54
54
|
In this example, the `Tagging` component will emit `ConsentProvided` with payload false by default
|
|
55
55
|
if the consent is not provided, the `TaggingConfigProvided` event will be emitted only if the props
|
|
56
|
-
`queryTaggingDebounceMs`, `sessionDurationMs`, `
|
|
57
|
-
`clickedResultStorageKey`are defined.
|
|
56
|
+
`queryTaggingDebounceMs`, `sessionDurationMs`, `storageTTLMs` or `storageKey`are defined.
|
|
58
57
|
|
|
59
|
-
Every time the user clicks a result
|
|
60
|
-
browser during 30 seconds which is the default value for the prop
|
|
61
|
-
distinguish the storage information for the different results the product url
|
|
62
|
-
`
|
|
58
|
+
Every time the user clicks a result or adds a result to the cart, the information for the product
|
|
59
|
+
will be stored on the browser during 30 seconds which is the default value for the prop
|
|
60
|
+
`storageTTLMs`. To distinguish the storage information for the different results the product url
|
|
61
|
+
will be used since `storageKey` default value is 'url'.
|
|
63
62
|
|
|
64
63
|
```vue
|
|
65
64
|
<template>
|
|
@@ -78,12 +77,12 @@ distinguish the storage information for the different results the product url wi
|
|
|
78
77
|
</script>
|
|
79
78
|
```
|
|
80
79
|
|
|
81
|
-
In this example, the clicked result information will be stored on the browser
|
|
82
|
-
the product id will be used as storage key
|
|
80
|
+
In this example, the clicked or added to cart result information will be stored on the browser
|
|
81
|
+
during 60 seconds and the product id will be used as storage key
|
|
83
82
|
|
|
84
83
|
```vue
|
|
85
84
|
<template>
|
|
86
|
-
<Tagging :
|
|
85
|
+
<Tagging :storageTTLMs="60000" :storageKey="'id'" />
|
|
87
86
|
</template>
|
|
88
87
|
|
|
89
88
|
<script>
|
package/js/index.js
CHANGED
|
@@ -407,7 +407,7 @@ export { semanticQueriesXStoreModule } from './x-modules/semantic-queries/store/
|
|
|
407
407
|
export { semanticQueriesXModule } from './x-modules/semantic-queries/x-module.js';
|
|
408
408
|
export { clearQueryWire, fetchAndSaveSemanticQueryWire, semanticQueriesWiring, setQueryFromSearchResponseChangedWire, setQueryWire, setSemanticQueriesExtraParamsWire, setTotalResultsFromSearchResponseChangedWire, setTotalResultsWire } from './x-modules/semantic-queries/wiring.js';
|
|
409
409
|
export { default as Tagging } from './x-modules/tagging/components/tagging.vue.js';
|
|
410
|
-
export {
|
|
410
|
+
export { DefaultExternalTaggingService } from './x-modules/tagging/service/external-tagging.service.js';
|
|
411
411
|
export { track } from './x-modules/tagging/store/actions/track.action.js';
|
|
412
412
|
export { taggingEmitters } from './x-modules/tagging/store/emitters.js';
|
|
413
413
|
export { taggingXStoreModule } from './x-modules/tagging/store/module.js';
|
|
@@ -14,17 +14,18 @@ var _sfc_main = defineComponent({
|
|
|
14
14
|
xModule: taggingXModule.name,
|
|
15
15
|
props: {
|
|
16
16
|
/**
|
|
17
|
-
* The TTL in milliseconds for storing the
|
|
17
|
+
* The TTL in milliseconds for storing the result info.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
storageTTLMs: {
|
|
20
20
|
type: Number,
|
|
21
21
|
default: 30000
|
|
22
22
|
},
|
|
23
23
|
/**
|
|
24
|
-
* The Object key of the {@link @empathyco/x-types#Result} clicked by the user
|
|
25
|
-
* that will be used as id for the storage.
|
|
24
|
+
* The Object key of the {@link @empathyco/x-types#Result} clicked or added to the cart by the user
|
|
25
|
+
* that will be used as id for the storage.
|
|
26
|
+
* By default, the Result url will be used.
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
|
+
storageKey: {
|
|
28
29
|
type: String,
|
|
29
30
|
default: 'url'
|
|
30
31
|
},
|
|
@@ -70,8 +71,8 @@ var _sfc_main = defineComponent({
|
|
|
70
71
|
return {
|
|
71
72
|
queryTaggingDebounceMs: props.queryTaggingDebounceMs,
|
|
72
73
|
sessionTTLMs: props.sessionTTLMs,
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
storageTTLMs: props.storageTTLMs,
|
|
75
|
+
storageKey: props.storageKey
|
|
75
76
|
};
|
|
76
77
|
});
|
|
77
78
|
/**
|