For commerce-specific events, we provide this function for tracking shopping cart data. This should also be called on the success page after the cart is updated.
var shoppingCartItems = [
{
"id": "1",
"sku": "1",
"title": "Grill Cleaning Brush",
"description": "Maintaining the grates of your outdoor grill prevents foods from sticking and yields attractive and tasty results.",
"categories": [
"housewares",
"grilling",
"cleaning",
],
"url": "https://emmyandwalter.com/products/grill-cleaning-brush?variant=14837335815",
"imageUrl": "http://cdn.shopify.com/s/files/1/1152/0452/products/grill-cleaning-brush-c_small.jpeg?v=1454983881",
"line_price": 53.90,
"price": 26.95,
"quantity": 2,
},
//...
];
_btn.trackUpdateCart(TotalPurchaseAmount, ShoppingCartItems);