Skip to main content
How-to

Add schoolAgent to your website

Copy one snippet into your website, or send your webmaster a link that does it for them. Then check it's running and switch the agent on.

schoolAgent appears on your website as a chat button in the corner of every page. To put it there, you add a short snippet to your site once, then switch the agent on. Everything you need is on the Deploy Code tab of the Configuration page.

You need Manage the agent to change anything on this tab.

The Deploy Code tab, showing the status row with its switch, the Security domains and the JavaScript Snippet
The Deploy Code tab, showing the status row with its switch, the Security domains and the JavaScript Snippet

Before you start#

You can paste the snippet before any of this. A new agent is off, and nobody sees it until you switch it on.

Which should I choose?#

There are three ways to get the snippet onto your site:

| Option | What it does | Choose it when | | --- | --- | --- | | Copy Snippet | You paste the snippet into your site's template yourself. | You can edit your website's site-wide template or footer. | | Invite a teammate to install it | Emails a one-time link to a page with the snippet, the steps, and a check that turns green when it runs. Works for 7 days. | Your webmaster or web vendor manages the site and doesn't have a schoolOS account. | | HTML Installer | Adds the snippet to one HTML page you paste in, and gives you the result to download. | A single hand-edited page, like a standalone landing page with no template. |

Examples:

  • A district with 12 schools whose websites share one content management system. The communications director pastes the snippet once in the site-wide footer. Every school's pages get the chat button, and with the district's domains listed under Security, a question on Lincoln Elementary's page is answered from Lincoln's pages.
  • A district whose website is run by an outside vendor. The IT director sends the vendor an invite. The invite shows Opened when the vendor looks at it, and Check installation shows Widget found once their change is live. Then the IT director turns the agent on.

Steps#

  1. On the Deploy Code tab, find JavaScript Snippet and select Copy Snippet.
  2. Paste it into your website's template, inside <head> or just before the closing </body> tag. Use the site-wide template or footer, so it loads on every page. In most website builders this is a "custom code", "footer scripts" or "before body end" setting.
  3. Open any page of your website in a browser.
  4. Back on the Deploy Code tab, select Check installation. Widget found means it's running, and on which site. Not seen yet means it hasn't run yet: check the snippet is on the page, visit it again, and check again.
  5. Turn on the switch at the top of the tab, then select Save. See Turn the agent on or off.

If someone else looks after your website, send them an invite instead of steps 1 to 4.

You only paste the snippet once. When schoolOS releases a new version of the chat button, sites pick it up on their own within about five minutes, with no change to your website. Visitors' browsers keep a copy between releases, so it loads quickly. Snippets copied from older versions of this tab keep working too.

Turn the agent on or off#

The row at the top of the tab shows the agent's state, the same four as on the Config tab:

  • Switched off, not installed. Safe to paste the snippet: nobody sees anything.
  • Switched on, waiting for the snippet. It goes live the moment the snippet is on a page.
  • Installed, but hidden. The snippet is running, and the agent is off.
  • Live on your site. It's answering questions, and the row names the site it was last seen on.

Under it, a line names your district's domains. See Your district's domains.

Use the switch to turn the agent on or off, then select Save, which appears once the switch has moved. Until you save, nothing changes on your website.

Off, the chat button disappears from your site, but the snippet can stay where it is. Turn it off while you change your knowledge or routes, or during a break.

If the School Safety Team route has no email when you turn the agent on, you're asked first. Add safety email takes you to it. Proceed, alert Super Admins for now turns the agent on, and safety alerts are emailed to your Super Admins until you add one.

Your district's domains#

Security lists the domains your district's websites live on. On these sites, and any site beneath them, the agent answers as your district. When a question is asked on one school's page, it answers from that school's pages without asking which school is meant. With no domains, the agent can't tell which school a visitor is reading, so it asks.

  • The Primary domain can't be removed here.
  • Adding or removing a domain needs Change account settings, because domains decide which district new sign-ups join.
  • To add another, type it and select Add domain. You can paste a web address: https://www.osd.org/enroll is saved as osd.org. It covers every site beneath it, like www.osd.org and school.osd.org.
  • Remove takes one off the list.

Changes save right away.

This list doesn't limit where the snippet works. It only decides which sites the agent treats as yours. To limit where the agent appears, use Allowed sites.

Allowed sites#

By default, any website with the snippet can show your agent, including a site that copied it from yours. Allowed sites lets you choose which websites can show it.

  • Empty list. Any site can show the agent. This is how every agent starts.
  • One or more sites. Only those sites can show it. On any other site the chat button doesn't appear, and the agent won't answer questions sent from that site.

To add a site, type its address and select Add site. To take one off, select Remove. Each change saves right away, and Undo in the confirmation puts the list back.

Enter just the site, not a page:

| You type | Saved as | Covers | | --- | --- | --- | | https://www.osd.org | https://www.osd.org | Only www.osd.org. | | www.osd.org | https://www.osd.org | The same: https:// is added for you. | | https://*.osd.org | https://*.osd.org | Every site beneath osd.org, like www.osd.org and lincoln.osd.org, but not osd.org itself. | | https://staging.osd.org:8443 | https://staging.osd.org:8443 | Only that site on that port. |

A page address like https://www.osd.org/enroll isn't accepted, because the rule applies to whole sites. A * only works at the start, and needs a domain under it: *.osd.org, not *.org. An agent can list up to 25 sites.

Examples:

  • A district whose schools all live under one domain. Add https://*.osd.org, and https://osd.org if the district's home page has no www. Every school's site keeps the agent, and a copy of the snippet on someone else's site shows nothing.
  • A district that also runs a separate athletics site. Add https://www.osd.org and https://www.osdathletics.com.

Invite a teammate to install it#

If your webmaster doesn't use schoolOS, send them a link instead of the snippet.

The invite card, with an address typed in and the one-time link shown after sending
The invite card, with an address typed in and the one-time link shown after sending
  1. Under Invite a teammate to install it, enter their email and select Send invite. If what you typed can't be an address, it's named under the box and the invite can't be sent until you fix it.
  2. The link is shown once, under the box, with Copy. If the email couldn't be sent, share the link yourself. It can't be shown again: schoolOS only keeps a scrambled copy.

The link opens one page, with the snippet, where to paste it, and a check that turns green by itself once the snippet runs. It doesn't sign them in to schoolOS, and they can't change anything. It works for 7 days.

Invites that haven't expired are listed with Opened and the date, or Not opened yet, and when they expire. Revoke stops a link working right away. A revoked or expired link shows a "not found" page.

Install on a site without a template#

HTML Installer is for a single HTML page you edit by hand. Paste the whole page and select Inject Snippet. The snippet goes in just before </head>, or before </body> if there's no </head>.

Generated HTML then shows the result. Select Download HTML to save it as index.html, or Copy. Your page never leaves your browser.

Was this article helpful?

Updated October 16, 2026