Once the script loads, the widget exposes one global function:Documentation Index
Fetch the complete documentation index at: https://docs.tryproduck.com/llms.txt
Use this file to discover all available pages before exploring further.
| Command | Arguments | What it does |
|---|---|---|
identify | { userId?, email?, name? } | Attach the current user’s identity to their feedback. |
trigger | — | Open the widget from your own UI. |
on | eventName, callback | Listen for submit or close. |
destroy | — | Remove the widget and its listeners from the page. |
Identify your users
Tell Produck who’s giving feedback so each submission ties back to a real user instead of being anonymous. Callidentify once you know who they are — typically right after login.
Open the widget from your own UI
Wire up your own “Give feedback” button withtrigger:
Listen for events
React when a user submits or dismisses the widget — for example, to show a thank-you toast.| Event | Fires when |
|---|---|
submit | The user successfully submits feedback. |
close | The user closes the widget without submitting. |
Clean up on logout
Calldestroy to remove the widget when a user’s session ends. On shared devices, this
keeps the next user from seeing the previous one’s identity.