UNPKG

@empathyco/x-components

Version:
44 lines (31 loc) 3.73 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [DefaultExternalTaggingService](./x-components.defaultexternaltaggingservice.md) ## DefaultExternalTaggingService class Default implementation for the [ExternalTaggingService](./x-components.externaltaggingservice.md)<!-- -->. **Signature:** ```typescript export declare class DefaultExternalTaggingService implements ExternalTaggingService ``` **Implements:** [ExternalTaggingService](./x-components.externaltaggingservice.md) ## Constructors | Constructor | Modifiers | Description | | --- | --- | --- | | [(constructor)(localStorageService, sessionStorageService)](./x-components.defaultexternaltaggingservice._constructor_.md) | | Constructs a new instance of the <code>DefaultExternalTaggingService</code> class | ## Properties | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [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. | | [instance](./x-components.defaultexternaltaggingservice.instance.md) | <code>static</code> | [ExternalTaggingService](./x-components.externaltaggingservice.md) | Global instance of the [ExternalTaggingService](./x-components.externaltaggingservice.md)<!-- -->. | | [localStorageService](./x-components.defaultexternaltaggingservice.localstorageservice.md) | <code>protected</code> | StorageService | | | [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. | | [sessionStorageService](./x-components.defaultexternaltaggingservice.sessionstorageservice.md) | <code>protected</code> | StorageService | | | [storageKey](./x-components.defaultexternaltaggingservice.storagekey.md) | <p><code>protected</code></p><p><code>readonly</code></p> | string | | | [storageTTLMs](./x-components.defaultexternaltaggingservice.storagettlms.md) | <p><code>protected</code></p><p><code>readonly</code></p> | number | | | [store](./x-components.defaultexternaltaggingservice.store.md) | <p><code>protected</code></p><p><code>readonly</code></p> | Store&lt;[RootXStoreState](./x-components.rootxstorestate.md)<!-- -->&gt; | | ## Methods | Method | Modifiers | Description | | --- | --- | --- | | [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. | | [storeAddToCart(result)](./x-components.defaultexternaltaggingservice.storeaddtocart.md) | | Stores in the local 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. | | [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. | | [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. |