We use Gatsby v4 for our site. I’m trying to find a good solution to improve the page loading time. We currently use gatsby-plugin-hubspot to embed the tracking code, use the Chat widget and so on.
But, Hubspot seems to load a lot of different JavaScript files on our site, with poor performance. There are a number of different script, and very short Cache TTL.
For us this is hurting our perfmance score in web.dev and google page speed insights. Especially on mobile.
Looking at our site I can see these scripts loaded from Hubspot.
Is there some way to concatinate these scripts and also improve the cache TTL?
- visitor.js (148 kb) https://static.hsappstatic.net/conversations-visitor-ui/static-1.11935/bundles/visitor.js
- bundle.production.js (94 kb) (https://static.hsappstatic.net/hubspot-dlb/static-1.185/bundle.production.js)
- bundle.production.js (17 kb) (https://static.hsappstatic.net/head-dlb/static-1.156/bundle.production.js) (Why to versions of this script?)
- nr-spa-1198.min.js (https://js-agent.newrelic.com/nr-spa-1198.min.js). Why are this New Relic tracker on our site?
- conversations-visitor-ui-lang-sv.js (5kb) (https://static.hsappstatic.net/conversations-visitor-ui/static-1.11919/conversations-visitor-ui-lang-sv.js). Can we disable this language?
- i18n-data-data-locales-sv.js (https://static.hsappstatic.net/conversations-visitor-ui/static-1.11919/i18n-data-data-locales-sv.js) Can we disable this locales file?
- https://static.hsappstatic.net/conversations-visitor-ui/static-1.11919/I18n-lang-sv.js
- https://js.hscollectedforms.net/collectedforms.js

