đ Custom data
Tags: JavaScript, React, Vue, Angular, Website, Web App
caution
If you are trying to set data for ticket attributes, please check our đŧ Ticket attributes.
Add custom dataâ
In many situations you may want to attach custom data to tickets in order to better understand the context. You can add custom data incrementally or all at once. Any simple JSON object can be attached.
Gleap.attachCustomData({
test1: "Battle",
data2: "Unicorn",
});
Append custom dataâ
If you want to attach custom data incrementally you can do so with the setCustomData
method.
Gleap.setCustomData("email", "[email protected]");
Remove custom dataâ
Remove custom data key value pairs by calling the following method.
Gleap.removeCustomData("email");
Clear all custom dataâ
It's possible to clear all attached custom data by calling the following method.
Gleap.clearCustomData();