Skip to content

Commit 06aefdf

Browse files
committed
Sending events to Google Analytics to track when simple/advanced discoverers and composer are used
1 parent 632983d commit 06aefdf

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

jsondiscoverer.web/WebContent/app/controllers/advanced.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ angular.module("jsonDiscoverer").controller("AdvancedDiscovererCtrl", ["$scope",
6363
$scope.metamodel = "data:image/jpg;base64," + data.image;
6464
$scope.metamodelFile = "data:text/octet-stream;base64," + data.xmi;
6565
$scope.alertsGeneral.push({ type: 'warning', msg: 'Did you expect other schema? Please <a href="http://som-research.uoc.edu/tools/jsonDiscoverer/#/contact">contact us</a> to improve our tool!' });
66+
$window.ga('send', 'event', 'JSON Discoverer', 'AdvancedDiscoverer-Schema')
6667
},
6768
function(data, status, headers, config) {
6869
$scope.metamodel = "";

jsondiscoverer.web/WebContent/app/controllers/composition.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ angular.module("jsonDiscoverer").controller("CompositionCtrl", ["$scope", "$wind
8686
}
8787
$scope.sigmaGraph.refresh();
8888
$scope.layoutPosible = true;
89+
$window.ga('send', 'event', 'JSON Discoverer', 'Composer-Graph')
8990
},
9091
function(data, status, headers, config) {
9192
$scope.alertsGeneral.push({ type: 'error', msg: 'Oops, we found an error in the composition discovery process. Could you check your JSON and try again?' });
@@ -144,6 +145,7 @@ angular.module("jsonDiscoverer").controller("CompositionCtrl", ["$scope", "$wind
144145
function(data) {
145146
var diagram = Diagram.parse(data);
146147
diagram.drawSVG("sequence-diagram", {theme: 'simple'});
148+
$window.ga('send', 'event', 'JSON Discoverer', 'SimpleDiscoverer-SequenceDiagram')
147149
},
148150
function(data, status, headers, config) {
149151

jsondiscoverer.web/WebContent/app/controllers/simple.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ angular.module("jsonDiscoverer").controller("SimpleDiscovererCtrl", ["$scope", "
4545
$scope.metamodel = "data:image/jpg;base64," + data.image;
4646
$scope.metamodelFile = "data:text/octet-stream;base64," + data.xmi;
4747
$scope.alertsGeneral.push({ type: 'warning', msg: 'Did you expect other schema? Please <a href="http://som-research.uoc.edu/tools/jsonDiscoverer/#/contact">contact us</a> to improve our tool!' });
48+
$window.ga('send', 'event', 'JSON Discoverer', 'SimpleDiscoverer-Schema')
4849
},
4950
function(data, status, headers, config) {
5051
$scope.metamodel = "";
@@ -61,6 +62,7 @@ angular.module("jsonDiscoverer").controller("SimpleDiscovererCtrl", ["$scope", "
6162
function(data) {
6263
$scope.model = "data:image/jpg;base64," + data.image;
6364
$scope.modelFile = "data:text/octet-stream;base64," + data.xmi;
65+
$window.ga('send', 'event', 'JSON Discoverer', 'SimpleDiscoverer-DataModel')
6466
},
6567
function(data, status, headers, config) {
6668
$scope.model = "";

0 commit comments

Comments
 (0)