# Add a script to your help site

> Source: https://help.docmunk.com/help-site/add-a-script-to-your-help-site
> Updated: November 13, 2026

A tool such as a chat launcher or an analytics tool works only where its tag is on the page. Custom code puts the tag in the `<head>` of every page of your help site, so the tool runs for your readers there too.

## Before you start

- You're an owner. Only owners can change head scripts. Owners and admins can publish them.
- Copy the install code from your tool. It is usually one `<script>` tag.
- Your help site is open to readers. While it is closed, readers see “Not open yet”, and no script runs. See [Preview your help site before it opens](https://help.docmunk.com/help-site/preview-your-help-site-before-it-opens.md).

> [!WARNING]
> A script runs for every reader on every page, and Docmunk doesn't ask for consent first. If readers must agree before a tool loads, set that up in the tool, such as with its cookie banner. A script can read and change your pages, so paste code only from a tool you trust.

## Add a script

1. **Open Custom code**

   On **Help site**, select **Custom code** in the panel.

2. **Paste the code**

   In **Head scripts**, enter the code that you copied. You can add more than one tag. Docmunk saves it to the draft a moment after you stop, so nothing runs for readers yet. The code looks like this example:

   ```html example
   <script async src="https://js.hs-scripts.com/123.js"></script>
   ```

3. **Publish**

   Select **Publish**, check the list of changes, then select **Publish** in the list. Check the list because a publish sends the whole draft of the look, with any change that your team made.

![Open Custom code and add a script, from Help site to Publish](https://help.docmunk.com/-/imports/7d22442215f1b64edef39343bbe7eac4b7c4111b2cee4fabf3a2015d011f5567.webp)

## Check it on your live site

A script runs only on your open help site, so check it there. Select **Live site**, and look for the tool on a page. A chat launcher shows on the page, and an analytics tool shows your visit in its own reports.

Do not use the preview on Help site for this check. The preview runs scripts in a sandbox that keeps them from cookies and storage, so many tools do not work there.

If the tool does not show:

- The link says Preview, not Live site. Your help site is closed, and no script runs until you open it.
- A chat launcher does not show. Check the rule in your chat tool for the pages it shows on. The rule must include your help site's address.

## Change or remove a script

Change or delete the code in **Head scripts**, then publish. The old script keeps running for readers until you publish.
