Prerequisites
Tracking needs to be enabled during SDK initialization for this feature to work. Set CastledConfigs.enableTracking to true to start tracking.

CastledNotifications.logEvent can be used to log user events within your app. Properties associated with the events is passed to the method as a flatmap.

// User event without properties
CastledNotifications.logEvent("upgraded_to_pro")

// User event with properties
CastledNotifications.logEvent("cart_checked_out", {
  value: 1042.56,
  isPrime: true,
  deliveryOn: "09-30-2023",
})

These events can be used as the trigger events for your push, inapp and inbox campaigns or workflows. Also they can be redirected to your data warehouse, which can be used for analytics or creating user segments for future campaigns.