Integration with Chrome Browser Extension


#1

Hi,

I’m looking to integrate Hubspot into our own custom Chrome browser extension as we’d like to track performance of our component and see what leads it helps drive back to the business. I’ve done some searching and not found anything that’s helped as yet so I’m hoping I may get some guidance here.

In order to implement Hubspot into our browser extension I updated our extension manifest file to allow the first JavaScript reference file “https://js.hs-scripts.com/2387660.js”, however upon testing I then noticed another two JavaScript files being pullsed in by the original script:

The issue I’m now experiencing are the file references being made within your JavaScript are made via “domain.com” rather “http://domain.com” or “https://domain.com”. I understand why it’s like that but within a Chrome extension this results in the extension looking for those additional scripts internally rather than via the web itself.

I could look to move the JavaScript files into the browser extension itself, manually update them etc. but it risks me breaking them in the first place or becoming obselete and broken at a later stage. I’ve had a look through your online help but I’ve not found anything of help. Are you able to advise me further?

Thanks, Ben