# Install the widget (https://notert.io/docs/getting-started/install-the-widget)

Last updated 2026-11-24

The install guide in Notert writes your snippet with your workspace already in it, and tells you once it sees the widget live on your site. Pasting it takes a minute; this page also covers what the snippet does, how to test it, and how to start it only once a visitor agrees to it.

## Before you start [#before-you-start]

- **Conversations is on.** It's off for a new workspace, and an owner or admin switches it on. The Widget page appears once it's on.
- **Your workspace has a website.** The widget only answers on your own websites, so the guide asks for one before it shows the snippet. Owners and admins set it, and add any other websites the widget works on.
- **Anyone on the team can copy the snippet.** Opening the guide and copying from it needs no particular role, so a developer who is a member can do it on their own.

## Add it to your site [#add-it-to-your-site]

<Steps>
1. Open <Key to="settings">Settings</Key>, then <Key to="settings/conversations">General</Key> under Conversations, and switch <Key>Conversations</Key> on under Status if it's off.
2. Open <Key to="settings/conversations/widget">Widget</Key> under Conversations, and press <Key>Open guide</Key>.
3. Under Where it works, check your website is listed. If it isn't, add it there: the widget only works on your own websites. If your app lives on another domain, add that too. See [where the widget works](/docs/widget/where-it-works).
4. Under Where it opens, pick <Key>Chat bubble</Key> for a round button in the corner of every page, or <Key>Your own button</Key> to open it from a Help link in your app.
5. Under Add it to your site, pick a theme, <Key>Light</Key>, <Key>Dark</Key> or <Key>Match site</Key>, and press the copy key on the snippet. See [light, dark or match your site](/docs/widget/theme).
6. Paste the snippet just before `</body>` on every page of your site, or once in the layout every page shares.
7. With your own button, add `data-notert-toggle` to the button or link that should open the widget.
8. Deploy, then open a page of your site. Within moments, Check it's live shows your site's address.
</Steps>

<Screenshot name="install-guide" alt="The install guide's tabs, Install, Signed-in users and Your button, over its first steps: the workspace's website with a field to add another, and the choice between a chat bubble and your own button" />

<Screenshot name="install-guide-snippet" alt="The install guide's Add it to your site step: paste it at the end of every page's body, with the Light, Dark and Match site theme choice beside it, above the HTML snippet and its copy key" />

If you belong to other workspaces whose widget works on the same websites, the guide lists them above the snippet with a link to each one's own guide. Each workspace has its own inbox, and a visitor sees no difference between two widgets, so check you copied the snippet from the workspace whose inbox those pages' conversations should reach.

Working with an AI coding agent? Under Add it to your site, press <Key>Copy prompt</Key> beside AI prompt and paste it into the agent: it carries your snippet and tells the agent where it goes and how to identify signed-in users. It names your identity secret only by its environment variable, `NOTERT_IDENTITY_SECRET`. The guide's other tabs, Signed-in users and Your button, and Look on the plan that includes widget designs, each have a prompt of their own for adding that part to a site that has the widget already.

## What the snippet looks like [#what-the-snippet-looks-like]

Copy yours from the guide rather than from here, since it carries your workspace's id in place of `YOUR_WORKSPACE_ID`, and names your workspace in a comment beside it so whoever reads your code later knows which inbox it reaches:

```html
<script>
  window.$notert=window.$notert||[];window.notert=window.notert||new Proxy({},{get:(_,p)=>typeof p=="string"&&p!="then"&&/^[a-z]/i.test(p)?(...a)=>window.$notert.push([p,...a]):void 0});
  window.notert.init("YOUR_WORKSPACE_ID",{widget:true,theme:"page"}); /* The Brightline workspace's inbox */
</script>
<script type="module" async src="https://app.notert.io/embed/v1.js"></script>
```

- **The first script** sets up `window.notert`, which keeps any call you make before the widget has loaded and plays it back once it has. So you can call `window.notert.identify(...)` straight away, in any order. Its `init` names your workspace and the options you picked: `launcher:false` joins them when you pick <Key>Your own button</Key>.
- **The second** loads the widget itself, as a module, without holding up your page.

