Browser SDK
One script tag for any website or client-rendered app.The default. If you can edit your HTML, this is all you need.Add the snippet
index.html — html<script src="https://vigill.dev/v.js" data-vigil-key="vg_pub_YOUR_KEY"></script>
What it captures automatically
These arrive with zero extra code — the unhandled failures that would otherwise crash or vanish.- Uncaught JavaScript errors (window.onerror).
- Unhandled promise rejections.
- Failed fetch() and XMLHttpRequest calls to other origins — the "it is not your bug, the API is down" signal.
When to capture manually
When you wrap something in try/catch and handle it yourself, the error never reaches window.onerror, so Vigil never sees it. Report those with window.Vigil.captureError so a swallowed error is still visible.anywhere in your app — jstry {await savePreferences();} catch (err) {// handled so the UI can recover — but still worth knowing aboutwindow.Vigil?.captureError(err, { tags: { area: 'settings' } });showToast('Could not save, try again');}
Configuration
Everything is a data- attribute on the same tag — no build step, no config file.index.html — html<script src="https://vigill.dev/v.js"data-vigil-key="vg_pub_YOUR_KEY"data-vigil-environment="production"data-vigil-release="1.4.0"></script>
What you get
- No API to call for the common case — the tag captures everything unhandled.
- window.Vigil.captureError(error, { tags? }) — report a handled error.
- Fails silent and circuit-breaks: it can never slow down or break your page.