Monitors

Error tracking and page speed

Our script sends the JavaScript errors your visitors meet to Uptimezy, where they are grouped into issues. Version 2 of the script also measures how fast each page is for them.

On this page

Add your site

  1. Open Errors and press Add site.
  2. Type a Name, such as Shop.
  3. Under Domains, type the domains your pages are on, separated by commas, such as shop.example.com, example.com. A domain also covers its subdomains. You can add up to 20.
  4. Press Add site.
  5. Press Install next to the site and copy the line it shows.
  6. Put that line in every page of the site, as early as possible inside <head>.
HTML
<script src="https://app.uptimezy.com/api/v1/errors/v2.js" integrity="sha384-…" crossorigin="anonymous" data-key="ek_…" async></script>

The line loads the script from https://app.uptimezy.com. Its integrity value pins the file: a published version of the script never changes. Errors show on Errors within seconds.

Errors are taken only from pages on your domains and their subdomains. The browser says which page sent them, and errors from any other domain are refused. Add your test or staging domain too if you want its errors.

Member, Admin and Owner add sites and resolve issues. A Viewer can read everything. How many sites you can have depends on your plan: see the pricing page.

What the script sends

The script catches errors nobody caught, and promises that failed with nobody to handle them. For each error it sends:

  • The error's type and message, and its stack.
  • The page's address without its query and fragment. The query of every address in the stack is removed too.
  • The release, if your line has data-release.

The browser and the system, such as Chrome 131 and Windows, are read on our side from the request, as a name and a main version only. We also take email addresses, long numbers and tokens out of messages, and we do not store your visitors' IP addresses. The script sets no cookie and stores nothing in the browser.

  • At most 10 errors per page load. The same error twice on one page counts once.
  • Errors from the visitor's browser extensions are left out.
  • An error in a script from another address without CORS reaches the page as "Script error." with no stack. It tells nothing, so it is left out. Load your own scripts from another address with crossorigin="anonymous" if you want their errors.
  • The line has async, so an error that happens before the script runs is not seen.

Options

Add to the lineWhat it does
data-release="1.4.2"Names the version of your code, so you see which release an error comes from and the right source maps are used. Use letters, digits and . _ + -, at most 64 characters.
data-speed="off"Measures errors only, no page speed.
HTML
<script src="https://app.uptimezy.com/api/v1/errors/v2.js" integrity="sha384-…" crossorigin="anonymous" data-key="ek_…" data-release="1.4.2" async></script>

To report an error your own code caught, call window.Uptimezy.capture(error). It shows as Reported by the site.

JavaScript
try {
  saveCart();
} catch (error) {
  // Report it, then handle it as before.
  if (window.Uptimezy) window.Uptimezy.capture(error);
}

If your site has a content security policy

A content security policy (CSP) tells the browser which addresses a page may load scripts from and send data to. If your site has one, allow https://app.uptimezy.com in two places:

  • script-src, so the browser loads the script.
  • connect-src, so the script can send errors and page speed. Both go to the same address as the script.
HTTP
Content-Security-Policy: script-src 'self' https://app.uptimezy.com; connect-src 'self' https://app.uptimezy.com

Keep the other values your policy already has. No other address is needed.

Issues and alerts

Errors with the same type, the same message (numbers aside) and the same top of the stack form one issue. Line numbers do not count, so a new build that only moves code keeps the same issues. Each issue shows when it was first and last seen, its stack, its browsers, systems and pages, and its newest errors.

  • Resolve: the issue opens again when the error comes back.
  • Ignore: the issue stays ignored, also when the error comes back.
  • Open again: back to the open list.

Alerts

A new issue, and a resolved issue that comes back, send an alert to your alert emails, chats and webhooks. Each site has its own switch: Alerts on or Alerts off. A site sends at most 10 alerts an hour.

