docs · by hand · script tag
@vinktarhq/browser
The browser SDK with no build step: one tag, and window.vinktar for the rest. Both jobs from one package: the same key sends events and errors, and identify() joins them to a person.
or ask your agent
Connected over MCP, your agent reads the install guide, fetches the key, wires identify, defines the events it adds and checks what arrived.
Install and initialise
<script
src="https://unpkg.com/@vinktarhq/browser/dist/vinktar.min.js"
data-key="vnk_pk_YOUR_KEY"
defer
></script>
<script>
// After sign-in; on logout, window.vinktar.reset().
window.addEventListener('load', () => {
window.vinktar.identify('user_123', { email: 'dana@example.com' });
});
</script>Check it worked
Reload the page. Pageviews and uncaught errors need nothing more; window.vinktar has track, identify, reset and captureException.
Joining events and errors to a person
Anonymous activity is kept under the device. The first identify() with a user id binds that device to the person, and everything before it resolves to them retroactively. A device binds once; call reset() on logout so the next person gets a fresh one. The full rules are in api.md.