Skip to content

Commit 6095a04

Browse files
authored
Merge pull request #602 from OpenKnowledgeMaps/dead-tracking-code
Removed remaining legacy tracking code
2 parents 74dbf1e + 0754904 commit 6095a04

7 files changed

Lines changed: 1 addition & 76 deletions

File tree

examples/gsheets/data-config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ var data_config = {
2626

2727
content_based: true,
2828
is_evaluation: true,
29-
evaluation_service: ["matomo"],
3029

3130
is_force_areas: true,
3231
area_force_alpha: 0.03,

examples/project_website/data-config_base.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ var data_config = {
3838
show_keywords: true,
3939

4040
is_evaluation: true,
41-
evaluation_service: ["matomo"],
4241

4342
use_hypothesis: true,
4443

examples/project_website/data-config_pubmed.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ var data_config = {
3737
show_keywords: true,
3838

3939
is_evaluation: true,
40-
evaluation_service: ["matomo"],
4140

4241
use_hypothesis: true,
4342

examples/viper/js/data-config_openaire.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ var data_config = {
6464
},
6565

6666
is_evaluation: true,
67-
evaluation_service: ["ga", "matomo"],
6867

6968
use_hypothesis: true,
7069

vis/js/default-config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ var config = {
9494
show_loading_screen: false,
9595
//evaluation mode/events logging
9696
is_evaluation: false,
97-
//which evaluation service to use. can also be an array. currently possible: "log", "matomo" and "ga"
98-
evaluation_service: "log",
9997
//enable logging of mouseover events (use only temporarily as it creates A LOT of logging events)
10098
enable_mouseover_evaluation: false,
10199
//whether to embed the okmaps credit

vis/js/headstart.js

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -32,68 +32,6 @@ HeadstartFSM.prototype = {
3232
}
3333
},
3434

35-
// TODO delete this completely
36-
recordAction: function(id, category, action, user, timestamp, additional_params, post_data) {
37-
38-
if(!config.is_evaluation) {
39-
return;
40-
}
41-
42-
let services = config.evaluation_service;
43-
44-
if(typeof services === "string") {
45-
services = [services];
46-
}
47-
48-
if (services.includes("log")) {
49-
this.recordActionLog(category, action, id, user, timestamp, additional_params, post_data);
50-
}
51-
if (services.includes("ga")) {
52-
this.recordActionGA(category, action, id, user, timestamp, additional_params, post_data);
53-
}
54-
},
55-
56-
recordActionLog: function(id, category, action, user, type, timestamp, additional_params, post_data) {
57-
timestamp = (typeof timestamp !== 'undefined') ? (escape(timestamp)) : ("");
58-
additional_params = (typeof additional_params !== 'undefined') ? ('&' + additional_params) : ("");
59-
if(typeof post_data !== 'undefined') {
60-
post_data = {post_data:post_data};
61-
} else {
62-
post_data = {};
63-
}
64-
65-
let php_script = config.server_url + "services/writeActionToLog.php";
66-
67-
$.ajax({
68-
url: php_script +
69-
'?user=' + user +
70-
'&category=' + category +
71-
'&action=' + action +
72-
'&item=' + encodeURI(id) +
73-
'&type=' + type +
74-
'&item_timestamp=' + timestamp + additional_params + '&jsoncallback=?',
75-
type: "POST",
76-
data: post_data,
77-
dataType: "json",
78-
success: function(output) {
79-
console.log(output);
80-
}
81-
});
82-
},
83-
84-
recordActionGA: function(category, action, id) {
85-
//gtag.js
86-
if(typeof gtag === "function") {
87-
gtag('event', action, {
88-
'event_category': category,
89-
'event_label': id
90-
});
91-
//analytics.js
92-
} else if (typeof ga === "function") {
93-
ga('send', 'event', category, action, id);
94-
}
95-
},
96-
9735
markProjectChanged: function (id) {
9836

9937
let php_script = config.server_url + "services/markProjectChanged.php";

vis/js/mediator.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var MyMediator = function() {
3232
this.fileData = [];
3333
this.mediator = new Mediator();
3434
this.manager = new ModuleManager();
35-
this.intermediate_layer = new Intermediate(this.rescale_map, this.record_action);
35+
this.intermediate_layer = new Intermediate(this.rescale_map);
3636
this.init();
3737
this.init_state();
3838
};
@@ -55,9 +55,6 @@ MyMediator.prototype = {
5555

5656
// bubbles events
5757
this.mediator.subscribe("bubbles_update_data_and_areas", this.bubbles_update_data_and_areas);
58-
59-
// misc
60-
this.mediator.subscribe("record_action", this.record_action);
6158
},
6259

6360
init_state: function() {
@@ -151,10 +148,6 @@ MyMediator.prototype = {
151148
mediator.render_frontend();
152149
},
153150

154-
record_action: function(id, category, action, user, type, timestamp, additional_params, post_data) {
155-
window.headstartInstance.recordAction(id, category, action, user, type, timestamp, additional_params, post_data);
156-
},
157-
158151
dimensions_update: function() {
159152
mediator.intermediate_layer.updateDimensions(config, io.context);
160153
},

0 commit comments

Comments
 (0)