Can I install Freshpaint on a Chrome extension?
Last updated
Last updated
Yes! Here is a demo: https://github.com/freshpaint-io/demo-extension-trackingβ
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 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 -
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.