Skip to main content
This feature converts prices that are rendered inside content — content assets, slots, promotion callout messages, and similar HTML — into the shopper’s Global-e currency. It runs client-side, so use it for prices that are part of editorial/marketing HTML rather than product prices computed by the backend. The conversion is performed by the Global-e script loader (geScriptLoader.js), which scans the page for tagged elements. Mark up an element with data-ge-convert-price plus the appropriate data attributes.
Recommendation: for product prices, prefer backend conversion (see Price calculation). Use client-side product conversion only for specific cases.

Attributes

If both data-product-id and data-original-price are present, only data-product-id is used and data-original-price is ignored.

Examples

Convert an amount

The loader replaces the element’s text with the amount converted to the shopper’s Global-e currency (and applies FX/rounding rules for non-discount amounts).

Convert a discount amount

Same as amount conversion, but with data-is-discount="true" the conversion ignores the pricing coefficient and rounding.

Convert a product’s price

The loader fills the element with that product’s converted price (tax rates, product coefficients, and so on applied).

Summary

Use data-original-price to convert an arbitrary amount, or data-product-id to render a specific product’s converted price. For most product pricing, rely on backend conversion and reserve this client-side approach for prices embedded in content.

See also