{"id":96898,"date":"2025-02-19T06:33:27","date_gmt":"2025-02-19T06:33:27","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/gtmtips-get-latest-exchange-rates-for-client-side-conversions\/"},"modified":"2025-02-19T06:33:27","modified_gmt":"2025-02-19T06:33:27","slug":"gtmtips-get-latest-exchange-rates-for-client-side-conversions","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=96898","title":{"rendered":"#GTMTips: Get Latest Exchange Rates For Client-side Conversions"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p>It\u2019s been a while since I\u2019ve last written a bona fide <a href=\"https:\/\/tagmanager.google.com\/\">Google Tag Manager<\/a> <strong>trick<\/strong>, so here comes. This was inspired by Bart Gibby\u2019s question in <a href=\"https:\/\/www.measure.chat\/\">Measure Slack<\/a>.<\/p>\n<p>The purpose is to fetch the latest currency exchange rates from the <a href=\"https:\/\/exchangeratesapi.io\">exchangeratesapi.io<\/a> service, cache them using <code>sessionStorage<\/code>, and push the results into <code>dataLayer<\/code>. From <code>dataLayer<\/code>, they can then be utilized in Custom JavaScript variables and custom variable templates to perform client-side conversions. I\u2019ll show you how!<\/p>\n<p>                <span class=\"simmer\"><br \/>\n  <span class=\"close\">X<\/span><\/p>\n<p>\n    <span class=\"fa fa-md fa-bell\"\/><br \/>\n    <strong>The Simmer Newsletter<\/strong>\n  <\/p>\n<p>\n    Subscribe to the <a href=\"https:\/\/www.simoahava.com\/newsletter\/\">Simmer newsletter<\/a> to get the latest news and content from Simo Ahava into your email inbox!\n  <\/p>\n<p>  <\/span><\/p>\n<h2 id=\"tip-103-get-latest-currency-exchange-rates-in-gtm\">Tip 103: Get latest currency exchange rates in GTM<\/h2>\n<div style=\"aspect-ratio: 960 \/ 540;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/08\/get-latest-currency-rates-gtm.jpg\" title=\"Get latest currency rates in GTM\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"540\" width=\"960\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/08\/get-latest-currency-rates-gtm.jpg#ZgotmplZ\" alt=\"Get latest currency rates in GTM\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>The API request itself is run in a <strong>Custom HTML tag<\/strong> (as custom templates do not support arbitrary HTTP requests yet), so go ahead and create one. In the tag, add the following code:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-html\" data-lang=\"html\">script&gt;\n  (<span style=\"color:#00a\">function<\/span>() {\n    <span style=\"color:#aaa;font-style:italic\">\/\/ Set expiration to stored cache. Default 24 hours.\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>    <span style=\"color:#00a\">var<\/span> cacheExpiresHours = <span style=\"color:#099\">24<\/span>;\n    <span style=\"color:#aaa;font-style:italic\">\/\/ Set currency to get rates against\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>    <span style=\"color:#00a\">var<\/span> base = <span style=\"color:#a50\">'EUR'<\/span>;\n    \n    <span style=\"color:#aaa;font-style:italic\">\/\/ Do not edit below\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>    <span style=\"color:#00a\">var<\/span> rates = JSON.parse(<span style=\"color:#0aa\">window<\/span>.sessionStorage.getItem(<span style=\"color:#a50\">'currencyRates'<\/span>) || <span style=\"color:#a50\">'{}'<\/span>);\n    <span style=\"color:#00a\">var<\/span> now = <span style=\"color:#00a\">new<\/span> <span style=\"color:#0aa\">Date<\/span>().getTime();\n    <span style=\"color:#00a\">var<\/span> xhr;\n    <span style=\"color:#00a\">if<\/span> (!rates.timestamp || rates.timestamp + cacheExpiresHours * <span style=\"color:#099\">60<\/span> * <span style=\"color:#099\">60<\/span> * <span style=\"color:#099\">1000<\/span> new XMLHttpRequest();\n      xhr.open(<span style=\"color:#a50\">'GET'<\/span>, <span style=\"color:#a50\">'https:\/\/api.exchangeratesapi.io\/latest?base='<\/span> + base);\n      xhr.onreadystatechange = <span style=\"color:#00a\">function<\/span>() {\n        <span style=\"color:#00a\">if<\/span>(xhr.readyState === XMLHttpRequest.DONE) {\n          rates = JSON.parse(xhr.responseText).rates;\n          rates.timestamp = now;\n          sessionStorage.setItem(<span style=\"color:#a50\">'currencyRates'<\/span>, JSON.stringify(rates));\n          <span style=\"color:#0aa\">window<\/span>.dataLayer.push({\n\t\t    event: <span style=\"color:#a50\">'exchangeRates'<\/span>,\n\t\t    rates: rates,\n            ratesType: <span style=\"color:#a50\">'fresh'<\/span>\n          });\n        }\n      };\n      xhr.send();\n    } <span style=\"color:#00a\">else<\/span> {\n      <span style=\"color:#0aa\">window<\/span>.dataLayer.push({\n      \tevent: <span style=\"color:#a50\">'exchangeRates'<\/span>,\n        rates: rates,\n        ratesType: <span style=\"color:#a50\">'cached'<\/span>\n      });\n    }\n  })();\n<span style=\"color:#1e90ff;font-weight:bold\">script<\/span>&gt;<\/code><\/pre>\n<\/div>\n<p>Modify the <code>cacheExpiresHours<\/code> to determine how long the currency rates should be cached in the browser for. If you don\u2019t want to cache them, set it to <code>0<\/code>. This would fetch the latest rates with every page load.<\/p>\n<p>I would recommend using a cache. The API is a free service, and it\u2019s free for as long as it\u2019s not abused. It makes no sense to continually fetch the latest rates, so set the cache to something you can live with.<\/p>\n<p>You\u2019ll also need to set a base currency against which the rates are calculated. In the example, I\u2019m using <code>'EUR'<\/code> as I want the rates to be calculated against euros.<\/p>\n<p>The rest of the code follows this pattern:<\/p>\n<ol>\n<li>\n<p>If the currency rates are found in browser storage, and the cache expiration duration has not been met yet, then fetch the rates from storage and push them into <code>dataLayer<\/code>.<\/p>\n<\/li>\n<li>\n<p>If the rates are not found in browser storage, or if the cache expiration duration has been met, fetch the latest rates using an HTTP request to <code>https:\/\/api.exchangeratesapi.io\/latest<\/code>, using the base currency rate you provided in the script configuration. Push the results into <code>dataLayer<\/code>. Cache the results in browser storage.<\/p>\n<\/li>\n<\/ol>\n<p>I also included a key to reflect whether or not the results were cached (<code>ratesType: 'fresh\/cached'<\/code>), which you can use to determine the reliability of the results. This is what the <code>dataLayer<\/code> would look like:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-javascript\" data-lang=\"javascript\">{\n  event: <span style=\"color:#a50\">\"exchangeRates\"<\/span>,\n  rates: {\n    AUD: <span style=\"color:#099\">1.6467<\/span>,\n    BGN: <span style=\"color:#099\">1.9558<\/span>,\n    BRL: <span style=\"color:#099\">4.4099<\/span>,\n    CAD: <span style=\"color:#099\">1.4785<\/span>\n    CHF: <span style=\"color:#099\">1.0919<\/span>\n    CNY: <span style=\"color:#099\">7.8521<\/span>\n    CZK: <span style=\"color:#099\">25.727<\/span>\n    DKK: <span style=\"color:#099\">7.4644<\/span>\n    GBP: <span style=\"color:#099\">0.9183<\/span>,\n    ...\n    timestamp: <span style=\"color:#099\">1565172369394<\/span>\n  },\n  ratesType: <span style=\"color:#a50\">'fresh'<\/span>\n}\n<\/code><\/pre>\n<\/div>\n<p><strong>Set this tag to fire on the All Pages trigger<\/strong>. That way it will fire as soon as the GTM container has loaded.<\/p>\n<p>Now that the data is in <code>dataLayer<\/code>, you can create some variables that will let you use the results.<\/p>\n<p>To start off, a <strong>Data Layer variable<\/strong> for <code>rates<\/code> will fetch the corresponding object from GTM\u2019s data model.<\/p>\n<div style=\"aspect-ratio: 1124 \/ 760;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/08\/dlv-rates.jpg\" title=\"DLV - rates\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"760\" width=\"1124\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/08\/dlv-rates.jpg#ZgotmplZ\" alt=\"DLV - rates\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Now, to perform a conversion, you need the source variable (the value you want to convert) and this Data Layer variable. For example, if your source value is in Australian dollars, you can convert that to euros with a Custom JavaScript variable that has the following code:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-javascript\" data-lang=\"javascript\"><span style=\"color:#00a\">function<\/span>() {\n  <span style=\"color:#aaa;font-style:italic\">\/\/ Update these if necessary\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>  <span style=\"color:#00a\">var<\/span> convertFrom = <span style=\"color:#a50\">'AUD'<\/span>;\n  <span style=\"color:#00a\">var<\/span> sourceVariable = {{Source value <span style=\"color:#00a\">in<\/span> AUD}};\n  <span style=\"color:#00a\">var<\/span> rates = {{DLV - rates}};\n  \n  <span style=\"color:#aaa;font-style:italic\">\/\/ Don't change anything below\n<\/span><span style=\"color:#aaa;font-style:italic\"\/>  <span style=\"color:#00a\">if<\/span> (!rates || !rates[convertFrom] || <span style=\"color:#0aa\">isNaN<\/span>(sourceVariable)) {\n    <span style=\"color:#00a\">return<\/span> sourceVariable;\n  }\n  <span style=\"color:#00a\">return<\/span> sourceVariable \/ rates[convertFrom];\n}\n<\/code><\/pre>\n<\/div>\n<p>This variable pulls in the source value and the <code>rates<\/code> object. In case the <code>rates<\/code> object doesn\u2019t exist, OR it doesn\u2019t contain the currency symbol you want to convert from, OR the source variable does not return a number, the source variable is returned untouched.<\/p>\n<p>Otherwise, the variable divides the source variable with the exchange rate to give you the source variable value in the base currency you configured in the Custom HTML tag.<\/p>\n<p>You can also create a <a href=\"https:\/\/www.simoahava.com\/analytics\/custom-templates-guide-for-google-tag-manager\/#variable-template-walkthrough\">custom variable template<\/a> where the user indicates which source variable to use and what the currency symbol would be. The template would then return the result of the conversion.<\/p>\n<div style=\"aspect-ratio: 1510 \/ 814;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2019\/08\/currency-convert-template.jpg\" title=\"Currency conversion template\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"814\" width=\"1510\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2019\/08\/currency-convert-template.jpg#ZgotmplZ\" alt=\"Currency conversion template\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>You can download the template I created <a href=\"https:\/\/www.gtmtemplates.com\/template\/5754435435233280\/currency-conversion\">here<\/a>.<\/p>\n<blockquote>\n<p><strong>NOTE<\/strong>: The currency conversion will only work if the source variable is available when then conversion is made AND if the exchange rates have been successfully fetched. The request for the exchange rates is asynchronous, so you need to be careful not to fall into a race condition. You can use the <code>exchangeRates<\/code> event name in a Custom Event trigger if you want to fire a tag only after the exchange rates have been successfully retrieved.<\/p>\n<\/blockquote>\n<p>I hope this tip proves useful to someone, or at the very least gives you ideas for how to pull in data from public APIs, through GTM, into the user\u2019s web browser.<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>It\u2019s been a while since I\u2019ve last written a bona fide Google Tag Manager trick, so here comes. This was inspired by Bart Gibby\u2019s question in Measure Slack. The purpose is to fetch the latest currency exchange rates from the exchangeratesapi.io service, cache them using sessionStorage, and push the results into dataLayer. From dataLayer, they [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":96899,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[45739,20899,8467,14492,5683,11291],"dealstore":[],"offerexpiration":[],"class_list":["post-96898","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-clientside","tag-conversions","tag-exchange","tag-gtmtips","tag-latest","tag-rates"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>#GTMTips: Get Latest Exchange Rates For Client-side Conversions - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=96898\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"#GTMTips: Get Latest Exchange Rates For Client-side Conversions - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"It\u2019s been a while since I\u2019ve last written a bona fide Google Tag Manager trick, so here comes. This was inspired by Bart Gibby\u2019s question in Measure Slack. The purpose is to fetch the latest currency exchange rates from the exchangeratesapi.io service, cache them using sessionStorage, and push the results into dataLayer. From dataLayer, they [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=96898\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-02-19T06:33:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/get-latest-currency-rates-gtm.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=96898#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=96898\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"#GTMTips: Get Latest Exchange Rates For Client-side Conversions\",\"datePublished\":\"2025-02-19T06:33:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=96898\"},\"wordCount\":711,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=96898#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/get-latest-currency-rates-gtm.jpg\",\"keywords\":[\"Clientside\",\"Conversions\",\"Exchange\",\"GTMTips\",\"Latest\",\"Rates\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=96898#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=96898\",\"url\":\"https:\/\/fivemor.com\/?p=96898\",\"name\":\"#GTMTips: Get Latest Exchange Rates For Client-side Conversions - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=96898#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=96898#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/get-latest-currency-rates-gtm.jpg\",\"datePublished\":\"2025-02-19T06:33:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=96898#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=96898\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=96898#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/get-latest-currency-rates-gtm.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/get-latest-currency-rates-gtm.jpg\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=96898#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"#GTMTips: Get Latest Exchange Rates For Client-side Conversions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"#GTMTips: Get Latest Exchange Rates For Client-side Conversions - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=96898","og_locale":"en_US","og_type":"article","og_title":"#GTMTips: Get Latest Exchange Rates For Client-side Conversions - Som2ny Network","og_description":"It\u2019s been a while since I\u2019ve last written a bona fide Google Tag Manager trick, so here comes. This was inspired by Bart Gibby\u2019s question in Measure Slack. The purpose is to fetch the latest currency exchange rates from the exchangeratesapi.io service, cache them using sessionStorage, and push the results into dataLayer. From dataLayer, they [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=96898","og_site_name":"Som2ny Network","article_published_time":"2025-02-19T06:33:27+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/get-latest-currency-rates-gtm.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=96898#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=96898"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"#GTMTips: Get Latest Exchange Rates For Client-side Conversions","datePublished":"2025-02-19T06:33:27+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=96898"},"wordCount":711,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=96898#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/get-latest-currency-rates-gtm.jpg","keywords":["Clientside","Conversions","Exchange","GTMTips","Latest","Rates"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=96898#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=96898","url":"https:\/\/fivemor.com\/?p=96898","name":"#GTMTips: Get Latest Exchange Rates For Client-side Conversions - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=96898#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=96898#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/get-latest-currency-rates-gtm.jpg","datePublished":"2025-02-19T06:33:27+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=96898#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=96898"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=96898#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/get-latest-currency-rates-gtm.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/get-latest-currency-rates-gtm.jpg","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=96898#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"#GTMTips: Get Latest Exchange Rates For Client-side Conversions"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/96898","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=96898"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/96898\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/96899"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=96898"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=96898"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=96898"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=96898"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=96898"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}