@@ -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" ;
0 commit comments