For the complete documentation index, see llms.txt. This page is also available as Markdown.

Purchase Tracking

Track completed purchases for analytics and conversion tracking.

Function Signature

fun trackPurchase(
    orderId: String,
    value: Double?,
    currencyCode: String?,
    countryCode: String?,
    additionalInfo: Map<String, String>,
    products: List<ProductItem>?,
    shippingPrice: Double?,
    subtotal: Double?,
)

Parameters

Parameter
Type
Required
Description

orderId

String

Unique identifier for the order/transaction

value

Double?

Total transaction value (defaults to 0.0 if null)

currencyCode

String?

Currency code (defaults to "USD" if null)

countryCode

String?

Country code (defaults to device locale if null)

additionalInfo

Map<String, String>

Additional custom tracking information

products

List<ProductItem>?

List of purchased products

shippingPrice

Double?

Shipping cost for the order

subtotal

Double?

Subtotal before shipping and taxes

ProductItem Structure

Usage Examples

Basic Purchase Tracking

Complete Purchase with Products

Minimal Configuration

Last updated

Was this helpful?