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

# Base code not detected

> Fix a Cometly pixel not detected by the Pixel Helper: start a session, check the script in your site's head, clear your cache, then verify.

You open the [Cometly Pixel Helper](https://docs.cometly.com/guides/tracking/pixel-helper.md) (a Google Chrome extension) on one of your pages and it does not detect the base code. "Base code" is the Pixel Helper's name for the Cometly pixel, the script that tracks where your website visitors come from and captures opt-in data from your forms.

A Cometly pixel not detected usually comes down to one of three things: the Pixel Helper session was not started before the page loaded, the pixel is missing from the page or does not match the script Cometly shows for your space, or your browser is showing an old cached copy of the page. Cometly only tracks the pages that carry the pixel, so fix this before you rely on the data from that page.

## Fix a Cometly pixel not detected on your page

1. Make sure you are using the Cometly Pixel Helper correctly. Click **Start**, then reload the page.

2. Make sure the Cometly pixel is in the `<head>` of every page of your website, and that it matches the script Cometly shows for your space. In Cometly, go to **Setup** > **Install the Cometly pixel** and find the code under **Install the pixel**. By default it is a single script tag:

   ```html theme={null}
   <script src="https://js.comet-serve.com/script.js?uid=[your-unique-identifier]"></script>
   ```

   If the script on your website is different, click **Copy Code** and replace the one on your website. See [Install and verify the Cometly pixel](https://docs.cometly.com/getting-started/install-pixel.md).

3. Clear your browser cache and try the [Cometly Pixel Helper](https://docs.cometly.com/guides/tracking/pixel-helper.md) again. See [Clear cookies and cache](https://docs.cometly.com/support/troubleshooting/general/clear-cookies-and-cache.md).

> [!TIP]
>
> You can also check the pixel without the extension. In Cometly, go to **Setup** > **Install the Cometly pixel** and click **Verify** next to your domain under **Verify your pixel**.

## Confirm the pixel is detected

Reload the page with a Pixel Helper session running. You should see an **Init** (short for "initiation") event fire on each page that contains the Cometly pixel.

If you run the check inside Cometly instead, the domain shows **Pixel detected** under **Verify your pixel**.

## Frequently asked questions

### Do I need to reinstall the Cometly pixel after adding a domain?

Yes, copy it again. The script changes when you add or remove domains, or change a setting under **Pixel options**. If Cometly tells you your tracking script has changed, click **Copy Code** and replace the old script on your website.

### Can a speed or caching plugin stop the Cometly pixel from loading?

Yes. A plugin or code setting that delays JavaScript execution (on WordPress, the most common one is WP Rocket) delays the Cometly pixel, which results in missed data. See [Delayed JavaScript execution or lazy loading](https://docs.cometly.com/support/troubleshooting/pixel/delayed-javascript-or-lazy-loading.md) for the fix.

### Can a Content Security Policy block the Cometly pixel?

It can. A Content Security Policy (CSP) restricts the sources your website can load scripts from, so it may block the pixel unless you explicitly allow it. See [Use Cometly with a Content Security Policy](https://docs.cometly.com/support/troubleshooting/pixel/content-security-policy.md) for the hosts to allow.

## Next steps

* [Install and verify the Cometly pixel](https://docs.cometly.com/getting-started/install-pixel.md)
* [Check your pixel and events with the Cometly Pixel Helper](https://docs.cometly.com/guides/tracking/pixel-helper.md)
* [Fix the Init not detected error](https://docs.cometly.com/support/troubleshooting/pixel/init-not-detected.md)
* [Fix delayed JavaScript execution or lazy loading](https://docs.cometly.com/support/troubleshooting/pixel/delayed-javascript-or-lazy-loading.md)
* [Use Cometly with a Content Security Policy](https://docs.cometly.com/support/troubleshooting/pixel/content-security-policy.md)

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


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