UNPKG

@empathyco/x-components

Version:
25 lines (14 loc) 825 B
<!-- 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) &gt; [trackAddToCart](./x-components.defaultexternaltaggingservice.trackaddtocart.md) ## DefaultExternalTaggingService.trackAddToCart() method 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. **Signature:** ```typescript trackAddToCart(id?: string): void; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | id | string | _(Optional)_ The id of the result to track. | **Returns:** void