// invoke 'trigger' on any event and with any data
_shopmsg('trigger', 'EventName', {"anyData":"anyValue"});

To generate an event from the browser, call the trigger function on the SDK.

_shopmsg('trigger', 'UpdateCart', {
  "total_price": 29.99,
  "cta_url": "https://bklyn-demo.myshopify.com/cart/32659788101:1,32659610053:1",
  "items": [
    {
      "title": "Red Boot - 7",
      "image": "https://cdn.shopify.com/s/files/1/2123/3399/products/boot.jpg?v=1498247953",
      "price": 310.00,
      "quantity": 1,
      "product_url": "https://bklyn-demo.myshopify.com/products/redwing-iron-ranger?variant=32659788101"
    },
    {
      "title": "Blue Shirt - L",
      "image": "https://cdn.shopify.com/s/files/1/2123/3399/products/chambray_5f232530-4331-492a-872c-81c225d6bafd.jpg?v=1498247863",
      "price": 98.00,
      "quantity": 1,
      "product_url": "https://bklyn-demo.myshopify.com/products/ayers-chambray?variant=32659610053"
    }
  ]
});