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, custom attributes, and purchase events in our Best practices. We also recommend familiarizing yourself with our event naming conventions.
1
braze.logCustomEvent("YOUR-EVENT-NAME");
See the logCustomEvent
documentation for more information.
Adding properties
You can optionally add metadata about custom events by passing a properties object with your custom event.
Properties are defined as key-value pairs. Keys are strings and values can be string
, numeric
, boolean
, or Date
objects.
1
2
3
4
5
6
7
8
9
10
braze.logCustomEvent("YOUR-EVENT-NAME", {
you: "can",
pass: false,
orNumbers: 42,
orDates: new Date(),
or: ["any", "array", "here"],
andEven: {
deeply: ["nested", "json"]
}
});
See the logCustomEvent()
documentation for more information.