From e46e5a5cf49ae5d2d1833b29403d7c2a3af3d5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torben=20Ho=CC=88hn?= Date: Mon, 4 Jun 2018 11:46:24 +0200 Subject: [PATCH] check if order data is available to incl ec --- .../GoogleAnalytics/view/frontend/web/js/google-analytics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/GoogleAnalytics/view/frontend/web/js/google-analytics.js b/app/code/Magento/GoogleAnalytics/view/frontend/web/js/google-analytics.js index eb708ab8b6320..a8b8303d47cdd 100644 --- a/app/code/Magento/GoogleAnalytics/view/frontend/web/js/google-analytics.js +++ b/app/code/Magento/GoogleAnalytics/view/frontend/web/js/google-analytics.js @@ -53,7 +53,7 @@ define([ } // Process orders data - if (config.ordersTrackingData.length) { + if (config.ordersTrackingData.hasOwnProperty('currency')) { ga('require', 'ec', 'ec.js'); ga('set', 'currencyCode', config.ordersTrackingData.currency);