Skip to content
Betterlytics

Error tracking: Catch the errors your visitors hit, and see what led to them

Know which bugs hit the most visitors, where in your code they break, and what each visitor did next. Free on every plan, next to your traffic and replays.

2min

Replay lead-up

Keep up to two minutes before an error as a replay, even for visits you don't normally record.

0extension errors

Only your own bugs

Errors from visitors' browser extensions are skipped, and bots are dropped before anything is stored.

1script

One script for everything

Analytics, errors and session replay load from one script tag. Already on Betterlytics? Add one attribute.

0cookies

No cookies, no IPs

Errors are stored without cookies, IP addresses or query strings, so your visitors' privacy stays intact.

From “it doesn’t work” to line 142

Most visitors who hit a bug leave without telling you. Betterlytics shows the line that threw, the browser it happened in, and how often.

On the left, vague reports about the pricing page keep streaming past: the same can't-upgrade email three times, a report that choosing a plan does nothing, a support chat, a blurry screenshot, a guess at the browser, a note saying it works on my machine, a P1 ticket saying upgrades have failed since Monday and a support inbox with 14 unread. On the right, the same bug as one error group: a TypeError thrown in selectPlan at line 142 of pricing.js and called from onClick in plan-card.js, in Chrome on macOS in Denmark, on /pricing, 1,206 times.

Guessing from bug reports

Fixing from the stack trace

See what they did before and after

A stack trace shows where the code broke. The visit around it shows what set it off and what the visitor did next.

A session trail of eight events. Before the error, the visitor landed on the home page, opened /pricing and picked a plan. The TypeError came one second later, thrown in selectPlan at line 142 of pricing.js in Chrome 129 on macOS, on a desktop in Denmark. After it, they reloaded /pricing, picked a plan again, hit the same error and left for /contact instead of upgrading.

What led up to it

Landed on the home page, opened pricing and picked a plan.

Where it broke

Thrown in selectPlan on line 142 of pricing.js, with the browser, OS and country it happened in.

What it did to the visit

Reloaded, hit it again, then left for /contact instead of upgrading.

Work the list together

Statuses are shared with your team, so everyone works from the same list and nobody chases a bug that's already fixed.

Read the dashboard guide
  • Resolve, ignore, unresolve

    Resolve what's fixed and ignore what doesn't matter, so the list only shows the bugs that still need work.

  • See who it hits

    Spot whether an error is growing or fading, and which browsers and devices it hits most.

  • Filter like your analytics

    Filter errors by page, browser, OS, country and more, just like your analytics, to see if a bug only hits some visitors.

  • Step through occurrences

    Flip through every occurrence with its own visit and device, and spot the pattern, like a bug that only shows up on iOS.

Hand the bug to your agent

Your coding agent can look up errors through the built-in MCP server and work on the fix right next to your code.

From complaint to fix in one question

Ask Claude Code, Cursor or any MCP client about a complaint. It looks up the matching error, reads the stack trace and session trail, and opens the file the stack points to.

Works with

And any other client that speaks MCP over HTTP.

Start catching with one attribute

Pick what to catch and copy the snippet. It runs in the same script as your analytics.

Choose what to catch

  • Uncaught errors and rejectionsAnything your code throws without catching, and promises that reject with no handler.Always on
index.html
<script async  src="https://betterlytics.io/analytics.js"  data-site-id="YOUR_SITE_ID"  data-track-errors="true"></script>

Frequently asked questions

What is error tracking?

Error tracking, also called error monitoring, records the JavaScript errors your visitors run into, then groups repeats of the same bug so you can see which ones happen most. Betterlytics catches them with the same script that tracks your pageviews, and keeps the session each one happened in.

Is error tracking free?

Yes. It's on every plan, including the free one. Each error counts as one event toward your monthly limit, like a pageview.

Which errors are captured?

Uncaught exceptions and unhandled promise rejections, each with its stack trace and the page it happened on. You can also capture console.error calls. A failed request is only captured when your code leaves its error unhandled. Failed image and script loads are left out, because ad blockers and flaky connections would flood your list with them.

Does it catch server-side errors?

No. It covers frontend errors, the JavaScript that runs in your visitors' browsers. Errors in your server code, API routes or background jobs aren't captured.

Are errors from browser extensions and bots filtered out?

Yes. The script skips errors whose stack trace points into a browser extension, so a visitor's ad blocker or password manager doesn't show up as your bug. Errors from bots, headless browsers and test tools like Playwright are dropped before they're stored, the same as their pageviews.

Does it work with React, Next.js and Vue?

Yes. The script catches errors on any site, whatever framework it runs. Errors a framework catches itself, such as in a React error boundary or Vue's error handler, are usually logged with console.error instead of thrown, so turn on console.error capture to see those too.

How are errors grouped?

Every occurrence of the same bug lands in one group with a running count, so each bug shows up once in your list instead of every time a visitor hits it. Errors of the same type, thrown from the same place in your code, count as one bug even when their messages differ.

Do you support source maps?

No. Stack traces show the code as the browser ran it, so frames from a minified bundle point into the minified file.

Does error tracking collect personal data?

It uses no cookies, like the rest of Betterlytics. Messages are kept as your code wrote them, so keep personal data out of them, and leave console capture off if your logs can contain it.

Can a broken loop use up my events?

Each page sends at most 10 errors of the same type every 10 seconds, so a loop that throws on every frame stays small. Ignoring a group hides it from the list, but new occurrences still count as events until you fix the cause.

How does it work with session replay?

If a visit with an error was recorded, the error links to its replay, with a red marker at each error on the timeline. You can also keep up to two minutes before every error as a replay, even for visits session replay wouldn't otherwise record.

Catch your first error today

Add the Betterlytics script, or one attribute if you already have it, and errors start showing up in your dashboard. Free on every plan.