diff --git a/src/botPage/view/blockly/index.js b/src/botPage/view/blockly/index.js index 47ec73cead..1ea3de507a 100644 --- a/src/botPage/view/blockly/index.js +++ b/src/botPage/view/blockly/index.js @@ -72,6 +72,9 @@ const marketsWereRemoved = xml => { }, ], }); + if (window.trackJs) { + trackJs.track('Invalid financial market'); + } $('#unavailableMarkets').dialog('open'); return true; } diff --git a/src/botPage/view/blockly/utils.js b/src/botPage/view/blockly/utils.js index cf8879e3f8..ece0b55396 100644 --- a/src/botPage/view/blockly/utils.js +++ b/src/botPage/view/blockly/utils.js @@ -97,7 +97,12 @@ export const strategyHasValidTradeTypeCategory = xml => { return false; }); if (!validTradeTypeCategory) { - globalObserver.emit('ui.log.error', translate('The strategy you tried to import is invalid.')); + const errorMessage = translate('The strategy you tried to import is invalid.'); + globalObserver.emit('ui.log.error', errorMessage); + + if (window.trackJs) { + trackJs.track(errorMessage); + } } return validTradeTypeCategory; };