Skip to content

Send cart and purchase events

Once the widget is on your site, report cart activity with DICE.track. DICE uses it for abandoned cart recovery (only for customers with marketing consent) and to attribute sales to conversations.

JS
DICE.track('cart.item_added', { cart_id: 'c_123', currency: 'CAD', item: { sku: 'DESK-1', name: 'Walnut desk', price: 420.0, quantity: 1 } });
DICE.track('checkout.started', { cart_id: 'c_123', checkout_url: 'https://shop.example/checkout/c_123' });
DICE.track('purchase', { cart_id: 'c_123', order_id: 'ORD-1001', total: 420.0, currency: 'CAD' });

Amounts are in major units (dollars, euros, lira).

Events

EventWhen to send it
cart.updatedThe cart changed and you send the full list of items
cart.item_addedOne item was added
cart.item_removedOne item was removed
checkout.startedThe shopper reached checkout
purchaseThe order was placed

Good to know

  • Send the same cart_id your store uses so events join up. Without one, DICE keeps one open cart per visitor.
  • A cart counts as abandoned after 30 minutes without activity (configurable in Automations → Cart recovery).
  • Recovery messages go out only when the customer gave marketing consent, and stop at purchase.