Gleap
Search…
🎯
Custom events
Gleap custom events allow you to log events at certain key positions in your application. This is super useful to get an even better understanding of what's happening within an application. Custom events do have a name and can contain event specific data as well.
We currently allow a maximum of 1000 events / bug report. If you add more than 1000 events, we will start slicing off the oldest events.

Log an event

The following sample logs an event with the name "User signed in".
1
Gleap.getInstance().logEvent("User signed in");
Copied!

Log an event with attached data

It's possible to attach data to custom events. The data can be viewed later in the bug report.
1
JSONObject data = new JSONObject();
2
try {
3
data.put("usedId", "1242");
4
data.put("name", "Isabella");
5
data.put("skilklLevel", "🀩");
6
} catch (JSONException e) {
7
e.printStackTrace();
8
}
9
Gleap.getInstance().logEvent("User signed in", data);
Copied!
Your events will appear in the activity log of the bug report.
Last modified 1mo ago