Webhooks name the event in the X-Monitor-Event header: error.new_issue or error.regression. See Webhooks.

  • An issue that opened while alerts were off, or after the hourly limit, is not reported later.
  • Error alerts have their own daily allowance, a quarter of your plan's daily messages. Errors on your site can never use up the messages your downtime alerts need.

Limits and how long errors are kept

  • Your plan keeps a number of errors a month. After that, new errors are counted but not kept until the next month. Errors shows how many are kept and how many were only counted.
  • A site can start at most 500 new issues in 24 hours. Errors of more new issues are counted, not kept.
  • Errors and issues are kept 30 days. An issue with no new error for 30 days is removed. Each issue keeps its newest 100 errors.
  • Pause stops a site from taking errors.

Source maps from your build

A build makes your scripts short and hard to read. With its source maps, each stack shows your own files, lines and code.

  1. Let your build write source maps, without a link to them in your scripts.
  2. On API keys, make a key with only the permission Upload source maps. Owners and admins make keys.
  3. On Errors, press How to upload and copy the command. It has your workspace and your site in it already.
  4. Run it after each build. It uploads every map, then deletes it, so the maps are not published with your site.
JavaScript
// Vite (vite.config.js)
build: { sourcemap: 'hidden' }

// webpack (webpack.config.js)
devtool: 'hidden-source-map'
Shell
for map in dist/assets/*.js.map; do
  curl --fail --retry 3 \
    -H "Authorization: Bearer $API_KEY" \
    -F "minified_url=/assets/$(basename "$map" .map)" \
    -F "source_map=@$map" \
    https://app.uptimezy.com/api/v1/orgs/<workspace ID>/error-sites/<site ID>/source-maps && rm "$map"
done

The command is written for Vite's folders (dist/assets, served at /assets/). For another build, change the folder and the path. If your pages set data-release, add -F "release=1.4.2" with the same value before the source_map line.

You can also upload one map by hand with Upload a map.

How a map is found

  • A map belongs to one site, one release and one script path, and must match all three exactly. Only the path of minified_url counts: /assets/index-4f2a9c.js.
  • If your pages set no data-release, upload without release.
  • Uploading the same site, release and path again replaces the map.
  • Original files, lines and code show for every browser. Original function names show only for Chrome, Edge, Opera and Samsung Internet, and not on iPhone. Other browsers keep the names they sent.
  • A map without the code of its files gives files and lines only.

Limits

  • One map is at most 20 MB, a version 3 map with mappings and without sections.
  • Your plan gives your workspace room for maps. When a new map does not fit, the oldest go first. See the pricing page.
  • Maps are kept 90 days after their upload.
  • An upload that stops for 10 seconds, or comes slower than 32 KB a second, is cut. When many maps come at once, the answer asks you to wait (Retry-After). curl --retry handles this.

The route, its fields and its errors are in the API reference.

Page speed from real visitors

Version 2 of the script measures each page load once, when the visitor leaves the page or switches away. It sends only numbers and the page's address, and leaves out what the browser cannot measure. Pages with the older version 1 line send errors only.

Open Page speed and choose the Site, the Devices and the Period: Today (UTC), 7 days or 28 days.

MetricGoodPoor
Loading (LCP)up to 2.5 sover 4 s
Response to input (INP)up to 200 msover 500 ms
Visual stability (CLS)up to 0.1over 0.25
First content (FCP)up to 1.8 sover 3 s
Server response (TTFB)up to 0.8 sover 1.8 s
  • Each value is the 75th percentile: 3 visits in 4 were at least this good. It shows from 10 page views.
  • Days are UTC days. A site keeps 200 pages a day; the rest show as Other pages.
  • Phones and tablets and Computers are told apart from the browser's User-Agent.
  • Visual stability is measured only by Chrome, Edge and other Chrome-based browsers.
  • Your plan measures a number of page views a month. After that, a random share is measured, spread over the days. See the pricing page.
  • In a single-page app, one page load sends one report, for the page the visitor was on when they left.

More guides

All guides