---
updatedAt: 2026-01-22T11:09:34.000Z
---

# Remove from Cart

Reports that the user removed an item from the cart.

> 👍 Note
>
> The Remove from Cart event uses the same schema as Add to Cart, except for its **dyType** property value. Unlike Add to Cart, this event isn't mandatory unless you're using features that rely on Dynamic Yield holding the most up-to-date cart state, like [Reconnect](https://support.dynamicyield.com/hc/en-us/articles/13472246286749-Create-a-Reconnect-Campaign) campaigns.

### Parameters

* **name:** Human-readable name, not used to identify an event type
* **properties:** A container for the event properties as specified in the following table:

[block:parameters]
{
  "data": {
    "h-0": "Property",
    "h-1": "Description",
    "h-2": "Type",
    "0-0": "**dyType**",
    "0-1": "Must be \"remove-from-cart-v1\".",
    "0-2": "String",
    "1-0": "**value**",
    "1-1": "The total monetary value of the event (item or items added that triggered the event only).<br><span style=\"color:gray; font-size:0.8em;\">Note that this is not all the items in the cart. See the code example that follows after this table (productId \"item-34454\", quantity 2, itemPrice 59.13: Value is 118.26. The other item in the cart is not included.)</span>",
    "1-2": "Float (dollars.cents).  \n<br><span style=\"color:gray; font-size:0.8em;\">Numbers are rounded to the nearest 0.01. Numbers smaller than 0.005 are rounded down to 0.</span>",
    "2-0": "**currency  \n**<br><span style=\"color:gray; font-size:0.8em;\">Optional, but required for multi-currency sites</span>",
    "2-1": "The currency used for the value",
    "2-2": "String<br><span style=\"font-size:0.8em;\">[List of supported currencies](https://support.dynamicyield.com/hc/en-us/articles/360022558254#h_01F248KMJV1VWADRC2H7WYFWCZ)</span>",
    "3-0": "**productId**",
    "3-1": "The SKU exactly as it appears in the product feed",
    "3-2": "String",
    "4-0": "**quantity**",
    "4-1": "The number of items removed",
    "4-2": "Number",
    "5-0": "**cart**<br><span style=\"color:gray; font-size:0.8em;\">Optional, but recommended</span>",
    "5-1": "The cart's current state, after the removal of the item. Products are ordered from the first added to the cart to the most recent. ",
    "5-2": "Object  \n  \nSee the cart property table that follows for details."
  },
  "cols": 3,
  "rows": 6,
  "align": [
    "left",
    "left",
    "left"
  ]
}
[/block]

**Cart object properties:**

| Property      | Description                                   | Type                               |
| :------------ | :-------------------------------------------- | :--------------------------------- |
| **productId** | SKU exactly as it appears in the product feed | String                             |
| **quantity**  | Number of items                               | Number                             |
| **itemPrice** | The price of the item added                   | Float in the format: dollars.cents |

**Example: Implementation via script**

```javascript
DY.API("event", {
  name: "Remove from Cart",
  properties: {
    dyType: "remove-from-cart-v1",
    value: 34.45,
    currency: "any supported currency code",
    productId: "gswefd-34-454",
    quantity: 1,
    size: "XL"
    cart: [{
        productId: "sku-4324-bg",
        quantity: 2,
        itemPrice: 12.34,
      },
      {
        productId: "item-34454",
        quantity: 1,
        itemPrice: 34.45
      }
    ]
  }
});
```

**Example: Implementation via Experience API (server-side)**

```json
"events":[
  {
  name: "Remove from Cart",
  properties: {
    dyType: "remove-from-cart-v1",
    value: 68.90,
    currency: "any supported currency code",
    productId: "gswefd-34-454",
    quantity: 2,
    size: "XL"
    cart: [{
        productId: "sku-4324-bg",
        quantity: 2,
        itemPrice: 12.34,
      },
      {
        productId: "item-34454",
        quantity: 1,
        itemPrice: 34.45
      }
    ]
  }
}]
```

> 👍 Go to the [API reference for the Events endpoint](https://dy.dev/dy-dev/reference/track-events) to learn more.