feat(analytics): track tour step

This commit is contained in:
Tyler Renelle
2015-03-26 11:50:55 -06:00
committed by Kevin Gisi
parent e46789c303
commit f3e48093fb

View File

@@ -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 = "<div><div class='" + (env.worldDmg.guide ? "npc_justin_broken" : "npc_justin") + " float-left'></div>" + step.content + "</div>";
$(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