E‑commerce tracking captures the shopping flow in your iOS app — from product views and add‑to‑cart actions to purchases. Attach an MIEcommerceParameters object containing one or more MIProduct entries to a page or action event.
MIEcommerceParameters
Property | Description |
|---|---|
| Array of |
|
|
| ISO currency code (for example |
| Unique identifier of the order (used with |
| Total order value as |
| Flag for new vs returning customer. |
| Value of returned items. |
| Value of cancelled items. |
| Coupon discount applied to the order. |
| Selected payment method. |
| Carrier name. |
| Shipping speed (for example |
| Shipping cost. |
| Markup value. |
| Free‑text order status string. |
| Dictionary of numbered custom e‑commerce parameters. |
MIProduct
Property | Description |
|---|---|
| Product name (typically SKU). |
| Product price as |
| Quantity of this product in the event. |
| Advertise ID for the product. |
| Whether the product is sold out. |
| Variant identifier (for example |
| Dictionary of numbered product categories. |
| Dictionary of numbered product‑level custom parameters. |
Example: track a product view
let product = MIProduct(dictionary: [:])
product.name = "SKU-12345"
product.cost = 49.90
product.quantity = 1
let ecommerce = MIEcommerceParameters()
ecommerce.products = [product]
ecommerce.status = .viewed
ecommerce.currency = "EUR"
let pageEvent = MIPageViewEvent(name: "Product Detail")
pageEvent.ecommerceParameters = ecommerce
MappIntelligence.shared()?.trackPage(pageEvent)MIProduct *product = [[MIProduct alloc] initWithDictionary:@{}];
product.name = @"SKU-12345";
product.cost = @49.90;
product.quantity = @1;
MIEcommerceParameters *ecommerce = [[MIEcommerceParameters alloc] init];
ecommerce.products = @[product];
ecommerce.status = viewed;
ecommerce.currency = @"EUR";
MIPageViewEvent *pageEvent = [[MIPageViewEvent alloc] initWithName:@"Product Detail"];
pageEvent.ecommerceParameters = ecommerce;
[[MappIntelligence shared] trackPage:pageEvent];Example: track an order confirmation
let ecommerce = MIEcommerceParameters()
ecommerce.products = orderedProducts // [MIProduct]
ecommerce.status = .purchased
ecommerce.orderID = "order-2026-04-28-0001"
ecommerce.orderValue = 149.70
ecommerce.currency = "EUR"
ecommerce.paymentMethod = "credit_card"
let pageEvent = MIPageViewEvent(name: "Order Confirmation")
pageEvent.ecommerceParameters = ecommerce
MappIntelligence.shared()?.trackPage(pageEvent)MIEcommerceParameters *ecommerce = [[MIEcommerceParameters alloc] init];
ecommerce.products = orderedProducts; // NSArray<MIProduct *> *
ecommerce.status = purchased;
ecommerce.orderID = @"order-2026-04-28-0001";
ecommerce.orderValue = @149.70;
ecommerce.currency = @"EUR";
ecommerce.paymentMethod = @"credit_card";
MIPageViewEvent *pageEvent = [[MIPageViewEvent alloc] initWithName:@"Order Confirmation"];
pageEvent.ecommerceParameters = ecommerce;
[[MappIntelligence shared] trackPage:pageEvent];Use the
purchasedstatus only on the order confirmation screen, after a successful purchase. Sendingpurchasedmultiple times for the same order leads to inflated revenue numbers.
Related: Object Oriented Tracking, Pages, Events.