This event is triggered when a user purchases an item and completes their order.
ImportantIf Purchase event attributes are not entered correctly, the following error may be generated in your project's logs: "Unfortunately, event "Purchase" hasn't been tracked since you have provided a nullable parameter or a not valid one."
class Order(
orderId: String,
invoice: Invoice,
paymentMethod: String?,
products: List<Product>,
customer: Customer,
coupons: List<String>?,
goal: String
)
rentalOrder = RentalOrder(accountType, order, affiliateNumber)
Wunderkind.getInstance().trackRentalPurchase(rentalOrder)
Order: {
orderId: String
invoice: Invoice
paymentMethod: String?
products: [Product]
customer: Customer
coupons: [String]?
goal: String
}
Product: {
productId: String
skuId: String
price: Decimal
quantity: Int64
}
Customer: {
email: String
phone: String
}
let rentalOrder = RentalOrder(accountType: accountType, order: order, affiliateNumber: affiliateNumber)
Wunderkind.shared.trackRentalPurchase(rentalOrder: rentalOrder)
class Order {
orderId: string
invoice: Invoice
paymentMethod: string
products: Product[]
customer: Customer
coupons: string[]
goal: string
}
class Product {
productId: string
skuId: string
price: number
quantity: number
}
class Customer {
email: string
phone: string
}
const rentalOrder = new RentalOrder(accountType, order, affiliateNumber)
Wunderkind.trackRentalPurchase(rentalOrder)
class Order {
String orderId
Invoice invoice
String? paymentMethod
List<Product> products
Customer customer
List<String>? coupons
String goal
}
class Product {
String productId
String skuId
double price
int quantity
}
class Customer {
String email
String phone
}
final rentalOrder = RentalOrder(accountType: accountType, order: order, affiliateNumber: affiliateNumber);
Wunderkind().trackRentalPurchase(rentalOrder);