Set up
npm i pagerlesssrc/main.ts
import { init } from "pagerless/browser";
init({ key: import.meta.env.VITE_PAGERLESS_KEY, service: "web" });What it catches
- Uncaught errors and unhandled rejections in the page, grouped by path.
- Failing fetch calls (5xx, 429, network) from pagerless 0.2.0.
- Sent when the tab is hidden.
Questions
Is it safe to ship the key?
Yes. Ingest keys can only send events. Use a separate key for the browser so you can revoke it alone.