-
public final class EcommerceTrackerE-Commerce helper for Android. Parity port of libs/web-sdk/src/ecommerce/index.ts (web SDK ≥1.4.0; back-in-stock waitlist landed 2026-05-24).
Method names + emitted event names are pinned by libs/mobile-sdk/tests/drift/ecommerce-event-names.json. Drift on either side breaks the canonical_mapper consumers (product_event_trigger_service, storefront_cart_abandonment_scanner, data_governance.canonical_mapper).
Cart abandonment is detected server-side (storefront_cart_abandonment_scanner.py) — NOT by a JS/mobile timer. The SDK only emits the canonical cart events; the scanner does the 30-min-no-purchase pattern match over events_with_ttl.
Usage:
val ecommerce = EcommerceTracker(Aegis) ecommerce.productViewed(EcommerceProduct( productId = "sku-42", name = "Cotton Tee", price = 1299.0, )) ecommerce.addToCart(product) ecommerce.orderCompleted(EcommerceOrder( orderId = "ord-100", value = 2598.0, products = listOf(product), ))
-
-
Constructor Summary
Constructors Constructor Description EcommerceTracker(Aegis aegis)
-
Method Summary
-
-
Constructor Detail
-
EcommerceTracker
EcommerceTracker(Aegis aegis)
-
-
Method Detail
-
productViewed
final Unit productViewed(EcommerceProduct product)
-
productListViewed
final Unit productListViewed(EcommerceProductList list)
-
productClicked
final Unit productClicked(EcommerceProduct product, String listId, Integer position, String section)
-
productImpressed
final Unit productImpressed(EcommerceProduct product, String listId, Integer position, String section)
-
categoryFiltered
final Unit categoryFiltered(String category, String previousCategory, Integer resultCount)
-
searchPerformed
final Unit searchPerformed(EcommerceSearch search)
-
addToCart
final Unit addToCart(EcommerceProduct product)
-
removeFromCart
final Unit removeFromCart(EcommerceProduct product)
-
cartViewed
final Unit cartViewed(EcommerceCart cart)
-
checkoutStarted
final Unit checkoutStarted(EcommerceCheckout checkout)
-
orderCompleted
final Unit orderCompleted(EcommerceOrder order)
-
orderRefunded
final Unit orderRefunded(String orderId, Double value, List<EcommerceProduct> products)
-
couponApplied
final Unit couponApplied(EcommerceCoupon coupon)
-
couponRemoved
final Unit couponRemoved(EcommerceCoupon coupon)
-
wishlistItemAdded
final Unit wishlistItemAdded(EcommerceWishlist wishlist)
-
productWaitlisted
final Unit productWaitlisted(EcommerceWaitlist waitlist)
-
promotionViewed
final Unit promotionViewed(EcommercePromotion promo)
-
promotionClicked
final Unit promotionClicked(EcommercePromotion promo)
-
-
-
-