---
title: "Ionic Capacitor SDK: Custom data"
description: "Attach custom data to customer feedback with the Gleap Ionic Capacitor SDK. Follow the integration code examples."
url: https://docs.gleap.ai/en/articles/576-ionic-capacitor-sdk-custom-data
collection: "Ionic / Capacitor"
updated: 2026-11-01
language: en
---

# Ionic Capacitor SDK: Custom data

Attach custom data to customer feedback with the Gleap Ionic Capacitor SDK. Follow the integration code examples.

## Add custom data

In many situations you may want to attach custom data to feedback items in order to better understand the context. You can add custom data incrementally or all at once. Any simple JSON object can be attached.

```javascript
Gleap.attachCustomData({
  data: {
    test1: "Battle",
    data2: "Unicorn",
  },
});
```

## Append custom data

If you want to attach custom data incrementally you can do so with the `setCustomData` method.

```javascript
Gleap.setCustomData({
  key: "email",
  value: "lukas@bugbattle.io",
});
```

## Remove custom data

Remove custom data key value pairs by calling the following method.

```javascript
Gleap.removeCustomData({
  key: "email",
});
```

## Clear all custom data

It's possible to clear all attached custom data by calling the following method.

```javascript
Gleap.clearCustomData();
```

## Related

- [Ionic Capacitor SDK setup](https://docs.gleap.ai/en/articles/563-ionic-capacitor-sdk-setup.md)
- [Ionic Capacitor SDK: User identity](https://docs.gleap.ai/en/articles/564-ionic-capacitor-sdk-user-identity.md)
- [Ionic Capacitor SDK: Frontend tools](https://docs.gleap.ai/en/articles/565-ionic-capacitor-sdk-frontend-tools.md)
- [Ionic Capacitor SDK: Track events](https://docs.gleap.ai/en/articles/566-ionic-capacitor-sdk-track-events.md)
- [Ionic Capacitor SDK: Track pages](https://docs.gleap.ai/en/articles/567-ionic-capacitor-sdk-track-pages.md)
