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 Analytics Overview, as well as our notes on event naming conventions.
Adding A Custom Event
1
Appboy.getInstance(context).logCustomEvent(YOUR_EVENT_NAME);
See the Javadoc for more information.
Adding Properties
You can add metadata about custom events by passing a Braze Properties object with your custom event.
Properties are defined as key value pairs. Keys are String
objects and values can be String
, int
, float
, boolean
, or Date
objects.
1
2
3
AppboyProperties eventProperties = new AppboyProperties();
eventProperties.addProperty("key", "value");
Appboy.getInstance(context).logCustomEvent(YOUR_EVENT_NAME, eventProperties);
Reserved Keys
The following keys are RESERVED and CANNOT be used as Custom event properties:
time
product_id
quantity
event_name
price
currency
See the Javadoc for more information.