Event Tracking
Purchase Event Tracking
Loomit SDK supports tracking purchase events. This feature allows you to send purchase information to the Loomit platform for analytics and segmentation purposes.
Purchase Event Structure
A purchase event consists of the following fields:
Field | Type | Required | Description |
---|---|---|---|
amount | Double | Yes | The purchase amount |
currency | String | Yes | The currency code in ISO 4217 format (e.g., "USD", "EUR") |
sku | String | No | Product identifier, important for segmentation and tracking |
name | String | No | Product name, used for tracking purposes |
Best Practices
- Always include the
amount
andcurrency
fields as they are required - Use a consistent format for your
sku
values to ensure proper segmentation - Track all successful purchases to get comprehensive analytics
- Use the same currency code format across your application
Implementation
XMediatorAds.EventTracker.Track(
new PurchaseEvent(
amount: 1.99,
currency: "USD",
sku: "com.sku.myproduct",
name: "My Product Name"
)
);