Skip to main content

📕 Custom data

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.

cordova.plugins.GleapPlugin.attachCustomData({
test1: "Battle",
data2: "Unicorn",
});

Append custom data

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

cordova.plugins.GleapPlugin.setCustomData("email", "[email protected]");

Remove custom data

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

cordova.plugins.GleapPlugin.removeCustomData("email");

Clear all custom data

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

cordova.plugins.GleapPlugin.clearCustomData();