This guide is intended only for merchants who are not using the client-side SDK in their Global-e integration. Please note that this is not the standard Global-e integration method.
Overview
The Analytics SDK lets you track browsing activity for shoppers by sending analytics events to Global-e. The SDK must be loaded and initialized on every page where you want to capture events. After initialization, you must immediately send theBrowsingStart event.
Implementation Steps
-
Add the Analytics SDK script to the
<head>section of your site. Use the/PROD/path for production, and/QA-INT/or/STG/for testing or development. -
Immediately after the script, add the initialization code, replacing the placeholder values with your own:
- merchantId: your unique merchant identifier provided by Global-e.
- shopperCountryCode: the two-letter ISO 3166-1 Alpha-2 country code of the shopper, updated dynamically from your country selector.
- cdnUrl: the Global-e environment URL. For production use
https://webservices.global-e.com/, and for development useconnect.bglobale.com(QA-INT) orconnect2.bglobale.com(STG).
-
After initialization, immediately call
sendBrowsingStartEvent(). This step is critical for tracking user activity and must be repeated on every page load.

