Package-level declarations

Types

Link copied to clipboard
data class AppsFlyerAdRevenueEvent(val name: String, val monetizationNetwork: String, val mediationNetwork: MediationNetwork, val revenue: Double, val currency: String, val parameters: Map<String, AnalyticsValue> = emptyMap()) : Event

Ad revenue reported by a mediation SDK, as AppsFlyer's ad-revenue API takes it rather than as an in-app event. The fields are AFAdRevenueData's.

Link copied to clipboard

AppsFlyer's lifecycle and identity, over an AppsFlyerLib the consumer has initialised.

Link copied to clipboard

Events only. AppsFlyer keeps no attributes of a user or a session, so there is nothing for a Property to be set on; register this provider without properties.

Link copied to clipboard
fun interface AppsFlyerEventTracker

One pending call to AppsFlyer on behalf of one event.

Link copied to clipboard

Turns an event into the AppsFlyer calls it should produce — or declines it.

Link copied to clipboard
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

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.

Link copied to clipboard
data class AppsFlyerSubscribeEvent(val name: String, val revenue: Double, val currency: String, val parameters: Map<String, AnalyticsValue> = emptyMap()) : Event

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

Link copied to clipboard

Asks each factory in order and takes the first answer that is not a decline.

Link copied to clipboard

Logs any event under its own name with its parameters as event values. Claims everything, so it only belongs last in a chain — anything after it is unreachable.

Fails on any event that reaches it. Put it last in a chain to turn an event nobody wired up into a loud failure rather than a silent no-op.

Properties

Link copied to clipboard

The value as AppsFlyer should receive it. AppsFlyer event values are JSON, so numbers and booleans go across as themselves rather than as text — af_revenue in particular has to arrive as a number for AppsFlyer to count it as revenue.

Functions

Link copied to clipboard

Builds the AppsFlyer payload for ad revenue. Public because a custom AppsFlyerEventTracker almost always needs it.

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.

The event values for af_subscribe: AppsFlyerSubscribeEvent.parameters, then the predefined ones. Public because a custom AppsFlyerEventTracker almost always needs it.

Event parameters as AppsFlyer event values; see asAppsFlyerValue.