Events
track — record the events that qualification gates evaluate
track
Records an event that qualification gates evaluate. Fire-and-forget: events are queued locally, batched, and retried with idempotency keys — track never blocks your UI, never throws, and never double-counts on retry. Events recorded before identify bind to the anonymous ID and count toward qualification after the merge.
If a referral code has been captured and not yet attached, the SDK attaches it automatically — the signup event is what advances a referral from clicked to signed_up.
| Parameter | Type | Description |
|---|---|---|
event | string | Event name, e.g. signup, subscription_started, workout_completed. |
properties | map | Optional. Properties gate conditions can restrict on (e.g. { plan: 'paid' }). Numeric value/count properties sum toward a condition's target. |
invitebase.track(event: string, properties?: Record<string, unknown>): voidinvitebase.track('subscription_started', { plan: 'paid', value: 1 });Invitebase.track(_ event: String, properties: [String: Any]? = nil)Invitebase.track("workout_completed", properties: ["count": 1])fun Invitebase.track(event: String, properties: Map<String, Any>? = null)Invitebase.track("workout_completed", mapOf("count" to 1))track(event: string, properties?: Record<string, unknown>): voidconst invitebase = useInvitebase();
invitebase.track('signup');static void Invitebase.track(String event, [Map<String, Object?>? properties])Invitebase.track('workout_completed', {'count': 1});Prefer to send qualifying events from your backend instead? Use the REST events endpoint with your secret key, or connect a RevenueCat, Adapty, or Stripe integration — gates treat all sources identically. See Custom event gates for choosing between client and server events.
What's next
getCampaignInfo and getReferrerProgress — the offer and current standing.
RewardsgetRewards, hasReward, and claimReward — the reward ledger.
ObserversReact to reward, referral-state, and tier-progress changes.
React Native hooksThe hooks-first layer — useInvitebase, useRewards, and more.