Basket Operations
Tracks changes to the user's shopping cart using the BASKET_OPERATIONS event.
Tracks changes to the user’s shopping cart using the BASKET_OPERATIONS event. All three requests share the same event name and differ only in the step field.
Requests:
- Basket Add — fires when a product is added to the cart (
step: "add"). RequiresproductId,price,quantity, andbasketId. - Basket Remove — fires when a product is removed from the cart (
step: "remove"). RequiresproductId,price,quantity, andbasketId. - Basket Clear — fires when the entire cart is emptied (
step: "clear"). No product-level fields are needed.
All requests use the {dataCenterUrl} endpoint and require userId, sessionId, lang, currency, and basketId.
Basket Add
Section titled “Basket Add”Example body
{ "name": "BASKET_OPERATIONS", "userId": "1234567890123456789", "sessionId": "323232", "testMode": "false", "device": "PC", "nextPage": false, "params": {}, "os": "ANDROID", "lang": "EN", "currency": "EUR", "productId": "T59008765Y0", "basketId": "basket_1234567890123456789", "step": "add", "price": "1999", "quantity": 1}Basket Remove
Section titled “Basket Remove”Example body
{ "name": "BASKET_OPERATIONS", "basketId": "basket_1234567890123456789", "userId": "1234567890123456789", "sessionId": "9876543210987654321", "testMode": "false", "device": "PC", "params": {}, "recommendIds": [], "pageUrl": "", "referrer": "", "lang": "EN", "currency": "EUR", "region": "", "productId": "PRODUCT_ID", "price": "1000", "quantity": "1", "email": "user@example.com", "step": "remove"}Basket Clear
Section titled “Basket Clear”Example body
{ "name": "BASKET_OPERATIONS", "basketId": "basket_1234567890123456789", "userId": "1234567890123456789", "sessionId": "9876543210987654321", "testMode": "false", "device": "PC", "params": {}, "recommendIds": [], "referrer": "", "lang": "EN", "currency": "EUR", "region": "", "email": "user@example.com", "step": "clear"}