> ## Documentation Index
> Fetch the complete documentation index at: https://help.eaglecart.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Custom Code to Your Eaglecart Store

> Add custom meta tags, CSS and JavaScript to every page of your Eaglecart storefront with Custom Code, including where code is placed, requirements and safe examples.

[Help Center](https://help.eaglecart.com/introduction.md)

[Online store](https://help.eaglecart.com/online-store.md)

Add custom code to your store

# Add custom code to your store

**Custom Code** lets you add your own code to every page of your storefront, such as a site verification meta tag, extra styles or a script. Each piece of code is saved as its own entry, which you can turn on or off.

## Before you start

* **Custom Code isn't available on the Free plan.** Whether your store has it depends on your current plan. See [Eaglecart pricing](https://eaglecart.com/pricing). You don't need a custom domain to use it.
* **Only add code you understand.** Poorly written or excessive code can slow your store, break features, or affect security and the shopping experience.
* **Use Custom Code for meta tags, stylesheets and scripts.** For tracking pixels such as Meta Pixel or Google Analytics, use **Settings → Tracking** instead. It's the safer, built-in way to manage your store and customer events.

## Add custom code

1. Go to **Online store → Custom Code** and add a new entry.
2. Enter a **Code name** so you can recognize it later, such as "Google verification".
3. Choose the **Location**: **Header** or **Footer**. This decides where on the page your code is added.
4. Make sure **Status** is on.
5. Paste your code into **Code content**.
6. Click **Save**.

The code applies across your whole storefront. To stop it running without deleting it, turn **Status** off and save.

The Custom Code page also shows examples of a meta tag, a script and a style block you can copy from.

## Common uses

* **Site verification:** some services ask you to add a meta tag to prove you own your site, for example:

```html theme={null}
<meta name="google-site-verification" content="your_verification_code_here">
```

* **Custom styles:** small design changes that aren't available in MON Studio.
* **Scripts:** a chat tool or another service that gives you a script to paste.

Before adding code, check whether Eaglecart already has a built-in option. Built-in settings and integrations are easier to manage and less likely to break.

## Add custom CSS or JavaScript

Custom Code can also be used for design changes or additional scripts that aren't available through Eaglecart's built-in settings. You can add CSS to adjust your storefront's appearance or JavaScript for supported custom behavior.

Code content is added to the page as raw HTML, so wrap your code in the right tags.

**CSS** goes inside `<style>` tags:

```html theme={null}
<style>
  .custom-heading {
    color: #222 !important;
  }
</style>
```

**JavaScript** goes inside `<script>` tags:

```html theme={null}
<script>
  console.log('Custom storefront script loaded');
</script>
```

> [!TIP]
>
> **Overriding theme styles**
>
> If a custom CSS rule is not taking effect because an existing theme style takes priority, adding `!important` to that specific CSS declaration may help override it. Use it only when necessary, not on every rule. Check the result on desktop and mobile.

Keep in mind:

* CSS must be wrapped in `<style>` tags, and JavaScript in `<script>` tags.
* The **Location** you choose, **Header** or **Footer**, decides where your code is inserted in the page.
* Custom styles depend on the selectors your active theme uses. If you change themes, check that your CSS still targets the right elements.
* Poorly written scripts can interfere with how your storefront works.
* Only use CSS and scripts from sources you trust, and use built-in settings whenever they can do the job.

> [!WARNING]
>
> Incorrect or untrusted scripts may break storefront functionality, interfere with checkout, or affect performance. Test changes carefully and remove problematic code if issues appear.

## If something breaks

1. Go to **Online store → Custom Code**.
2. Turn off **Status** on the entry you added most recently and save.
3. Check your store again. Turn entries back on one at a time to find the one causing the problem.

## Keep reading

* **Next:** [Understand your cart and checkout](https://help.eaglecart.com/online-store/cart-and-checkout.md): how customers buy from you.
* [Colors, fonts and theme settings](https://help.eaglecart.com/online-store/colors-fonts-and-theme-settings.md): design changes without code.
* [Online Store Preferences](https://help.eaglecart.com/online-store/online-store-preferences.md): homepage SEO and your sitemap.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.