AppsFlyerPurchaseEvent

data class AppsFlyerPurchaseEvent(val name: String, val revenue: Double, val currency: String, val contentId: String? = null, val contentType: String? = null, val quantity: Int? = null, val orderId: String? = null, val parameters: Map<String, AnalyticsValue> = emptyMap()) : Event(source)

A purchase as AppsFlyer's predefined af_purchase, with the revenue under af_revenue, which is what AppsFlyer counts as revenue and forwards to ad networks for ROAS.

A final class, so an app event can't be one. The app's AppsFlyer factory builds one from its own event and sends it through PurchaseEventTracker.

Constructors

Link copied to clipboard
constructor(name: String, revenue: Double, currency: String, contentId: String? = null, contentType: String? = null, quantity: Int? = null, orderId: String? = null, parameters: Map<String, AnalyticsValue> = emptyMap())

Properties

Link copied to clipboard

af_content_id.

Link copied to clipboard

af_content_type.

Link copied to clipboard

af_currency, an ISO 4217 code.

Link copied to clipboard
open override val name: String

Usually the app event's own. It isn't sent: AppsFlyer receives af_purchase.

Link copied to clipboard

af_order_id.

Link copied to clipboard
open override val parameters: Map<String, AnalyticsValue>

Sent alongside the predefined values; don't use their keys. Usually the app event's own.

Link copied to clipboard

af_quantity.

Link copied to clipboard

af_revenue.

Functions

Link copied to clipboard

The event values for af_purchase: AppsFlyerPurchaseEvent.parameters, then the predefined ones. An absent optional is left out rather than sent empty. Public because a custom AppsFlyerEventTracker almost always needs it.