SDK and configuration

Open the widget from code, pre-fill the reporter and attach your own metadata.

Updated October 2026

Methods

MethodWhat 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.versionThe 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.

AttributeDescription
data-projectRequired. Your project API key.
data-colorAccent colour of the button and UI.
data-positionbottom-right, bottom-left, middle-right, middle-left, top-right or top-left.
data-textLabel on the button (default "Report issue").
data-console / data-networkCapture console logs / failed network requests.
data-open-on-loadOpen the widget as soon as the page loads.
data-use-native-screenshotUse 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.