From 2c889d6b7430fd40c68fdc49058278ece63aec5d Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 26 Apr 2014 19:21:47 +0200 Subject: verbessere Tracking --- js/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/index.js b/js/index.js index 915942e..17ca007 100644 --- a/js/index.js +++ b/js/index.js @@ -16,11 +16,16 @@ * along with this program. If not, see . */ +function track(what){ + _paq.push(['trackPageView', what]); +} + // Login-Popup beim Start //$(document).bind('pageinit', function(){ document.addEventListener('deviceready', function(){ _paq.push(['setCustomVariable', 0, 'Modell', device.model, 'visit']); _paq.push(['setCustomVariable', 1, 'Version', device.version, 'visit']); + _paq.push(['trackPageView', 'load']); setTimeout(function(){ fillform(); @@ -290,6 +295,8 @@ function removelogintab(){ $('#login').remove(); $('#vplantabs').tabs('refresh'); + + track('ui/tab/plan_' + Math.floor((vdate - (new Date())) / (1000 * 60 * 60 * 24))); } function replaceUmlauts(umlautstr){ @@ -342,7 +349,6 @@ function addplanattr(fileEntry, wasdownloaded){ if($('#login').length && wasdownloaded){ removelogintab(); - track('ui/tab/plan_' + Math.floor((vdate - (new Date())) / (1000 * 60 * 60 * 24))); } } -- cgit v1.3.1