Jelajahi Sumber

added piwik tracking for RandomPlayer

Bachir Soussi Chiadmi 7 tahun lalu
induk
melakukan
65d95036c0

+ 9 - 0
sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js

@@ -1044,12 +1044,21 @@
         this.$btn.addClass('is-active');
         this.shuffle();
         this.next();
+        // piwik
+        if(typeof _paq !== 'undefined'){
+          // trackEvent(category, action, [name], [value])
+          _paq.push(['trackEvent', 'RandomPlayer', 'start']);
+        }
       },
       stop(){
         this.active = _audioPlayer.shuffle_is_active = false;
         this.$btn.removeClass('is-active');
         // stop audio player
         // _audioPlayer.stop();
+        if(typeof _paq !== 'undefined'){
+          // trackEvent(category, action, [name], [value])
+          _paq.push(['trackEvent', 'RandomPlayer', 'stop']);
+        }
       },
       next(){
         if(this.active && this.shuffledPlaylist.length > 0)

+ 9 - 0
sites/all/themes/custom/edlptheme/assets/scripts/main.js

@@ -1044,12 +1044,21 @@
         this.$btn.addClass('is-active');
         this.shuffle();
         this.next();
+        // piwik
+        if(typeof _paq !== 'undefined'){
+          // trackEvent(category, action, [name], [value])
+          _paq.push(['trackEvent', 'RandomPlayer', 'start']);
+        }
       },
       stop(){
         this.active = _audioPlayer.shuffle_is_active = false;
         this.$btn.removeClass('is-active');
         // stop audio player
         // _audioPlayer.stop();
+        if(typeof _paq !== 'undefined'){
+          // trackEvent(category, action, [name], [value])
+          _paq.push(['trackEvent', 'RandomPlayer', 'stop']);
+        }
       },
       next(){
         if(this.active && this.shuffledPlaylist.length > 0)