summaryrefslogtreecommitdiff
path: root/js/index.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-04-26 19:21:47 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2016-08-15 19:46:58 +0200
commit2c889d6b7430fd40c68fdc49058278ece63aec5d (patch)
treeb8fb83256f9ec7035bc2020c89b4d3a511554f43 /js/index.js
parentdcc406e5fce06685d40a5fd3b9e7ce686c185fba (diff)
downloadwvs-vplan-2c889d6b7430fd40c68fdc49058278ece63aec5d.tar.gz
wvs-vplan-2c889d6b7430fd40c68fdc49058278ece63aec5d.zip
verbessere Tracking
Diffstat (limited to 'js/index.js')
-rw-r--r--js/index.js8
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)));
}
}