Attach Custom Data
The widget allows you to attach custom data to the feedback. You can use it to send metadata like role, location, etc.
You can attach custom data to the feedback in two ways:
- JavaScript
- React
Within the <drop-feedback />
component:
<drop-feedback
meta-role="admin"
meta-location="dashboard"
meta-organization="dropfeedback"
/>
Within the <DropFeedback />
component:
import { DropFeedback } from "@dropfeedback/react";
<DropFeedback
meta={{
role: "admin",
location: "dashboard",
organization: "dropfeedback",
}}
/>;
Via a trigger element:
<button
data-feedback-button
data-meta-role="admin"
data-meta-location="dashboard"
data-meta-organization="dropfeedback"
>
Feedback
</button>
The passed data will be displayed in the feedback details in the dashboard.
tip
If you pass the same key both in the <drop-feedback />
component and the trigger element, the value from the trigger element will be used.