Skip to content

Commit

Permalink
Merge pull request #1013 from mozilla/fix-nps-again
Browse files Browse the repository at this point in the history
eventValue determines NPS segment; not array index
  • Loading branch information
groovecoder authored Aug 16, 2021
2 parents 6fe5831 + bd8e87f commit 4d538d1
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 4d538d1

Please sign in to comment.