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

# Currency conversion in content (client-side)

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.

<Note>
  **Recommendation:** for product prices, prefer **backend** conversion (see [Price calculation](/price-calculation-sfcc)). Use client-side product conversion only for specific cases.
</Note>

## Attributes

| Attribute | Required | Purpose |
| - | - | - |
| `data-ge-convert-price` | Yes | Marks the element for Global-e conversion. |
| `data-original-price` | For amount conversion | The amount in the original currency. |
| `data-is-discount` | Optional | When `true`, the conversion ignores the pricing coefficient and rounding (use for discount amounts). |
| `data-product-id` | For product price | Converts a specific product's price, applying tax rates, product coefficients, and so on. |

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

```html theme={null}
<span data-ge-convert-price data-original-price="300">$300</span>
```

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

```html theme={null}
<span data-ge-convert-price data-original-price="300" data-is-discount="true">$300</span>
```

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

### Convert a product's price

```html theme={null}
<span data-ge-convert-price data-product-id="793775064963M"></span>
```

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

* [Client JS SDK](/client-js-sdk-sfcc) — the Global-e script loader
* [Price calculation](/price-calculation-sfcc) — backend price conversion
