AdjustRevenueEvent

data class AdjustRevenueEvent(val name: String, val revenue: Double, val currency: String, val deduplicationId: String? = null, val parameters: Map<String, AnalyticsValue> = emptyMap()) : Event(source)

A purchase as Adjust counts revenue: a tokened event that also carries the amount, so Adjust attributes it to the campaign that brought the user in.

A final class, so an app event can't be one. The app's Adjust factory builds one from its own event and sends it through RevenueEventTracker, with the purchase's token.

For ad revenue from a mediation SDK, see AdjustAdRevenueEvent, which Adjust models as a different call.

Constructors

Link copied to clipboard
constructor(name: String, revenue: Double, currency: String, deduplicationId: String? = null, parameters: Map<String, AnalyticsValue> = emptyMap())

Properties

Link copied to clipboard

ISO 4217 code, as Adjust expects it.

Link copied to clipboard

The transaction id, so a purchase that is reported twice — a retried callback, a restored receipt — is counted once. Adjust drops a revenue event whose id it has already seen. Absent by default, which counts every report.

Link copied to clipboard
open override val name: String

Usually the app event's own. It isn't sent: Adjust identifies the event by its token.

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

Sent as callback parameters, as on every other Adjust event. Usually the app event's own.

Link copied to clipboard

Functions

Link copied to clipboard
fun Event.toAdjustEvent(eventToken: String): AdjustEvent

Builds the Adjust payload for an event under eventToken, carrying the event's parameters as callback parameters. Public because a custom AdjustEventTracker almost always needs it.

fun AdjustRevenueEvent.toAdjustEvent(eventToken: String): AdjustEvent

Builds the Adjust payload under eventToken: the revenue, the deduplication id when there is one, and AdjustRevenueEvent.parameters as callback parameters. Public because a custom AdjustEventTracker almost always needs it.