MiB

Events

Track wishlist events (add/remove, moveToCart, share).

Events are stored for analytics. add and remove are created automatically when you call /item/add and /item/remove. autoRemoveAfterPurchase is created automatically by the purchase webhook when this option is enabled in the app settings. moveToCart is sent through /item/remove when you include event: "moveToCart" in the remove payload.

Track event

POST /event

Authentication is required.

Request

{
  "identity": {
    "customerId": "8769049329896",
    "sessionId": null,
    "email": "customer@example.com",
    "firstName": "Jane",
    "lastName": "Doe",
    "device": "desktop",
    "locale": "en"
  },
  "type": "moveToCart",
  "payload": {
    "productId": "12321312412",
    "variantId": "987654321",
    "productHandle": "sunglasses",
    "productTitle": "Sunglasses",
    "variantTitle": null,
    "quantity": 1,
    "price": "49.00",
    "compareAt": "69.00",
    "image": "https://cdn.example.com/image.jpg"
  }
}

Parameters

FieldTypeRequiredDescription
identityIdentityyesMust include at least customerId or sessionId.
typestringyesadd, remove, moveToCart, share, autoRemoveAfterPurchase.
payloadobjectnoFree-form payload used for analytics.

Response

{
  "profileId": "cuid..."
}

moveToCart payload

Use /item/remove with event: "moveToCart" and pass product details so analytics can show what moved to cart. Use it when a wishlist item is successfully added to the cart (for example after the add-to-cart action completes). Recommended fields:

{
  "productId": "12321312412",
  "variantId": "987654321",
  "productHandle": "sunglasses",
  "productTitle": "Sunglasses",
  "variantTitle": null,
  "quantity": 1,
  "price": "49.00",
  "compareAt": "69.00",
  "image": "https://cdn.example.com/image.jpg"
}

share payload

If you use /share to generate the link, the share event is created automatically. If you track shares manually, call /event with type: "share" and send:

{
  "channel": "Link",
  "shareCode": "....",
  "shareLink": "https://example.myshopify.com/apps/mib-wishlist/wishlist/share/...."
}

On this page