1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-11 00:56:25 +02:00

feature: add any external js/css lib. fixes #19

This commit is contained in:
Kushagra Gour
2016-12-02 14:15:12 +05:30
parent f9697d40bc
commit 811d72964a
4 changed files with 121 additions and 14 deletions

View File

@ -1,11 +1,15 @@
window.trackEvent = function (category, action, label, value) {
if (window.DEBUG) {
utils.log('trackevent', category, action, label, value)
return;
}
if (window.ga) {
ga('send', 'event', category, action, label, value);
}
}
// if online, load after 2 seconds
if (navigator.onLine) {
if (navigator.onLine && !window.DEBUG) {
setTimeout(function() {
(function(i,s,o,g,r,a,m){
i['GoogleAnalyticsObject']=r;