Skip to main content
If you have a headless website, configure it as detailed in this section. Implement the following elements on your custom front end.

Localised Checkout

When building the checkout object, make sure to add the object’s relevant attributes to prevent the price and locale of the customer from falling back to domestic. It is important to pass the correct buyerIdentity otherwise the checkout experience of the merchant remains the default country and default currency of the website. See: https://shopify.dev/api/examples/international-pricing#create-a-checkout

Geo-Detection and Redirection - Headless Storefronts

You must implement geo-detection and redirection features using a custom or 3rd party solution that works with your headless storefront.

Marketing Banner

The Marketing Banner shows the amount customers need to spend to get free shipping (in their own currency). For more information, please see Marketing Banner. The following procedure lets you load the shipping banner to the front end. This procedure assumes that you have the required technical knowledge to implement this solution. To add the marketing banner script to your website’s front end:
  1. Create GLBE_PARAMS JavaScript variable on the site as follows:
    Example:
  2. ONLY after GLBE_PARAMS variable is set, call Global-e script available as follows: Production
    QA-INT
Positioning the Marketing Banner The Marketing Banner is inserted as the first element on your storefront. However, if this does not suit your store, Global-e can place the banner in a different location using the ID of an element. To insert the Marketing Banner in your preferred location on your storefront, add a new DIV element with a unique ID into your chosen location and share that ID with Global-e. This gives you complete control of the location of the banner and its position. Example

Website Adjustments (Headless Storefronts)

Step 1. Price Conversion API

Shopify converts the price base. To set up international prices on your local headless website and build your catalogue, get the relevant prices in the relevant currencies: extract the prices by calling the productVariantByIdAndCountry API. Description: This API passes the country code variant Id and returns the relevant price. You can extract more than one variant in a call. See https://shopify.dev/api/examples/international-pricing#query-product-prices for more information. Query:
Variable:
Example Return Body:
Explicit Price Formatting To prevent shopper confusion and increase international order conversion, use explicit price formatting where appropriate, according to Shopify recommendations. This means displaying the currency code in addition to the currency symbol on collections pages, PDPs, search results, and order subtotals on the cart and mini-cart.

Step 2. Country Selector

If you have not done so yet, add a Country Selector to enable the customer to choose the preferred country. See https://shopify.dev/api/examples/international-pricing#query-product-prices and Step 3. Add a Country Selector. To get the list of all countries available for the selector, place a GraphQL API call (See https://shopify.dev/api/examples/international-pricing#query-available-countries-and-currencies).

Step 3. Gift Card Tagging

To prevent gift cards from receiving an inflated price due to country coefficients, you must add the product tag pc-glbe-giftcard to all your gift card products. Make sure to add this tag in both the sandbox and production environments. Please let your Global-e project team or CSM know when this is done so Global-e may complete the configuration on our side.

Step 4. Gifts With Purchase and Free Sample Support

To allow gifts with purchase and free samples to have international duties and taxes calculated correctly and prevent other downstream issues, there are two approaches:
  • The free products must be assigned a non-zero price and have a 100% discount applied to them.
  • Alternatively, the free product can have a price of zero ("0") if the configured “Cost per item” is non-zero. This method requires additional configuration from Global-e so please reach out to your Global-e project manager or CSM to enable it.
Additionally, for either method the free products must be present inside the cart to ensure that they are transferred to Global-e’s services. As an international merchant, protecting your customers’ privacy is essential. Shoppers in many countries prioritize their privacy, often looking for features like cookie banners as indicators of trust before engaging with a store or making purchases. Shopify offers robust tools to safeguard customer privacy and obtain consent before collecting analytical data. These tools are fully compatible with the Global-e Shopify Native solution, ensuring seamless integration. It is important to note that if cookie consent is not collected, Shopify does not provide you with analytical data for the shopper’s session. Therefore, proper configuration is essential for tracking your storefront analytics. To implement a custom cookie banner or use Shopify’s default banner for collecting analytical data from international customers, refer to the instructions in Shopify’s Customer Privacy API documentation. Additionally, Global-e can integrate with your cookie consent solution to ensure that Global-e cookies comply with your customers’ privacy choices. Reach out to your Global-e contact to discuss enabling this feature.

Email Notifications Adjustments

Include Duties in Your Email Templates

The following templates are located under Shopify Admin > Settings > Notifications.
  • Order Confirmation
  • Order Cancellation
  • Pending Payment Success
  • Order Refund
To include duties in your email templates, use the following code:
To exclude the Taxes line when the amount is 0, adjust your template as shown below:

Customizable Products

If you sell customizable products (e.g., monogramming, etching, or embroidering names) for which you do not wish to accept returns, you can use a Global-e feature to indicate those products as non-returnable. To implement this feature:
  1. Decide on a product tag to indicate a product is non-returnable. For example: nonreturnable or finalsale.
  2. Tag your customizable products with your chosen tag by following the instructions here.
  3. Inform Global-e of the tag you have chosen so that Global-e can configure the same tag in our system. Customers can now see your non-returnable tag when they view your items and they are prevented from returning the item after purchase.

Shopping / Marketing Feeds (Headless)

Domestic Feeds If you have implemented automatic Geo IP redirection on your storefront, you can update your domestic product links to include a country parameter to prevent Google feed violations. This requires that you add logic to your storefront to set the shopper’s session to match the country specified in the parameter and prevent Geo IP from firing. Example: {base_url}/{product_url}?country=US International Feeds If you plan to submit international product feeds, make sure to update your links to your products and your storefront logic so that when the shopper clicks the links, the country in the shopper’s session reflects the parameter or the country code embedded in the product path. Examples of product pages for Germany:

Storefront Attribute Script

The storefront attributes script is needed for Forter fraud and device detection features. To implement the storefront attributes script:
  1. Add the following script tag to the head element of all storefront pages. Preferably, to the top of the HTML head section. Example for PROD.
    Example for QA:
    Use the following parameter values:
    ParameterDescription
    data-envGlobal-e environment identifier. Can be one of the following values:
    “int” - Integration
    ”prd” - Production
    data-midEncoded value of Global-e merchant ID. Note: You can get the encoded value from the mid-value in Global-e Admin, using Administrator credentials, from here: Admin > System > Encode/Decode > Encode Number.Global-e can provide this value in case of any issue with user permissions accessing the admin page.
    data-storeThe Global-e merchant store identifier for merchants with multiple production stores. Optional.
    srcEnvironment URI. Can be one of the following:
    Integration: https://bglobale.com/Scripts/Merchants/globale.merchant.storefront.js
    Production: https://web.global-e.com/Scripts/Merchants/globale.merchant.storefront.js
  2. Add listener to geCartAttributes event (sample code provided below). When geCartAttributes event is triggered, use Shopify Storefront API cartAttributesUpdate to update the Shopify cart with the same attributes provided by the geCartAttributes event. GeCartAttributes event data structure
    Sample event
    Sample event handling code
    Example The storefront attributes script provides the following attributes which need to be updated on the Shopify cart. This allows Forter to relate the checkout with your cart token, and based on the customer’s activity before the transaction, Forter’s fraud analysis is more accurate.
    Trigger the Global-e event geMerchantSession following any changes in event attribute values during the cart lifecycle, or on each page load. These event identifiers are used for Forter fraud detection and are shared with payment fraud service providers.
  3. On Windows object, set the event message as global variable geMerchantSession. This ensures that Global-e can read the event in case geMerchantSession is fired before the Global-e script is loaded. geMerchantSession event data structure
    Sample event
    Sample event handling code