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:
- 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.
- 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).
- 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
<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
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.
<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:
| Where | What it covers |
|---|---|
| Your domain | The domain of the project URL. acme.com also covers www.acme.com |
| Local development | localhost, *.localhost and 127.0.0.1 on any port, for your team. On by default |
| Previews | Preview 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.
| Setting | What it does |
|---|---|
| Toolbar visibility | Turns the script on or off everywhere, localhost included. Off means no toolbar, no recording, no requests |
| Who can see the toolbar | Members: only people in your workspace see it. Everyone: every visitor to the site sees it |
| Require visitors to sign in | With Everyone: on, visitors sign in before they comment; off, they comment under a name they type |
| Allow Quality for local development | Lets 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
- Open a page on your site.
- 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.
- 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:
- Open your project in Quality.
- 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.)
- 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>| Attribute | Example |
|---|---|
data-pr | 42 |
data-branch | checkout-redesign |
data-commit | 9f1c2ab |
data-deployment | Your 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 itself | data-hide="admin.acme.com" (comma-separated) |
| Everywhere except some hosts | data-show="staging.acme.com" (* matches within one part of the name) |
| In automated tests | Set 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
| Attribute | Required | What it does |
|---|---|---|
data-site-id | Yes | Ties the page to your project |
data-api-origin | Yes | The Quality server the script talks to |
data-hide, data-show | No | Narrow which hosts it runs on |
data-pr, data-branch, data-commit, data-deployment | No | Label threads with the build they were left on |
data-shortcuts="on" | No | Turn the toolbar's keyboard shortcuts 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.
- Shortcuts that stay out of your way. Single-key shortcuts are off, so they never clash with
your app's. The tools take Shift instead:
⇧C(comment),⇧T(threads),⇧S(screenshot),⇧I(Inspect) and⇧R(record), and/says something at your cursor, each unless your app already uses that key itself. If your app doesn't use the single keys, adddata-shortcuts="on"to the tag to turn them on. - 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-maskto hide an element's text, ordata-quality-blockto 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.