With your custom widget, there's two ways of sending feedback.
npm install @feedbackfarm/core
// index.jsx
import { sendFeedback } from "@feedbackfarm/core";
async function handleSubmitFeedback() {
const result = await sendFeedback(
projectId,
feedback,
type,
identifier,
pageName
);
}
// JS file
fetch('<https://api.feedback.farm/api/feedbacks/add>', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ projectId, feedback, identifier, type, pageName }),
});
If you want to have a default React widget have a look here React widget or if you have a HTML website click here.