# Add an embedded help center to your website

_Category: Widget and embeds_

Give a page of your website or app its own help section: a search box, your categories and your most-read articles, right inside the page. Readers search and read without leaving your site, and you add it with the widget snippet and one extra line of HTML.

**Who can do this:** Anyone on your team can copy the snippet, and Owners and Admins approve your website · **Plans:** Growth and Catalyst

## Is this the embed you need?

HelpCenter.io can put your help center on your website in three ways. The embedded help center is the middle one: more than a button, less than your whole help center.

|  | The widget | Embedded help center | Full help center in a frame |
| --- | --- | --- | --- |
| **What it is** | A button on every page that opens a help panel | A help section inside one of your pages | Your whole help center shown as a page of your app |
| **How it looks** | The widget design you set in **Embeddables** | A simple layout that takes on your page's own styles | Your help center's own design |
| **Readers can** | Search, read, ask AI when AI Answers is on, and message your team | Search, browse categories and read articles in place | Everything they can do in your help center |
| **Private help centers** | Yes, with JWT sign-in | No | With limits |
| **Plans** | All plans | Growth and Catalyst | Growth and Catalyst |

For the widget, see [Add the widget to your website](https://self.helpcenter.io/content/install-the-widget). For your full help center in a frame, see [Embed your help center in your app](https://developers.helpcenter.io/content/embed-your-help-center) on the developer portal.

## Add the embedded help center to a page

The embedded help center loads through the widget's snippet, so you start there.

1. In the left menu, click **Embeddables**.
2. On the **Widget** tab, find **Installation** and click **Copy**.
3. Paste the snippet into the page, right before the closing `</body>` tag. If the widget is already on that page, skip this step: one snippet does both.
4. Where the help section should appear on the page, add this element:
  ```
  <div id="hcio-embedded-help-center"></div>
  ```
5. Reload the page. The help section appears in the element and fills its width.

Put together, the page looks like this, with your own widget ID in place of `YOUR_WIDGET_ID`:

```
<div id="hcio-embedded-help-center"></div>

<!-- HelpCenter.io smart widget code -->
<script type="text/javascript">(function(){
    var s = document.createElement('script');
    s.src = "//helpcenter.io/js/init.js";
    s.async = true;
    window.hcOptions = {
        app_id: 'YOUR_WIDGET_ID'
    };
    document.body.appendChild(s);
})();
</script>
<!-- End HelpCenter.io smart widget code -->
```

The element's ID must be exactly `hcio-embedded-help-center`, and a page can show one embedded help center. The element has to be in the page when the snippet loads: in a single-page app, render it before the snippet runs.

### Without the widget button

The snippet also shows the widget's round button in the corner of the page. To show only the embedded help center, add `widgetEnabled: false` to the snippet:

```
window.hcOptions = {
    app_id: 'YOUR_WIDGET_ID',
    widgetEnabled: false
};
```

## Allow your website

The embedded help center only loads on websites you approve, the same list that controls the widget.

1. In the left menu, click **Settings**.
2. In the **General** card, find **Embedding origins**.
3. Type the host name of the page that shows the embedded help center, such as `app.example.com`, and click **Add**.
4. Click **Save changes**.

Ports don't matter, so `localhost` covers a test page at `localhost:3000`. See [Choose which websites can show the widget](https://self.helpcenter.io/content/embedding-origins) for what to enter and what the list refuses.

## What readers see and can do

- **A search box** on a colored banner, with your help center's search placeholder. Results show as readers type, in place of the categories. Clearing the box brings the categories back.
- **Your categories**, the top-level ones, with their icons or images and descriptions. Clicking one lists its published articles, including those in its subcategories.
- **Your most-read articles**: up to seven published articles, in order of views, until a reader picks a category.
- **Articles open in place.** Clicking a title unfolds the article under it, images included. Clicking the title again folds it.

The embedded help center is part of your page, not a frame, so your website's CSS applies to it, for example to its headings and links.

It shows your help center in its default language only, with articles that have a title in that language. Readers can't switch languages, rate articles, ask AI or message your team from it. If they need any of that, add the widget.

As readers open a category or an article, the part of your page's address after `#` changes. The embedded help center doesn't suit a page that uses `#` for its own routing.

## Who can see it

- **Public help centers only.** Your help center must be public and published. On a private or password-protected help center, or one that isn't published yet, readers see "This help center is not available here." To show private articles on your website, use the widget with JWT sign-in: see [Sign readers into the widget with a JWT](https://developers.helpcenter.io/content/widget-jwt) on the developer portal.
- **IP address restrictions apply.** If your help center only opens from approved networks, readers elsewhere see a message asking them to connect to your organization's network or VPN. See [Restrict access by IP address](https://self.helpcenter.io/content/ip-allowlist).
- **JS-only access doesn't block it.** With [JS-only access](https://self.helpcenter.io/content/js-only-access) on, the embedded help center keeps working on the websites in your Embedding origins.

## See how readers use it

Visits, searches and article opens in the embedded help center count in **Statistics**. To see them on their own, click **Filters**, set **Surface** to **Embedded help center** and click **Apply filters**. In **Recent sessions**, a visit shows as **Embedded help center visited**. See [Read your help center statistics](https://self.helpcenter.io/content/statistics).

## Troubleshooting

**Nothing appears, not even a loading spinner.** Check that the widget snippet is on the same page and that the element's ID is exactly `hcio-embedded-help-center`. In a single-page app, the element must be in the page when the snippet loads. If your snippet sets `privacyMode: 'essential'`, the embedded help center doesn't load.

**Readers see "This help center is not available here."** The page's host isn't in **Embedding origins**, or your help center is private, password-protected or not published yet. Compare the host in your address bar with the list: `example.com` and `www.example.com` are different hosts. After you save, wait a couple of minutes and reload. To publish, see [Publish your help center](https://self.helpcenter.io/content/make-your-help-center-public).

**An article is missing.** The embedded help center shows published articles in your default language, and only ones readers may see. The most-read list holds seven articles: pick the article's category, or search for it.

**It looks different from the rest of your page, or your styles change it.** It takes on your website's CSS. Adjust your styles for the elements inside `#hcio-embedded-help-center`.

**Your site sends a Content Security Policy.** Allow the widget's hosts. See [Content Security Policy and allowed origins](https://developers.helpcenter.io/content/content-security-policy) on the developer portal.

## Related articles

- [Add the widget to your website](https://self.helpcenter.io/content/install-the-widget)
- [Choose which websites can show the widget](https://self.helpcenter.io/content/embedding-origins)
- [Show your help center only inside your app](https://self.helpcenter.io/content/js-only-access)
- [Read your help center statistics](https://self.helpcenter.io/content/statistics)
- [Embed your help center in your app](https://developers.helpcenter.io/content/embed-your-help-center) on the developer portal
