The Global-e Module JavaScript
Below is a suggested way of loading the Bespoke JavaScript library asynchronously on your site:
Integration Environment
<script id="globaleScript">
(function () {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = '//intgepi.bglobale.com/includes/js/{merchant id}';
document.getElementsByTagName('head')[0].appendChild(s);
})();
</script>Production Environment
<script id="globaleScript">
(function () {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = '//gepi.global-e.com/includes/js/{merchant id}';
document.getElementsByTagName('head')[0].appendChild(s);
})();
</script>The above snippets will ensure that the Bespoke JavaScript module will load asynchronously and not block your current page rendering.
Note
Replace {merchant id} at the end of the URL with the merchant ID provided to you by Global-e.