Removed google analytics

Relates to #39 (not closing as it still under discussion)
This commit is contained in:
Boaz Leskes 2014-01-22 13:50:22 +01:00
parent be7fa4e789
commit f21d3d2050
8 changed files with 6 additions and 40 deletions

View file

@ -1,20 +0,0 @@
define([], function () {
'use strict';
/* google analytics */
var _gaq = window._gaq = (window._gaq || []);
_gaq.push(['_setAccount', 'UA-11830182-16']);
_gaq.push(['_setCustomVar', 1, 'Version', SENSE_VERSION, 1]);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = 'https://ssl.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
return _gaq
});

View file

@ -1,5 +1,4 @@
define([
'analytics',
'curl',
'help_popup',
'history',
@ -10,7 +9,7 @@ define([
'misc_inputs',
'utils'
],
function (_gaq, curl, $helpPopup, history, input, $, mappings, output, miscInputs, utils) {
function (curl, $helpPopup, history, input, $, mappings, output, miscInputs, utils) {
'use strict';
$(document.body).removeClass('fouc');
@ -58,8 +57,6 @@ define([
}
);
saveCurrentState();
_gaq.push(['_trackEvent', "elasticsearch", 'query']);
});
}

View file

@ -1,10 +1,8 @@
define([
'sense_editor/editor',
'analytics',
'jquery',
'bootstrap'
], function (SenseEditor, _gaq, $) {
], function (SenseEditor, $) {
'use strict';
var $helpPopup = $("#help_popup");
@ -21,7 +19,6 @@ define([
].join('\n');
$helpPopup.on('shown', function () {
_gaq.push(['_trackEvent', "help", 'shown']);
$(html).appendTo("#help_example_container");
var example_editor = new SenseEditor($("#help_example_editor"));
example_editor.setReadOnly(true);

View file

@ -1,11 +1,10 @@
define([
'_',
'sense_editor/editor',
'analytics',
'jquery',
'moment',
'settings'
], function (_, SenseEditor, _gaq, $, moment) {
], function (_, SenseEditor, $, moment) {
'use strict';
function History() {
@ -129,7 +128,6 @@ define([
});
li.bind('apply', function () {
_gaq.push(['_trackEvent', "history", 'applied']);
self.restoreFromHistory(hist_elem);
});

View file

@ -1,6 +1,5 @@
define([
'ace',
'analytics',
'autocomplete',
'jquery',
'mappings',
@ -11,7 +10,7 @@ define([
'utils',
'zeroclip',
'ace_ext_language_tools'
], function (ace, _gaq, Autocomplete, $, mappings, output, SenseEditor, settings, require, utils, ZeroClipboard) {
], function (ace, Autocomplete, $, mappings, output, SenseEditor, settings, require, utils, ZeroClipboard) {
'use strict';
// disable standard context based autocompletion.
@ -113,7 +112,6 @@ define([
})
zc.on('complete', function () {
_gaq.push(['_trackEvent', "curl", 'copied']);
$copyAsCURL.click();
});

View file

@ -1,13 +1,12 @@
define([
'_',
'ace',
'analytics',
'curl',
'jquery',
'sense_editor/row_parser',
'sense_editor/mode/sense',
'utils'
], function (_, ace, _gaq, curl, $, RowParser, SenseMode, utils) {
], function (_, ace, curl, $, RowParser, SenseMode, utils) {
'use strict';
function isInt(x) {
@ -286,7 +285,6 @@ define([
};
editor.handleCURLPaste = function (text) {
_gaq.push(['_trackEvent', "curl", 'pasted']);
var curlInput = curl.parseCURL(text);
if ($("#es_server").val()) curlInput.server = null; // do not override server

View file

@ -1,10 +1,9 @@
define([
'sense_editor/editor',
'analytics',
'jquery',
'bootstrap'
], function (SenseEditor, _gaq, $) {
], function (SenseEditor, $) {
'use strict';
var $welcomePopup = $("#welcome_popup");

View file

@ -195,7 +195,6 @@
<script src="vendor/require/require.js"></script>
<script src="app/require.config.js"></script>
<script>
var SENSE_VERSION = '1.0.0';
// make sure all of ace is loaded first.
require(['require','ace'], function (require) { require(['app'], function () {})});
</script>