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

logCustomEvent method can be used to log user events. Any params associated with the events is passed to the method as a flatmap.

Castled.sharedInstance.logCustomAppEvent("Test Event", params: ["Int": 100, "DOB": "12-16-2000", "Name": "Antony"])

These events can be used as the trigger events for your push, inapp and inbox campaigns or workflows. Also can be used to create user segments for your future campaigns.