> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.crisp.chat/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to inject custom code on the Knowledge Base

*Add custom HTML, CSS, or JavaScript to your Crisp Knowledge Base from the customization settings.*

Custom code is useful when you want to add tracking scripts, adjust small layout details, or apply snippets that change how the Knowledge Base looks. Use it carefully and keep customizations easy to maintain.

---

# ${color}[#0080dd](Add custom code)

Start from [**app.crisp.chat**](https://app.crisp.chat), then open **Settings → Knowledge Base Settings → Customize your Knowledge Base**.

__To include custom code:__
* Open **Customize your Knowledge Base**
* Find **Include custom HTML code**
* Click **Edit included HTML code**
* Paste your custom HTML, CSS, or JavaScript
* Save the changes and check your public Knowledge Base

![Open the custom HTML code editor in Knowledge Base settings](https://storage.crisp.chat/users/helpdesk/website/87ae2703583ac800/cleanshot-2025-02-28-at-130127_ou73q.png =1000xauto)

|| Wrap each snippet with the right tags. CSS should be placed inside `<style>` tags, and JavaScript should be placed inside `<script>` tags.

![Add custom code in the Knowledge Base editor](https://storage.crisp.chat/users/helpdesk/website/87ae2703583ac800/cleanshot-2025-02-28-at-130433_1t0zf65.png =1000xauto)

---

# ${color}[#0080dd](Use common customization snippets)

If you want to hide buttons, update labels, change fonts, or add visual effects, start with the examples in [How can I customize my Knowledge Base layout?](/en/article/how-can-i-customize-my-knowledge-base-layout-1mc38as/).

||| Custom code can affect the public Knowledge Base immediately. Keep a copy of your snippets before editing them, and remove recent changes if the layout stops behaving as expected.

---

# ${color}[#0080dd](Frequently Asked Questions)

*Still have questions which were not covered in this article? Here is a collection of the most frequently asked questions on this topic.*

###### ${color}[#F08820](Can I add analytics or tracking scripts?)

**Yes, custom code can be used for third-party scripts when they provide HTML or JavaScript snippets.** Paste the script in the custom HTML area, then verify from the provider that events are collected correctly.

###### ${color}[#F08820](Can I add CSS only?)

**Yes, place CSS inside `<style>` tags.** This is the safest approach for small visual changes such as hiding an element, adjusting spacing, or changing a font.

###### ${color}[#F08820](What should I do if my Knowledge Base layout breaks?)

**Remove the last snippet you added first.** If the issue disappears, review that snippet for typos, missing tags, or selectors that no longer match the Knowledge Base layout.