diff options
Diffstat (limited to 'js/index.js')
| -rw-r--r-- | js/index.js | 8 |
1 files changed, 7 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>. */ +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))); } } |
