Sending an add to cart

The Add to cart event is available with Experience Analytics Web and Merchandising.
The event is not available in Experience Analytics Mobile.

To send an add to cart, use:

<script type="text/javascript">
window._uxa = window._uxa || [];
window._uxa.push(['trackPageEvent', 'addToCart']);
window._uxa.push(['ec:cart:add', {
merchant: "merchant_name" /* mandatory - Merchant name (string) */
}]);
</script>

If you use Merchandising, specify an SKU value identical to the value in the Product Catalogue:

<script type="text/javascript">
window._uxa = window._uxa || [];
window._uxa.push(['ec:cart:add', {
sku: "SKU_added_to_cart", /* mandatory - Product code (SKU) (string) */
merchant: "merchant_name" /* optional - Merchant name (string) */
}]);
</script>

You can also implement an add to cart in Google Tag Manager using the “Tracking Customization” tag: select Add to cart as Action type and supply the SKU.