> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.bglobale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Base Global‑e Script

<Warning>
  Depending on your Global-e integration type, the Global-e SDK may be included all your storefront pages automatically. Please check with your Global-e CSM if you are unsure.
</Warning>

You can host the SDKJavaScript file locally or be served from the Global-e servers. If you would like to host the file on your servers, you can download the script from the following location by replacing the appropriate parameters:

```
https://<domain>/merchant/clientsdk/<merchant id>?v=<version>
```

To load our base script, you should use a self-invoking function:

(\<window>, \<document>, \<sDomain> + \<clientJsURL>, "script", "gle", \<scriptVersion>, \<merchantId>)

**Production Example:**

```
(window, document, "https://web.global-e.com" + "/merchant/clientsdk/124125?v=2.1.4", "script", "gle", "2.1.4", 124125)
```

**Code Sample**

```
<script>
//Global‑e script initializer
(function (w, d, u, t, o, h, m, s, l) {
    w["globaleObject"] = o;
    w[o] = w[o] || function () {
        (w[o].q = w[o].q || []).push(arguments)
    };
    w[o].m = m,
    w[o].v = h;
    s = d.createElement(t);
    l = d.getElementsByTagName(t)[0];
    s.async = true;
    s.src = u + "?v=" + h;
    l.parentNode.insertBefore(s, l);
})(<window>, <document>, <globaleaddon.clientJsDomain> + <globaleaddon.clientJsUrl>, "script", "gle", <globaleaddon.scriptVersion>, <globaleaddon.merchantId>);
</script>
```

**Script Parameters**

| Parameter       | Description                                                                                                                                                                                                        |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `sDomain`       | Production: [https://web.global-e.comIntegration](https://web.global-e.comIntegration): [https://www.bglobale.comStaging](https://www.bglobale.comStaging): [https://www2.bglobale.com](https://www2.bglobale.com) |
| `window`        | The JavaScript window object                                                                                                                                                                                       |
| `document`      | The JavaScript document object                                                                                                                                                                                     |
| `clientJsURL`   | Local file path or direct to Global‑e servers`/merchant/clientsdk/<merchantId>?v=<scriptVersion>`                                                                                                                  |
| `ScriptVersion` | The version of Global-e server API.Currently 2.1.4.                                                                                                                                                                |
| `merchantId`    | The current Merchant ID                                                                                                                                                                                            |

This script loads the Global-e client script asynchronously.

The Global‑e client script uses an asynchronous approach so that you can start calling actions immediately; these actions are executed once the script is fully loaded.

<Note>
  This list is subject to modifications and limitations that may affect the availability of payment methods on the checkout page.
</Note>
