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.

ParameterTypeDescription
eventstringEvent name, e.g. signup, subscription_started, workout_completed.
propertiesmapOptional. 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>): void
invitebase.track('subscription_started', { plan: 'paid', value: 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

On this page