mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
feat(analytics): track tour step
This commit is contained in:
parent
e46789c303
commit
f3e48093fb
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue