Created
September 24, 2018 00:52
-
-
Save arsduo/2f0bc9b32df4ff7323ce3a98d631edcb to your computer and use it in GitHub Desktop.
Event Logging in Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
playVideo() { | |
this.videoPlayer.play() | |
// eventLogger calls out to the server, which adds data about the | |
// user, their device, their school, etc. etc. etc. | |
eventLogger.log(“Student started video”, { | |
videoId: this.videoPlayer.videoId | |
}) | |
} | |
selectQuizAnswer(questionId, answerId) { | |
updateQuestionState(questionId, answerId).then(() => { | |
eventLogger.log(“Student chose quiz answer”, { | |
questionId: questionId, | |
activityId: activityId | |
}); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment