SDK and configuration
Open the widget from code, pre-fill the reporter and attach your own metadata.
Updated October 2026
Methods
| Method | What it does |
|---|---|
Pinmarks.open() | Opens the widget panel. |
Pinmarks.setUser(user) | Pre-identifies the reporter and hides the name/email fields. Pass null to clear. |
Pinmarks.setMetadata(obj) | Attaches custom metadata to new issues. Pass null to clear. |
Pinmarks.destroy() | Removes the widget from the page, for example when a single-page app navigates away. |
Pinmarks.version | The widget version string. |
Custom metadata is a plan feature
Metadata is only stored when Settings → Developer tools → Custom metadata is switched on for the project (Agency plan).
Pre-identify the reporter
javascript
Pinmarks.setUser({ name: 'Jane Smith', email: 'jane@acme.com' });Pinmarks.setMetadata({ plan: 'pro', accountId: 'acct_123' });// Or set it before the widget script loads:window.PinmarksConfig = {user: { name: 'Jane Smith', email: 'jane@acme.com' },};
Where settings live
Button colour, text, placement, who sees the button, console and network capture and the forms are all controlled from the dashboard (Project → Widget) and always take priority. The data-* attributes below are only a fallback that is used if the widget cannot load your project settings.
| Attribute | Description |
|---|---|
data-project | Required. Your project API key. |
data-color | Accent colour of the button and UI. |
data-position | bottom-right, bottom-left, middle-right, middle-left, top-right or top-left. |
data-text | Label on the button (default "Report issue"). |
data-console / data-network | Capture console logs / failed network requests. |
data-open-on-load | Open the widget as soon as the page loads. |
data-use-native-screenshot | Use the browser's own screen capture (asks the reporter for one-time permission). Always applies, even when settings load. |
Still stuck?
Email support@pinmarks.io and we'll get back to you within one business day.
