From f3e48093fbcacf8662364b80de8cbb83b4dbe710 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Thu, 26 Mar 2015 11:50:55 -0600 Subject: [PATCH] feat(analytics): track tour step --- website/public/js/services/guideServices.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/public/js/services/guideServices.js b/website/public/js/services/guideServices.js index 534a5c972d..e2c85b370d 100644 --- a/website/public/js/services/guideServices.js +++ b/website/public/js/services/guideServices.js @@ -155,7 +155,7 @@ function($rootScope, User, $timeout, $state) { } _.each(chapters, function(chapter, k){ - _(chapter).flatten().each(function(step) { + _(chapter).flatten().each(function(step, i) { step.content = "
" + step.content + "
"; $(step.element).popover('destroy'); // destroy existing hover popovers so we can add our own step.onShow = function(){ @@ -165,6 +165,7 @@ function($rootScope, User, $timeout, $state) { $state.go(step.state); return $timeout(function(){}); } + window.ga && ga('send', 'event', 'tour', k, i+1); } step.onHide = function(){ if (step.final) { // -2 indicates complete