Yaplet automatically captures browser and device metadata with every bug report. But the most useful debugging context is often specific to your application: which user was logged in, which plan they're on, which order they were looking at. This data doesn't exist in the DOM — you have to push it yourself via the SDK.
Attach application state to a ticket
Use Yaplet.setTicketAttribute(). This is the call to reach for: each key-value pair you set here travels with the next bug report and lands on the ticket.
Yaplet.setTicketAttribute("userId", "u_abc123");
Yaplet.setTicketAttribute("plan", "pro");
Yaplet.setTicketAttribute("orderId", "ORD-78234");
Yaplet.setTicketAttribute("region", "eu-west-1");
Call these after Yaplet.initialize() and again whenever the relevant state changes — after a user logs in, upgrades their plan, or opens a different order. Setting the same key again replaces the previous value.
Where ticket attributes appear
In the bug report ticket on your board, the attributes you set appear together with the visitor's own answers in the ticket's detail panel, alongside the screenshot, console logs and device metadata. Keep the keys short and readable — they are shown to your team exactly as you name them.
Custom data about the visitor
Ticket attributes describe this report. If you instead want to store lasting facts about the person — their plan, their account ID, their signup date — pass them as custom data when you identify the visitor. This data lives on the visitor's profile, where your team can see it on every conversation and ticket they ever open, and where you can segment on it.
Yaplet.identify("u_abc123", {
name: "Jane Doe",
email: "[email protected]",
customData: {
plan: "pro",
signupDate: "2025-03-14",
cartValue: 149.99,
},
});
Call Yaplet.clearIdentity() on logout, so the previous user's profile is not still attached when the next person signs in on the same browser.
Which one should you use?
Use ticket attributes for anything that describes the moment the bug happened — the order being viewed, the feature flag that was on, the last action taken. Use identify custom data for anything that describes the person and stays true between visits. If in doubt, ticket attributes are the safer choice for debugging: they are pinned to the exact report your team is reading.