# Can I install Freshpaint on a Chrome extension?

Yes! Here is a demo: <https://github.com/freshpaint-io/demo-extension-tracking>​

### Extra Steps for Manifest V3 <a href="#extra-steps-for-manifest-v3" id="extra-steps-for-manifest-v3"></a>

Chrome's newer manifest v3 imposes certain constraints on how an extension's code is architectured. Specifically, it [does not allow](https://developer.chrome.com/docs/extensions/mv3/intro/mv3-overview/#remotely-hosted-code) extensions to load code from external domains, all the code used by the extension has to be packaged with the extension statically.​

Usually the Freshpaint tracking snippet that you get from <https://app.freshpaint.io/sources> loads the Freshpaint snippet from our CDN. This cannot work from the context of a manifest v3 extension. So you'll have to download a few scripts and place them in your extension directory -&#x20;

<pre><code><a data-footnote-ref href="#user-content-fn-1">mkdir</a> -p freshpaint/static/js
curl https://perfalytics.com/static/js/freshpaint.js > freshpaint/static/js/freshpaint.js
curl https://perfalytics.com/static/js/analytics.js > freshpaint/static/js/analytics.js
</code></pre>

Next, you'll need to make [small modifications to the Freshpaint tracking snippet](https://github.com/freshpaint-io/demo-extension-tracking/blob/main/freshpaint_loader.js).​One thing to keep in mind is that the Freshpaint snippet needs to be loaded from the action script of your extension. We'll autotrack all the UI elements from there. Since the background service worker does not have a DOM, as of now we don't support loading Freshpaint from there.

[^1]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.freshpaint.io/reference/faqs/can-i-install-freshpaint-on-a-chrome-extension.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
