diff --git a/examples/gsheets/data-config.js b/examples/gsheets/data-config.js index 42a636382..c3d909821 100644 --- a/examples/gsheets/data-config.js +++ b/examples/gsheets/data-config.js @@ -26,7 +26,6 @@ var data_config = { content_based: true, is_evaluation: true, - evaluation_service: ["matomo"], is_force_areas: true, area_force_alpha: 0.03, diff --git a/examples/project_website/data-config_base.js b/examples/project_website/data-config_base.js index 3907d6697..c9fd4d020 100644 --- a/examples/project_website/data-config_base.js +++ b/examples/project_website/data-config_base.js @@ -38,7 +38,6 @@ var data_config = { show_keywords: true, is_evaluation: true, - evaluation_service: ["matomo"], use_hypothesis: true, diff --git a/examples/project_website/data-config_pubmed.js b/examples/project_website/data-config_pubmed.js index 97e4f8710..d7aca734a 100644 --- a/examples/project_website/data-config_pubmed.js +++ b/examples/project_website/data-config_pubmed.js @@ -37,7 +37,6 @@ var data_config = { show_keywords: true, is_evaluation: true, - evaluation_service: ["matomo"], use_hypothesis: true, diff --git a/examples/viper/js/data-config_openaire.js b/examples/viper/js/data-config_openaire.js index 405117c30..57e853b56 100644 --- a/examples/viper/js/data-config_openaire.js +++ b/examples/viper/js/data-config_openaire.js @@ -64,7 +64,6 @@ var data_config = { }, is_evaluation: true, - evaluation_service: ["ga", "matomo"], use_hypothesis: true, diff --git a/vis/js/default-config.js b/vis/js/default-config.js index 81423a107..2a5545f12 100644 --- a/vis/js/default-config.js +++ b/vis/js/default-config.js @@ -94,8 +94,6 @@ var config = { show_loading_screen: false, //evaluation mode/events logging is_evaluation: false, - //which evaluation service to use. can also be an array. currently possible: "log", "matomo" and "ga" - evaluation_service: "log", //enable logging of mouseover events (use only temporarily as it creates A LOT of logging events) enable_mouseover_evaluation: false, //whether to embed the okmaps credit diff --git a/vis/js/headstart.js b/vis/js/headstart.js index 9128a0602..f062b251e 100644 --- a/vis/js/headstart.js +++ b/vis/js/headstart.js @@ -32,68 +32,6 @@ HeadstartFSM.prototype = { } }, - // TODO delete this completely - recordAction: function(id, category, action, user, timestamp, additional_params, post_data) { - - if(!config.is_evaluation) { - return; - } - - let services = config.evaluation_service; - - if(typeof services === "string") { - services = [services]; - } - - if (services.includes("log")) { - this.recordActionLog(category, action, id, user, timestamp, additional_params, post_data); - } - if (services.includes("ga")) { - this.recordActionGA(category, action, id, user, timestamp, additional_params, post_data); - } - }, - - recordActionLog: function(id, category, action, user, type, timestamp, additional_params, post_data) { - timestamp = (typeof timestamp !== 'undefined') ? (escape(timestamp)) : (""); - additional_params = (typeof additional_params !== 'undefined') ? ('&' + additional_params) : (""); - if(typeof post_data !== 'undefined') { - post_data = {post_data:post_data}; - } else { - post_data = {}; - } - - let php_script = config.server_url + "services/writeActionToLog.php"; - - $.ajax({ - url: php_script + - '?user=' + user + - '&category=' + category + - '&action=' + action + - '&item=' + encodeURI(id) + - '&type=' + type + - '&item_timestamp=' + timestamp + additional_params + '&jsoncallback=?', - type: "POST", - data: post_data, - dataType: "json", - success: function(output) { - console.log(output); - } - }); - }, - - recordActionGA: function(category, action, id) { - //gtag.js - if(typeof gtag === "function") { - gtag('event', action, { - 'event_category': category, - 'event_label': id - }); - //analytics.js - } else if (typeof ga === "function") { - ga('send', 'event', category, action, id); - } - }, - markProjectChanged: function (id) { let php_script = config.server_url + "services/markProjectChanged.php"; diff --git a/vis/js/mediator.js b/vis/js/mediator.js index a68ec6a4b..2e49f1eb1 100644 --- a/vis/js/mediator.js +++ b/vis/js/mediator.js @@ -32,7 +32,7 @@ var MyMediator = function() { this.fileData = []; this.mediator = new Mediator(); this.manager = new ModuleManager(); - this.intermediate_layer = new Intermediate(this.rescale_map, this.record_action); + this.intermediate_layer = new Intermediate(this.rescale_map); this.init(); this.init_state(); }; @@ -55,9 +55,6 @@ MyMediator.prototype = { // bubbles events this.mediator.subscribe("bubbles_update_data_and_areas", this.bubbles_update_data_and_areas); - - // misc - this.mediator.subscribe("record_action", this.record_action); }, init_state: function() { @@ -151,10 +148,6 @@ MyMediator.prototype = { mediator.render_frontend(); }, - record_action: function(id, category, action, user, type, timestamp, additional_params, post_data) { - window.headstartInstance.recordAction(id, category, action, user, type, timestamp, additional_params, post_data); - }, - dimensions_update: function() { mediator.intermediate_layer.updateDimensions(config, io.context); },