The currency exchange rates from Open Exchange Rates are made available to your tag configuration via the Tealium Currency Converter Tag. Once installed you can convert monetary amounts between currencies. This tag is used in conjunction with the Currency Converter Extension.
In this article:
There are two components related to implementing currency conversion:
The currency exchange rates are stored in this file:
This is a blocking tag so, while it is still loaded asynchronously, it will prevent other Tealium tags from loading until it is loaded.
This extension makes it easy to configure the currency conversion to store a converted value in a data layer variable. Learn more about the Currency Converter extension.
When the Currency Converter tag is loaded on the page, the following utility function is available for use:
tealiumiq_currency.convert(amount, source_currency, converted_currency)
|amount||The currency amount to convert, either as a string/number or an array of values. eg. 100 or [100, 200, 300]|
|source_currency||The three-character currency code representing the value in amount. eg. "USD"|
|converted_currency||The three-character currency code to convert the amount to. eg. "GBP"|
var order_total_uk = tealiumiq_currency.convert(100, "USD", "GBP");