The segment you couldn't build before

"Users who hit a JavaScript error in the last 30 days but haven't converted yet."

That's a segment every product team wants and almost none of them have. Building it from scratch requires instrumenting window.onerror, sanitizing whatever ends up in error messages before it hits your analytics warehouse, rolling dedup logic, wiring up consent gates, and getting engineering time to ship and maintain the whole thing. Most teams quietly skip it and keep flying blind — which means frustrated users leave without ever opening a support ticket, and product teams never see the correlation.

Onboardics captures this for you automatically, the moment the snippet loads. No instrumentation, no engineering ticket, no schema. Pair it with an audience segment and you can run a targeted modal — "Hit a snag? Our team is on standby" — to exactly the users sliding toward frustration churn.

How it works

Step 1

Hooks two browser events

The snippet installs window.addEventListener('error', ...) and window.addEventListener('unhandledrejection', ...). Uses addEventListener rather than assignment, so your own error handlers keep working alongside it.

Step 2

Redacts PII in-browser

Nine regex patterns strip Bearer tokens, API keys, query-string secrets, emails, UUIDs, long numeric IDs, credit-card-like sequences, phone numbers, and file paths. The redaction runs before the event is queued — nothing sensitive leaves the browser.

Step 3

Deduplicated, capped, emitted

Errors are deduped on message + file + line + column (so a repeating error doesn't spam your events table) and capped at 10 per session. Everything else flows through the same /api/events pipeline as your clicks and page views.

Segments this unlocks

What gets redacted

Every error message and stack trace passes through a 9-pattern chain before the event is queued. The redaction runs in-browser, so redacted values never cross the wire.

PatternMatchesReplaced with
Bearer tokensBearer eyJ...[TOKEN]
Provider API keyssk_live_*, pk_*, AKIA*, AIza*, ghp_*[KEY]
Query-string secrets?token=, ?api_key=, ?auth=, ?password=?[PARAM]=[REDACTED]
Email addressesAny name@domain.tld[EMAIL]
UUIDsStandard v1-v5 UUID formats[UUID]
Long numeric IDs9+ consecutive digits in URLs or messages[ID]
Credit-card-like sequences13-19 digit sequences (optionally with dashes/spaces)[CC]
Phone numbersE.164 + common US formats[PHONE]
Home-directory paths/Users/<name>, /home/<name>/Users/[USER]

Patterns are ordered most-specific first so tokens aren't mis-classified as generic IDs. The full regex chain lives in ERROR_REDACTORS inside v1.js — it's not obfuscated, you can audit it.

Default on, one-line opt-out

Error capture is on by default because the value of the pre-support-ticket signal far outweighs the noise. If your compliance posture requires it off, disable it in one line:

window.__onboardics.setErrorCapture(false);

The preference persists to localStorage so it survives reloads. Setting it back to true re-enables capture. Consent gating also applies: if setConsent(false) was called (or Termly auto-detection reads declined consent), error events are dropped along with everything else.

What errors look like in your dashboard

Error events show up on the Events page with event_type = js_error and the following metadata:

AI Insights picks up a spike in error events as an anomaly and surfaces it on the Events Anomaly card without being asked. CSV export works the same way as every other event type.

Pricing

Automatic JS error capture is available on all tiers including Free. It's part of the tracking snippet — no plan-gate, no enterprise add-on, nothing to turn on. Install /v1.js and the signal starts flowing in.

Start free →    Book a Demo