---
title: "Android SDK: Track events"
description: "Track custom events and attach event properties with the Gleap Android SDK. Follow the integration code examples."
url: https://docs.gleap.ai/en/articles/483-android-sdk-track-events
collection: "Android"
updated: 2026-11-01
language: en
---

# Android SDK: Track events

Track custom events and attach event properties with the Gleap Android SDK. Follow the integration code examples.

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.

## Track an event

The following sample logs an event with the name "User signed in".

```java
Gleap.getInstance().trackEvent("User signed in");
```

## Track an event with attached data

It's possible to attach data to custom events. The data can be viewed later in the bug report.

```java
JSONObject data = new JSONObject();
try {
    data.put("userId", "1242");
    data.put("name", "Isabella");
    data.put("skillLevel", "🤩");
} catch (JSONException e) {
    e.printStackTrace();
}
Gleap.getInstance().trackEvent("User signed in", data);
```

Your events will appear in the activity log of the bug report.

## Event delivery

With SDK **v19.0.0** and newer, if sending fails (network error, timeout, 408, 429 or 5xx), events stay queued and are retried with a backoff from 3 s up to 60 s, or after the `Retry-After` the server sends (up to 5 minutes). Other error answers drop the batch. At most 500 events are queued.

## Related

- [Android SDK setup](https://docs.gleap.ai/en/articles/466-android-sdk-setup.md)
- [Android SDK: User identity](https://docs.gleap.ai/en/articles/467-android-sdk-user-identity.md)
- [Android SDK: Callbacks](https://docs.gleap.ai/en/articles/468-android-sdk-callbacks.md)
- [Android SDK: Frontend tools](https://docs.gleap.ai/en/articles/469-android-sdk-frontend-tools.md)
- [Android SDK: Forms](https://docs.gleap.ai/en/articles/470-android-sdk-forms.md)
