CMS Development

chrisati
Membro

Can I host my HubSpot Embeded Code .js locally?

resolver

I am starting to host most of my scripts on my local web server. Are there any issues with storing the .js script myself?

Any best-practices or how-tos or is it as easy as creating the below .js file at /scripts/555555.js and referencing it in the code?

 

<!-- Start of HubSpot Embed Code -->
<script type="text/javascript" id="hs-script-loader" async defer src="js/5555555.js"></script>
<!-- End of HubSpot Embed Code -->

0 Avaliação positiva
1 Solução aceita
stefen
Solução
Conselheiro(a) de destaque | Parceiro
Conselheiro(a) de destaque | Parceiro

Can I host my HubSpot Embeded Code .js locally?

resolver

@chrisati should have no problems with hosting it locally. Just download it and reference the local one instead of the hubspot hosted one. One thing I'd recommend is use something to download the file every once in a while in case it gets changed to keep them in sync. You could do that with PHP or Node or what have you. You could also just setup a notification service to send you a notifcation when the online file is updated and manually change it at that time.

Stefen Phelps, Community Champion, Kelp Web Developer

Exibir solução no post original

2 Respostas 2
TiphaineCuisset
Gerente da Comunidade
Gerente da Comunidade

Can I host my HubSpot Embeded Code .js locally?

resolver

Hi @chrisati 

 

Thank you for reaching out!

 

I want to tag an expert on this - @stefen  do you have any suggestions for @chrisati on this? 

 

Thank you!

Best

Tiphaine


Saviez vous que la Communauté est disponible en français?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !


0 Avaliação positiva
stefen
Solução
Conselheiro(a) de destaque | Parceiro
Conselheiro(a) de destaque | Parceiro

Can I host my HubSpot Embeded Code .js locally?

resolver

@chrisati should have no problems with hosting it locally. Just download it and reference the local one instead of the hubspot hosted one. One thing I'd recommend is use something to download the file every once in a while in case it gets changed to keep them in sync. You could do that with PHP or Node or what have you. You could also just setup a notification service to send you a notifcation when the online file is updated and manually change it at that time.

Stefen Phelps, Community Champion, Kelp Web Developer