Skip to content

Get started

Get a public key, add the tracker, and watch errors land. No account needed to start.

1. Get a public key

Every event is tagged with a public key (vpk_ prefix). It is built to live in browser code: it can only send logs, never read or change anything, so shipping it to the client is safe.

Fastest, no account. Install the CLI and start a trial. It provisions a project and prints your key with a ready-to-paste snippet:

bash
npm install -g vantmetry-cli@latest
vant trial

The 14-day trial needs no signup. Link it to an account whenever you want with vant claim your@email.com. See the CLI docs.

With the dashboard. Prefer a UI? Start a free 14-day trial with one email field, then open project settings and create a key.

Use your vpk_ key in place of YOUR_PUBLIC_KEY below.

2. Add the tracker

Pick the option that matches your site. Both start capturing uncaught errors, unhandled promise rejections, and console.error automatically, with no handlers to write.

Plain HTML, no build step

Add one tag to your <head>:

html
<script
  src="https://cdn.vantmetry.com/tracker.js"
  data-vantmetry-key="YOUR_PUBLIC_KEY"
></script>

npm package

For bundled apps (React, Vue, Svelte, Angular):

bash
npm install vantmetry
typescript
import { init } from 'vantmetry';

init({ publicKey: 'YOUR_PUBLIC_KEY' });

That is the minimum. For the full logger API, framework integrations, and options, see the Tracker section. Framework-specific setup lives on the React, Next.js, Vue, SvelteKit, Angular, and WordPress pages.

3. Trigger a test error

Force a classic crash somewhere that runs on the page, reading a property off data that turned out to be null:

javascript
const user = JSON.parse('null');
console.log(user.name); // Cannot read properties of null

Load the page. The tracker catches the uncaught error and sends it to the ingestor. Nothing about it touched your server, which is exactly the kind of error that normally goes unseen.

4. See your errors

From the terminal, run vant recent to print your latest events. No account needed.

If you signed up for the dashboard, open the Issues view. Your error is there, grouped by fingerprint, with how often it fired and how many sessions it hit. Click it for the resolved stack trace and the browser, OS, and device of the session that hit it. See the Dashboard section for what each view shows.

Next steps

  • Readable stack traces: source maps are resolved automatically, with no upload step.
  • Get alerted: point a webhook at your project so an error spike or downtime finds you instead of you watching a dashboard.
  • Query from the terminal: the CLI runs read-only SQL against your error data.
  • Understand the internals: How it works covers delivery, PII masking, and what gets captured.
  • Explore locally: run the local demo in Docker to poke at the tracker and dashboard with sample errors.