Skip to content

Commit

Permalink
eventValue determines NPS segment; not array index
Browse files Browse the repository at this point in the history
  • Loading branch information
groovecoder committed Aug 13, 2021
1 parent d76d5f3 commit bd8e87f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/js/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ function analyticsSurveyLogic() {
li.dataset.eventCategory = "NPS Survey";
li.dataset.eventAction = "submitted";
li.dataset.eventValue = option + 1;
if (option <= 6) {
if (li.dataset.eventValue <= 6) {
li.dataset.eventLabel = "detractor";
li.dataset.npsValue = -1;
} else if (option <= 8) {
} else if (li.dataset.eventValue <= 8) {
li.dataset.eventLabel = "passive";
li.dataset.npsValue = 0;
} else {
Expand Down

0 comments on commit bd8e87f

Please sign in to comment.