Skip to main content

Track events

Campaigns reward events: an order, a top-up, a completed KYC. Send one line where the event happens. The key must match an event set up on your dashboard.

Flyy.sendEvent("order_completed", "499")
Flyy.sendEvent("kyc_done", "1")
Flyy.sendEvent("profile", JSONObject(mapOf("tier" to "gold")))

// with confirmation:
Flyy.sendEvent("order_completed", "499") { /* delivered */ }

Events are queued and retried while offline (WorkManager on Android, a persisted queue on iOS), so it is safe to send from any code path.

Client events vs server events​

Send fromUse for
The app (sendEvent)Engagement: screen visits, feature use, streaks.
Your backend (Flyy partner API)Anything that pays real money or must not be faked: orders, payments, deposits.
warning

A client event can be faked by a modified app. For transactions, your server must be the source of truth.

Analytics events​

trackEvent sends to your extra-events pipeline (the extra_events_base_url in your app config), not to campaigns. If that URL isn't set, the event is dropped with a log line.

Flyy.trackEvent("banner_seen", "home_top")

Listening to the rewards UI​

Flyy.start(this) {
partnerId = "…"
onUiEvent { event -> analytics.log(event.actionEventName, event.campaignID) }
onClosed { refreshBalance() }
}