Events

Names, properties, and usage in segments and workflows

PreviousNext

Events

Events are the primary signals from your app. Use NuxieSDK.shared.track.

Shape

json
{
  "name": "purchase_completed",
  "properties": {
    "sku": "pro_annual",
    "price": 59.99,
    "currency": "USD"
  },
  "timestamp": "2025-01-01T12:34:56Z"
}

Common examples (illustrative)

  • app_opened
  • onboarding_completed {method}
  • viewed_paywall {placement, paywallId}
  • purchase_started {sku}
  • purchase_completed {sku, price, currency}
  • trial_started {sku}
  • trial_ending_soon {daysRemaining}

Usage

  • Triggers: start a workflow when an event occurs.
  • Segmentation: include/exclude users based on event history or properties.
  • Analytics: correlate paywall shows with downstream conversions.

Tracking API

swift
// Fire-and-forget
NuxieSDK.shared.track("app_opened")
 
// With properties
NuxieSDK.shared.track("feature_used", properties: ["feature": "editor"])
 
// Observe immediate outcomes
NuxieSDK.shared.track("paywall_shown", properties: ["id": "paywall_summer_launch"]) { result in
  switch result {
  case .noInteraction: break
  case .flow(let completion): print(completion.outcome)
  case .failed(let error): print(error)
  }
}

Keep your team’s event names short, consistent, and documented.