Skip to main content

Documentation Portal

Excluding Elements from Price Conversion

By default, the Bespoke script converts all prices that are found on the page, to the selected end customer’s target currency, unless the certain element holding the price is explicitly excluded. The exclusion can be implemented either in the merchant-specific part of the Bespoke script as part of the integration scope on the Global‑e side, or by the merchant. For merchants wishing to exclude certain page elements from price conversion, the data-gem-ignore data attribute should be added to the respective HTML node.

For example, for a merchant having original prices in British Pounds, Bespoke will skip the following element and will not convert £100 to the target customer currency:

<div data-gem-ignore>Free Shipping for all orders over £100</div>
Manipulating Page Content

Merchants wishing to manipulate the page content based on the selected shipping country (for example to support promotional messages targeting), may use the data-manipulate data attribute.

The data-manipulate data attribute’s value should be JSON having HTML and/or CSS attributes for each country ISO code key that requires manipulation.

If specified, the HTML attribute should be set to any valid HTML that Bespoke will render as innerHTML of the respective node.

If specified, the CSS attribute should be set to any valid CSS that Bespoke will apply to the respective node.

In the example below, the “Free Shipping for all orders over €89” message will be shown only when the selected shipping country is The Netherlands:

<div data-manipulate= '{"NL" :{html":"Free Shipping for all orders over €89", "CSS":{"display":"block"}}}'></div>
Showing or Hiding Page Elements

Merchants wishing to show or hide a page element only for Global‑e operated countries may use

globale-show or globale-hide CSS classes respectively.

For example:

The following DIV element will be hidden only when one of the Global‑e-operated countries is selected:

<div class = "globale-hide"></div>

The following DIV element will be shown only when one of the Global‑e-operated countries is selected:

<div class = "globale-show" style= "display: none;"></div>
Client Side Events

Global‑e Client SDK fires various client events that can be handled by the merchant. For example, OnBeforeWelcome event is fired just before Global‑e “welcome” popup is displayed and allows embedding merchant-defined dynamic content to Global‑e “welcome” popup.

For the list of all the available client-side events, please refer to Global‑e Client SDK documentation here: https://web.global-e.com/merchant/clientapi#eventssummary

Client Side Analytics

The Global‑e Module, along with the Global‑e Client SDK, allows Merchants to easily integrate any analytics framework,

e.g. Google Analytics. This is done by intercepting an event that the Global‑e checkout fires at the end of the checkout process (see Client-side events section above). Global‑e passes all order information to this event, allowing the merchant to take this information and push it to an analytics system of its choice. For more information, please refer to the Global‑e Client SDK documentation here:

http://web.global-e.com/merchant/clientapi#gana

Search Engine Optimizations (SEO)

For Merchants using Google Shopping Feed, Bespoke supports country-specific URLs that can be used in country-specific feeds. These URLs essentially instruct Bespoke to perform price conversions based on the query string parameter rather than by GEO-IP resolution by default. So, in a country-specific feed, the merchant may append glCountry=<country iso code> query string argument to all product URLs.

For example, in order to force the prices to be UK-specific, glCountry=GB should be appended to product URLs. Assuming the regular product page URL is https://www.merchant.com/product1.html , the UK-specific URL that may be used in the UK-specific feed would be https://www.merchant.com/product1.html?glCountry=GB. This will make all prices on the page nominated in GBP and localized for UK users.

For more information regarding SEO, please contact Global‑e’s tech team.