Example
window._upstack('track', 'product_removed_from_cart', {
// Standard parameters
value: 34.99,
currency: 'USD',
items: [{
id: '8012345678',
variant: '44120033',
variantName: 'Blue / Medium',
name: 'Classic Cotton Tee',
sku: 'TEE-BLU-M',
price: 34.99,
quantity: 1,
brand: 'Example Brand',
category: 'Apparel',
url: 'https://example.com/products/classic-tee',
imageUrl: 'https://example.com/images/classic-tee.jpg'
}],
cartId: 'cart_5521',
// User data
email: 'jane@example.com',
// Custom data
removalReason: 'changed_mind',
removedFrom: 'cart_drawer'
});
Standard parameters
Item parameters
| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
id | string | Yes | 8012345678 | Product ID. Must match the ID in your product catalogs. |
name | string | Yes | Classic Cotton Tee | Product name. |
price | number | Yes | 34.99 | Unit price. |
quantity | number | Yes | 2 | Quantity. |
variant | string | No | 44120033 | Variant ID, not a name. Must match your catalogs. |
variantName | string | No | Blue / Medium | Variant name. |
sku | string | No | TEE-BLU-M | SKU. |
brand | string | No | Example Brand | Brand. |
category | string | No | Apparel | Product category. |
url | string | No | https://example.com/products/classic-tee | Product page URL. |
imageUrl | string | No | https://example.com/images/classic-tee.jpg | Product image URL. |
discount | number | No | 3.50 | Discount on this line. |
value | number | No | 69.98 | Line total. |
content_type | string | No | product | product or product_group. |
User data
* Required once you know it.
Custom data
Examples for this event. See how custom data works.| Name | Type | Example value | Description |
|---|---|---|---|
removalReason | string | changed_mind | Why the user was removed. |
removedFrom | string | cart_drawer | Where the product was removed, such as cart_drawer. |
Related events
add_to_cart— A visitor adds a product to their cart.view_cart— A visitor views their cart.