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

# iOS SDK: Track events

Track custom events and attach event properties with the Gleap iOS 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".

```javascript
Gleap.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.

```javascript
Gleap.trackEvent("User signed in", withData: ["userId": 1242, "name": "Isabella"])
```

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

- [iOS SDK setup](https://docs.gleap.ai/en/articles/434-ios-sdk-setup.md)
- [iOS SDK: User identity](https://docs.gleap.ai/en/articles/435-ios-sdk-user-identity.md)
- [iOS SDK: Callbacks](https://docs.gleap.ai/en/articles/436-ios-sdk-callbacks.md)
- [iOS SDK: Frontend tools](https://docs.gleap.ai/en/articles/437-ios-sdk-frontend-tools.md)
- [iOS SDK: Forms](https://docs.gleap.ai/en/articles/438-ios-sdk-forms.md)
