feature(config) add analytics

This commit is contained in:
coderaiser 2013-09-18 14:11:57 +00:00
parent 63aeb60a05
commit 90f944cb63
2 changed files with 12 additions and 7 deletions

View file

@ -1,6 +1,7 @@
{
"api_url" : "/api/v1",
"appcache" : false,
"analytics" : true,
"minification" : {
"js" : true,
"css" : true,

View file

@ -9,13 +9,17 @@ var Util, DOM, CloudCmd;
var Cache = DOM.Cache,
Events = DOM.Events;
this.analytics = function(){
Events.addOneTime('mousemove', function(){
var lUrl = CloudCmd.LIBDIRCLIENT + 'analytics.js';
setTimeout(function(){
DOM.jsload(lUrl);
}, 5000);
this.analytics = function() {
CloudCmd.getConfig(function(config) {
if (config.analytics) {
Events.addOneTime('mousemove', function(){
var lUrl = CloudCmd.LIBDIRCLIENT + 'analytics.js';
setTimeout(function(){
DOM.jsload(lUrl);
}, 5000);
});
}
});
};