Errors
Errors collects the JavaScript errors visitors run into on your pages and groups them, so a bug that happens a thousand times is one row with its count, trend, and pages. It uses a script of its own, e.js, which only sites with Errors on load. Errors never count toward your plan’s usage.
Where to find it
In a site, open Site › Errors in the sidebar, or press G then X. Its settings are in Settings › Errors. Errors is off until a workspace admin turns it on; the sample site harbor.example in the live demo shows what it looks like.
Set up Errors
In the site, open Settings › Errors. Under Errors, turn on Capture errors and select Save changes. Only workspace admins can.
Leave When e.js starts on Wait for consent, the default.
Open Add e.js and put its tag on every page, next to the tracking script. Like it, e.js runs once the page has been read, so it misses errors from scripts that ran before it.
Have your consent banner run the consent line below when a visitor agrees. It works before or after e.js loads. If you record replays too, run window.lyli?.record?.() in the same place.
<script defer src="https://app.lyli.io/e.js" data-site="s_k3m9x2p7qa"
data-consent="wait"></script>window.lyliConsent = true; window.lyli?.errors?.();The tag carries your settings. Whenever you change When e.js starts, Only example.com’s own scripts, or Also count scripts from, copy the tag from Add e.js again and replace the one on your pages. Until you do, e.js follows the old tag, and we check each report against your saved settings too, so the stricter of the two applies.
If a visitor withdraws consent, set window.lyliConsent = false and e.js stops sending. Serving the tracking script through your own domain? Once Errors is on, Settings › Install › Via your domain forwards e.js too and shows its tag.
Which errors are captured
- Uncaught errors, unhandled promise rejections, and the errors you send with
lyli.error(). - Only your site’s own scripts: those on the page’s own address, with or without www, and the addresses you add under Also count scripts from, like a CDN. Those scripts need
crossorigin="anonymous"on their tag and a matching CORS header, or browsers pass on only “Script error.” Errors from other addresses’ scripts, like extensions, ads, and chat widgets, and errors we can’t place are left out. To count every script’s errors, turn off the switch that reads “Only example.com’s own scripts”, with your domain in it. Both settings are in e.js’s tag, so copy it again after you change them. - At most 10 different errors per page view, each once. Messages are cut at 500 characters and stacks at 2,000.
- Nothing is sent from a browser that opted out or one driven by automation. Bots are left out and counted with the other bots, and errors on addresses your site doesn’t count are turned away, as page views are.
Send your own
For errors your code catches, which never reach the browser’s own handler, call lyli.error(). It comes with e.js; the ?. keeps your code safe on a page where e.js didn’t load.
try {
await startTrial(plan);
} catch (err) {
window.lyli?.error?.(err, { plan: plan.id }); // the second part is optional
throw err;
}The details in the second part are optional: at most 10, each up to 200 characters. We check them but don’t keep them for now, since no screen shows them yet. Even so, never put anything in them that identifies a person: no names, email addresses, or account IDs.
Read Errors
Errors opens on the period’s four totals:
lyli.error() included, and ignored ones left out.The chart shows errors a day (or a week), with each group’s first day marked New. Under it, a line says whose errors they are: visitors who agreed, unless you capture without asking, and only your own scripts. Then Grouped lists every group with its name and message, the period’s days as a spark, Occurrences, Pages, First seen, and Last seen. Sort by any column, and search it with /.
Filter takes one of page, browser, system, device, or country at a time; picking another replaces it. Under a filter other than page, pages aren’t counted. There’s no comparison, and the Share menu has Copy link and Download CSV: Errors isn’t in share links, since error text can carry your code’s paths and details.
One error’s page
Select a group to open its page: the message in full, how it was caught (Uncaught error, Unhandled rejection, or Sent with lyli.error()), its Occurrences, Pages, First seen, and Last seen, and the errors a day.
- Stack trace: the latest one, scrubbed, with the frame the group is grouped on marked. It shows your code as the browser ran it: we don’t read source maps, so minified names stay as they are, marked Minified.
- Where it happens: its pages, browsers, systems, devices, and countries over the whole period, whatever the filter.
- Examples: eight at first, then 50 more at a time, each with its time, the visitor’s ID, page, location, and device. Each links to its visit in Sessions, and to its replay at the moment of the error where the visit has one you can watch.
Examples need Individual visits, which is off by default for every site. While it’s off, the page shows totals: the counts, the stack, and where it happens, with first and last seen as days.
With Individual visits on, a visit’s errors are steps in its visit panel, and a replay marks them on its timeline. The Overview’s chart and Performance’s Pages can also say how many errors the period had, with a link here.
How errors are grouped and counted
- A group is errors with the same name, the same message once numbers and IDs are set aside, and the same first frame of your own code. So
Loading chunk 312andLoading chunk 6711are one error. - Every error e.js sends is counted, however many there are, and e.js sends each error once per page view. Only examples are limited: we keep up to 100 of each error a day, and 1,000 of all a site’s errors a day. An error that floods a day says how many examples we kept.
- Past 500 new kinds of error in 24 hours, further new kinds are counted together in one row.
Ignore errors
An admin can ignore a group with Ignore on its row or its page, and undo it at once. Ignored groups leave the list and the totals; the link under the list, like “1 ignored”, shows them, each with Show again, or the rule that ignores it. For patterns, use Settings › Errors › Ignore rules:
* at the end matches the rest of the message, like Script error*.* at the end matches the rest of the path, like /admin/*.We keep counting ignored errors, without examples, so showing one again or removing its rule brings it back with its history.
Privacy and consent
Error text can carry what your code put in it, so we take out what we recognize twice. In the visitor’s browser, e.js removes queries and fragments from every address and leaves out other scripts’ errors. On our servers, before storing, we remove queries and fragments again and replace:
password=, secret=, token=, or key= (or a colon)A pattern can miss part of a number or an ID, so keep personal data out of your error messages. e.js sets no cookies, and we never store IP addresses in our database. We keep examples 90 days, and the daily counts, with each error’s name and message, as long as the visits. Deleting the site’s data, or the site, deletes its errors. Errors are never in share links, the API, or MCP.
In the EU, Sweden included, assume capturing errors needs the visitor’s consent: regulators read the exemption for detecting technical faults narrowly. In the UK it needs consent unless it’s strictly necessary to detect faults in the service the visitor asked for, judged from the visitor’s side. That’s why e.js waits for your consent banner by default. Choose Capture without asking only if your adviser agrees, and then tell visitors in your privacy notice and give them a free, simple way to object, like this link:
<a href="#" data-lyli-opt-out>Opt out of analytics and recording</a>e.js makes the link a switch, the same opt-out as the recorder’s: it stops everything we collect in that browser for your site. Settings › Errors also has text for your privacy page and consent banner that follows your settings.