The two work in either order, so a framework that moves the module into `<head>`, ahead of the small script, still draws the widget. Only the first `init` on a page counts, so a layout that renders the snippet again never draws a second widget. Every option `init` takes is in the [JavaScript reference](/docs/widget/javascript-api#init).

### On a whole page [#on-a-whole-page]

Here's the snippet in place on a plain HTML page, with a signed-in user named and a Help link of your own beside the round button:

```html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Brightline</title>
  </head>
  <body>
    <nav>
      <a href="/">Home</a>
      <button type="button" data-notert-toggle="help">Help center</button>
    </nav>

    <main>…</main>

    <script>
      window.$notert=window.$notert||[];window.notert=window.notert||new Proxy({},{get:(_,p)=>typeof p=="string"&&p!="then"&&/^[a-z]/i.test(p)?(...a)=>window.$notert.push([p,...a]):void 0});
      window.notert.init("YOUR_WORKSPACE_ID",{widget:true,theme:"page"});
      // Only on a page your server renders for a signed-in user:
      window.notert.identify("TOKEN_YOUR_SERVER_SIGNED");
    </script>
    <script type="module" async src="https://app.notert.io/embed/v1.js"></script>
  </body>
</html>
```

The `identify` line is optional. Leave it out and every visitor writes as a guest; add it and their conversations follow them to every device. See [identify your signed-in users](/docs/signed-in-users/identify-users).

## On a website builder or tag manager [#on-a-website-builder-or-tag-manager]

The snippet goes where your platform puts code on every page. Each guide shows where, how to check it, and what trips people up on that platform:

- [WordPress](/docs/platforms/wordpress), with a code snippets plugin or a small must-use plugin, and no Notert plugin
- [Shopify](/docs/platforms/shopify), in your theme's `theme.liquid`
- [Webflow](/docs/platforms/webflow), in your site's custom code
- [Framer](/docs/platforms/framer), in your project's custom code
- [Google Tag Manager](/docs/platforms/google-tag-manager), as a Custom HTML tag

Building with a bundler, in TypeScript or React? Install the [npm package](/docs/widget/npm-package) instead of pasting the snippet. Add it to your site links to it under the snippet.

## Open it from your own button [#open-it-from-your-own-button]

In your product, people usually look for help in the sidebar, the account menu or the header, not in the corner. Pick <Key>Your own button</Key> under Where it opens: the snippet then passes `launcher: false`, which leaves out the round button, and you give the attribute to your own Help item:

```html
<button type="button" data-notert-toggle>Help</button>
```

A press opens the widget and another closes it. To show how many replies wait unread on that button, as the round button does, listen for changes with `window.notert.on("change", ...)`. See [your own button](/docs/widget/javascript-api#your-own-button).

Want both? Add the chat bubble's snippet to your website and your own button's to your app.

## Check it works [#check-it-works]

<Steps>
1. **Open a page of your site** in a browser, on an address that's under Where it works. The round button appears in the corner once the page has finished loading, or your own button opens the panel.
2. **Open your browser's developer tools** and look in the console for a line that starts with `Notert:`. There's none when all is well. When the widget can't answer the page, the line says why. See [troubleshooting](/docs/widget/troubleshooting).
3. **Send yourself a message** from the widget, such as "Testing the widget". It lands in your <Key to="inbox">Inbox</Key> at once, and a reply you send from there shows in the widget live.
4. **Look at Check it's live** in the install guide. It shows the address it last saw the widget on, and how long ago.
</Steps>

<Note>
The widget works on `localhost` while you build, but Check it's live never counts a page on your
own machine, since nobody else sees it there. It waits until the widget loads on one of your
websites.
</Note>

## Start it only once a visitor agrees [#start-it-only-once-a-visitor-agrees]

If your site asks visitors before it runs anything beyond what it needs, keep both scripts on the page and take `init` out of the first one. Then call `init` from your consent tool once the visitor agrees:

```html
<script>
  window.$notert=window.$notert||[];window.notert=window.notert||new Proxy({},{get:(_,p)=>typeof p=="string"&&p!="then"&&/^[a-z]/i.test(p)?(...a)=>window.$notert.push([p,...a]):void 0});
  // No init here: startNotert() below starts the widget once the visitor agrees.
  function startNotert() {
    window.notert.init("YOUR_WORKSPACE_ID", { widget: true, theme: "page" });
  }
</script>
<script type="module" async src="https://app.notert.io/embed/v1.js"></script>
```

Most consent tools run a function or fire an event once a visitor agrees, and again on each later page for a visitor who already did. Call `startNotert()` from there. If a visitor withdraws, call `window.notert.shutdown({ forget: true })`, which takes the widget off the page and lets go of what it kept in their browser. See [shutdown](/docs/widget/javascript-api#shutdown).

Until `init` is called, the widget's script loads nothing more, draws nothing and stores nothing. Loading the script itself is still a request to Notert, so if your consent tool must hold back every request to another service, let it add both scripts instead. What the widget keeps, and when, is in [what the widget records about visitors](/docs/widget/visitor-data).

## What it costs your page [#what-it-costs-your-page]

- **Nothing before your page is ready.** The widget's script waits for your page to finish loading and for a quiet moment, then draws the launcher. The panel loads only as someone points at the launcher or opens it, or when a reply from your team is waiting for them.
- **No clashing styles.** The widget draws inside a shadow root, so your CSS never reaches it, and its CSS never reaches your page. Its font goes under a name of its own, so it never replaces yours.
- **Always up to date.** The script changes with every Notert release, and your pages pick the new one up on their next load. Load it from Notert as the snippet does, rather than copying it to your own server or pinning it with an integrity hash.

<Note>
Using React, Next.js, Vue or another framework that changes pages without reloading? Paste the
snippet once, in the page shell. See [single-page apps](/docs/widget/single-page-apps).
</Note>

## Related [#related]

- [Where the widget works](/docs/widget/where-it-works)
- [Content Security Policy](/docs/widget/content-security-policy), if your site sends one
- [JavaScript reference](/docs/widget/javascript-api)
- [Troubleshooting](/docs/widget/troubleshooting)