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.

Adding A Custom Event

1
Appboy.getInstance(YOUR_ACTIVITY.this).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(YOUR_ACTIVITY.this).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.

WAS THIS PAGE HELPFUL?
New Stuff!