Tracking Custom Events
You can record custom events in Braze to learn more about your app’s usage patterns and to segment your users by their actions on the dashboard.
Before implementation, be sure to review examples of the segmentation options afforded by Custom events vs. Custom attributes vs Purchase events in our Best Practices section, as well as our notes on event naming conventions.
Adding A Custom Event
1
[[Appboy sharedInstance] logCustomEvent:@"YOUR_EVENT_NAME"];
1
Appboy.sharedInstance()?.logCustomEvent("YOUR_EVENT_NAME")
Adding Properties
You can add metadata about custom events by passing an NSDictionary
populated with NSNumber
, NSString
, or NSDate
values.
1
[[Appboy sharedInstance] logCustomEvent:@"YOUR_EVENT_NAME" withProperties:@{@"key1":"value1"}];
1
Appboy.sharedInstance()?.logCustomEvent("YOUR_EVENT_NAME", withProperties:["key1":"value1"])
See our class documentation for more information.
Reserved Keys
The following keys are RESERVED and CANNOT be used as Custom event properties:
time
event_name
Additional Information
- See the method declaration within the
Appboy.h
file. - In addition, you may refer to the logCustomEvent Documentation for more information.