diff --git a/assets/js/scripts.js b/assets/js/scripts.js index 37ab307..4207b8d 100644 --- a/assets/js/scripts.js +++ b/assets/js/scripts.js @@ -1,5 +1,7 @@ jQuery(function ($) { jQuery('document').ready(function ($) { + _paq.push(['trackEvent', 'Quiz', 'Unique Visitor']); + // Simple AJAX listeners $(document).bind("ajaxSend", function () { $('.btn-primary').attr('disabled', 'disabled'); @@ -11,6 +13,7 @@ jQuery(function ($) { updateProgressBar(1); $('.footer').addClass('animated fadeOutDown'); $('.footer-quiz').addClass('animated fadeInUpBig').show(); + _paq.push(['trackEvent', 'Quiz', 'Started']); setTimeout(function () { $('.footer').hide(); @@ -104,6 +107,7 @@ jQuery(function ($) { // Show quiz results modal $('#get-results').click(function () { $('#quiz-results').modal('show'); + _paq.push(['trackEvent', 'Quiz', 'Opened Modal']); return false; }); @@ -314,6 +318,10 @@ jQuery(function ($) { } } + if (step != '') { + _paq.push(['trackEvent', 'Quiz', 'Answered Question', step]); + } + var next = active.nextAll('.page').first(); active.removeClass('fadeIn fadeInUpBig fadeInDownBig fadeOutUpBig fadeOutDownBig').addClass('fadeOutUpBig'); next.removeClass('fadeIn fadeInUpBig fadeInDownBig fadeOutUpBig fadeOutDownBig').addClass('animated fadeInUpBig').show(); diff --git a/chiro-quiz.php b/chiro-quiz.php index 6feb21a..eee436f 100755 --- a/chiro-quiz.php +++ b/chiro-quiz.php @@ -1,7 +1,7 @@