Can I install Freshpaint on a Chrome extension?

Yes! Here is a demo:​

Extra Steps for Manifest V3

Chrome's newer manifest v3 imposes certain constraints on how an extension's code is architectured. Specifically, it does not allow 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 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 -

 -p freshpaint/static/js
curl > freshpaint/static/js/freshpaint.js
curl > freshpaint/static/js/analytics.js

Next, you'll need to make small modifications to the Freshpaint tracking snippet.​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.

Last updated