Custom event
// Without properties
Smartlook.instance.track(event: "sample_event")
// With properties
let properties = Properties()
.setProperty("sample", to: "value")
Smartlook.instance.track(event: "sample_event", properties: properties)
Event name restrictions
- Cannot be empty or
null
.- The maximum length is 200 characters.
- Contains only alphanumeric characters and “_”, " ", “.”, “-”.
- Must start with an alphabetic character.
An event with an incorrect
name
will be dropped.
Navigation event
Smartlook.instance.track(navigationEvent: "sample_screen")
Smartlook.instance.track(navigationEvent: "sample_screen", direction: .exit)
Navigation event name restrictions
- Cannot be empty or
null
.- The maximum length is 200 characters.
- Contains only alphanumeric characters and “_”, " ", “.”, “-”.
- Must start with an alphabetic character.
An event with an incorrect
name
will be dropped.
Global event properties
Smartlook.instance.eventProperties["sample_global_property"] = "global_value"
Properties mutability
All event properties are now mutable. If immutability of certain properties is needed it must be ensured on the client-side.