mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(config) add analytics
This commit is contained in:
parent
63aeb60a05
commit
90f944cb63
2 changed files with 12 additions and 7 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"api_url" : "/api/v1",
|
||||
"appcache" : false,
|
||||
"analytics" : true,
|
||||
"minification" : {
|
||||
"js" : true,
|
||||
"css" : true,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue