Script Tag

Add one script tag so your team can comment on your site without the browser extension.

Overview

The script tag puts Quality's toolbar on your own site. Reviewers open the page, sign in once, and leave comments, screenshots, and session recordings exactly as they would with the extension — but nobody has to install anything, and it works in every browser.

It runs on your project's domain and, for your team, on localhost at any port. Nowhere else.

Get the script

Every project has its own script, made for you when you create the project:

  1. Open your project in Quality. The Overview shows it as the first setup step, Add Quality to your-site.com. It is also on the project's Installation tab.
  2. Copy the script, or hand it over with Copy prompt for AI (an instruction you can paste into a coding agent) or Send to developer (a message for whoever edits the site).
  3. Add it to your site (see Add the script).

Once a page has loaded it, the project shows Connected and when it was last seen, and the setup step ticks itself off.

The script looks like this, with your project's site ID:

<script
  async
  src="https://embed.usequality.app/loader.js"
  data-site-id="qs_live_…"
  data-api-origin="https://server.usequality.app"
></script>

Copy it from your project rather than typing it: the site ID is what ties the page to your project.

Add the script

Paste the script into the <head> of every page, production included. On any host where it isn't switched on it stops after one small request, without drawing, recording or framing anything.

HTML or Vite

index.html
<head>
  <script
    async
    src="https://embed.usequality.app/loader.js"
    data-site-id="qs_live_…"
    data-api-origin="https://server.usequality.app"
  ></script>
</head>

Next.js

app/layout.tsx
import Script from "next/script";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script
          src="https://embed.usequality.app/loader.js"
          data-site-id="qs_live_…"
          data-api-origin="https://server.usequality.app"
          strategy="afterInteractive"
        />
      </body>
    </html>
  );
}

Other

Add the tag to the template that renders your <head>: your layout, theme header, or tag manager. Keep every data- attribute on the same <script> element; the loader reads them from there.

Canvases drawn while the page loads

Replays show your canvases (charts, maps, WebGL, WebGPU and 3D scenes). A canvas that is drawn once while the page loads and never again, such as a 3D model viewer or a static map, is drawn before the script above runs, so it would replay empty. For those pages, add this tag before your app's own scripts. It is small, and does nothing if Quality doesn't load on the page.

index.html
<head>
  <script src="https://embed.usequality.app/canvas.js"></script>
  <!-- your app's scripts, then the Quality script -->
</head>

Choose where it shows

The script runs in three places, and a page anywhere else loads nothing:

WhereWhat it covers
Your domainThe domain of the project URL. acme.com also covers www.acme.com
Local developmentlocalhost, *.localhost and 127.0.0.1 on any port, for your team. On by default
PreviewsPreview deployments your hosting platform registers through its Quality integration

All three are set on the project's Settings tab.

Your domain. A project has one domain: the domain of the URL you gave it when you created it. The URL can't be changed afterwards, so the script can't be pointed anywhere else; for another site, create another project.

SettingWhat it does
Toolbar visibilityTurns the script on or off everywhere, localhost included. Off means no toolbar, no recording, no requests
Who can see the toolbarMembers: only people in your workspace see it. Everyone: every visitor to the site sees it
Require visitors to sign inWith Everyone: on, visitors sign in before they comment; off, they comment under a name they type
Allow Quality for local developmentLets your team use Quality on localhost while they build

Local development. With Allow Quality for local development on, the script works on every developer's machine (localhost:3000, localhost:4000, 127.0.0.1:5173 and so on), so nobody has to add their port. Local pages show the Quality button, and only people in your workspace can sign in there. Anonymous comments are never allowed locally. Turn it off to keep the script to your domain.

Previews. A hosting platform connected to Quality (such as Brimble) adds each preview deployment as it goes up and removes it when the preview is torn down. They are listed under Previews on the Settings tab, read-only apart from whether anyone can comment there.

Changes reach pages that are already open without a reload: switch the toolbar off and it disappears from them.

Comment on your site

When visitors can see the toolbar

  1. Open a page on your site.
  2. Select the Quality button in the corner and sign in with your Quality account, or, if the project allows it, choose Comment without an account. You stay signed in on that site.
  3. Choose the comment tool, select the part of the page you mean, and write your comment.

Someone who commented without an account can keep their comments later by signing in from the toolbar's menu.

When only members can see it

With Members, visitors see no Quality button at all, so you sign in from Quality instead:

  1. Open your project in Quality.
  2. Select Open project. It opens your site in a new tab, already signed in. (Before the script has loaded anywhere, choose Script from its menu.)
  3. Comment as usual. You stay signed in on that site in that browser, so next time you can open it directly.

Opening it creates a sign-in link that works once, for five minutes, for you, on that site only. It only signs in people on the project. The link is taken off the address bar as soon as the page loads, so it never ends up in your history or in a link you share.

Signing in is per site and per browser. Being signed in to the Quality dashboard, the browser extension or another site doesn't count, so open it from Quality once on each new site or browser.

Comments appear in the dashboard, and Slack and email notifications link straight back to the thread on your site.

Several screens on one page

Some pages show several screens at one address, such as a sign-up form whose steps change without the URL changing. Quality tells those screens apart by the heading above what you commented on, so a comment on one screen's Continue button doesn't appear on the next screen's.

If two screens share a heading, give each its own name with data-quality-view on an element around it:

<div data-quality-view={`signup-${screen}`}>…</div>

A comment then only shows on the screen with the same name.

Preview deployments

Comments follow the project across preview deployments. A comment left on /checkout of one preview shows on /checkout of the next, so feedback survives a new deploy.

Tell Quality which build a page belongs to, and threads are labelled with it — "PR #42" — with a This PR filter in the threads panel.

<script
  async
  src="https://embed.usequality.app/loader.js"
  data-site-id="qs_live_…"
  data-api-origin="https://server.usequality.app"
  data-pr="42"
  data-branch="checkout-redesign"
  data-commit="9f1c2ab"
></script>
AttributeExample
data-pr42
data-branchcheckout-redesign
data-commit9f1c2ab
data-deploymentYour deploy's ID

These labels are for display only; they never decide who can see a thread.

Turn it off on a page

To skip Quality…Use
On some hosts, from the tag itselfdata-hide="admin.acme.com" (comma-separated)
Everywhere except some hostsdata-show="staging.acme.com" (* matches within one part of the name)
In automated testsSet window.__QUALITY_DISABLED__ = true first, or a quality-skip cookie

data-hide and data-show can only narrow where Quality runs. Your project's settings still decide.

Script attributes

AttributeRequiredWhat it does
data-site-idYesTies the page to your project
data-api-originYesThe Quality server the script talks to
data-hide, data-showNoNarrow which hosts it runs on
data-pr, data-branch, data-commit, data-deploymentNoLabel threads with the build they were left on

What runs on your page

  • Your page stays yours. The toolbar lives in its own shadow root, so your styles and ours never mix, and clicking it never closes your own menus or dialogs.
  • No keyboard shortcuts. Single-key shortcuts are off, so they never clash with your app's.
  • Quiet in your error tracker. Errors from Quality's own code are kept out of Sentry, Datadog, and similar tools, and out of the session recordings your team watches.
  • Credentials stay with Quality. Sign-in happens in a frame on Quality's own domain. Tokens are never stored in your site's storage.
  • Private fields stay private. Typed text is masked in recordings. Add data-quality-mask to hide an element's text, or data-quality-block to leave it out entirely (see Playback).
  • Loaded when needed. The comment editor, screenshot editor and replay player download only once they're used.

Using the extension too?

If the extension is already active on a page, it takes over and the script stands down, so you never see two toolbars.