> For the complete documentation index, see [llms.txt](https://support.agentfire.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.agentfire.com/faqs-and-general/common-questions/articles-troubleshooting-website-code.md).

# How to Add Code From Another Service to Your Website

Where to put code from another company (a chat widget, booking tool or tracking tag) on your AgentFire website, and what to check when it doesn't work.

Many services give you a piece of code to put on your website, like a chat widget, a booking calendar or a tracking tag. Where it goes depends on what it does.

| What the code does                                               | Where it goes                                                                                                                                                                                                        |
| ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Runs on every page, like a chat bubble or a tracking tag         | **Header/Footer Scripts & Metas**                                                                                                                                                                                    |
| Shows something in one spot on one page, like a booking calendar | A **Coder** widget on that page                                                                                                                                                                                      |
| Google Analytics, Google Tag Manager or the Meta Pixel           | Their own steps: [Meta Pixel](/integrations/facebook/articles-1505057-how-to-set-up-a-facebook-pixel.md), [ad conversions](/faqs-and-general/common-questions/articles-1505060-how-to-set-up-conversion-tracking.md) |

Some services give you two parts: a script that loads once on every page, and a short piece that marks where the widget shows. The first goes in **Header/Footer Scripts & Metas** and the second in a **Coder** widget.

## Code for every page

Click the menu icon at the top left, then **Site Settings** > **AgentFire Settings** > **Header/Footer Scripts & Metas**. Each box says what it's for under its name: for example, analytics and marketing scripts go in **Head first**, chat widgets in **Footer before closing tag**. Paste the code in the matching box, then click **Update**. Not sure? See [Where each script goes](/faqs-and-general/common-questions/articles-cookie-banner.md#where-each-script-goes).

The head boxes (**Head first** and **Head after opening tag**) only accept certain tags (listed under each box). If you see an error like "This tag not allowed in : ", don't move the whole code. Usually it has a part that starts with `<noscript>` (common with the Meta Pixel and Google Tag Manager). Keep the main code in **Head first** and put only the `<noscript>` part in **Body before closing tag**. See [Where each script goes](/faqs-and-general/common-questions/articles-cookie-banner.md#where-each-script-goes).

## Code in one spot on a page

{% stepper %}
{% step %}

### Add a Spark Creator block

Open the page in the editor, click **Add Block** (the plus icon), and add a **Spark Creator** block where you want the code. Then add a row and a column inside it.
{% endstep %}

{% step %}

### Add a Coder widget

In the column, click **Add New Widget** and choose **Coder**.

![The Coder widget in the Widgets list](https://2039430885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq65vhH2v4k5rpDOha9Vm%2Fuploads%2Fgit-blob-574a9b6090581b4591aac64d53c0c56a167aa6d4%2Fcode-1-coder-widget.png?alt=media)
{% endstep %}

{% step %}

### Agree and paste your code

Read the **Use of the Coder** notice and click **I Agree**. Paste your code into the **HTML** tab. Then click **Save**.

![The Use of the Coder notice with the I Agree button](https://2039430885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq65vhH2v4k5rpDOha9Vm%2Fuploads%2Fgit-blob-1eaaa272a30b7e4fcd162665f3c4edfeac2bf4d8%2Fcode-2-coder-agree.png?alt=media)
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
By using the Coder you take responsibility for the code you add. If it breaks your page, we may remove it, and fixing problems it causes can be charged at our labor rate. If you're unsure, email <support@agentfire.com> first.
{% endhint %}

## Common Questions

<details>

<summary>My code works in the editor but not on my live site.</summary>

Check your live site in a private or incognito window, logged out. If it still doesn't show, email <support@agentfire.com> with the code and the page.

</details>

<details>

<summary>My code disappeared after I saved.</summary>

The code may have been pasted somewhere that doesn't accept scripts, like a regular text box. Use a **Coder** widget or **Header/Footer Scripts & Metas** instead.

</details>

<details>

<summary>The widget breaks the layout of my page.</summary>

The service's own styling can clash with your website's. Remove the code, then email <support@agentfire.com> with the code and the page.

</details>

<details>

<summary>Can you install the code for me?</summary>

Yes. Email <support@agentfire.com> with the complete code, the page, and where on the page it should go. Attaching the code as a text file stops your email from changing it. We install it, but we can't fix or maintain apps built by someone else.

</details>

<details>

<summary>Text I pasted from Word or a website looks wrong.</summary>

Paste it without formatting: **Ctrl + Shift + V** on Windows, or **Cmd + Shift + V** on a Mac.

</details>
