error.page docs

Quickstart

Install the SDK and show your first branded error page in five minutes.

error.page is the user-experience platform: it records how people use your site, shows you where they drop off, catches every error, and — instead of a broken screen — renders a calm, on-brand page while you get notified. One SDK does all of it. This guide gets you live in about five minutes.

1. Create a project

A project represents one website or app. From your dashboard, click Create Project, give it a name (e.g. my-store), and you're done. Each project gets its own API key, slug, and branded page.

2. Add the SDK

Paste this snippet just before the closing </body> tag on your site. It's under 4KB gzipped and loads asynchronously, so it never blocks your page.

<script src="https://error.page/js/errorpage.js"></script>
<script>
ErrorPage.init({
    projectId: 'YOUR_API_KEY',
    slug: 'your-project-slug'
});
// Tie sessions to the signed-in user so you get per-user journeys:
ErrorPage.identify({ id: user.id, email: user.email, name: user.name });
</script>

That one snippet does two jobs at once: from the moment it loads it records user journeys (pageviews and clicks, automatically) and catches errors (crashes, network and server failures). You'll find your exact snippet, pre-filled with your keys, on the dashboard under Quick Setup.

Zero-install alternative

Prefer not to hand-write the config? Drop a single meta tag in your <head> and load our loader — it discovers the rest:

<meta name="error-page-key" content="YOUR_API_KEY">
<script src="https://error.page/sdk.js" async></script>

3. Test it

Trigger an error on your site (or throw one from the console):

throw new Error('Hello from error.page');

Within a second or two the error appears in your Incident feed, and your branded page is ready to show on the next real failure.

What happens next