We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Dec 27, 2019 4:46 AM
Hello everyone,
I work on a web app that uses the Hubspot script tracking code => 'https://js.hs-scripts.com/${trackingCode}.js' in a way to use fonctionnalities of Hubspot.
I load another script at the beginning of my app (meetings embed script) to allow my users to take an appointment. In that case, my problem is that sometimes, the first Hubspot script is not loaded correctly in the page before the second script start to load, and infortunately it fires a 404 error on the meetings embed script.
I tried already to find a way to handle this, like using a callback to add on the script, but I don't find that on the documentation nor developpers forums.
Does anyon! Thanks by advance !
Nathan B.
Oct 16, 2020 4:42 AM
Hi @Nbergamini ,
This part of the docs may be helpful to you : https://legacydocs.hubspot.com/docs/methods/conversations_api/hubspot-conversations-javascript-api
Dec 29, 2019 11:43 PM
Hey @Nbergamini,
Just to clarify, currently you're embeding the HubSpot meeting widget on your web app and you'd like it to load first before the second script, is that right? If so, would you mind elaborating further the reason behind loading the meeting widget script before the second script?
Additionally, I dug into how to run a javascript before the other one and I believe this discussion on stack overflow may be helpful: https://stackoverflow.com/questions/10947424/how-to-run-a-javascript-script-before-the-other-ones.