* VRFS-709 - Audio Qualication instrumented

This commit is contained in:
Seth Call 2013-09-23 22:49:44 +00:00
parent 9c426fc5a7
commit 72b4aa969e
2 changed files with 19 additions and 2 deletions

View File

@ -105,7 +105,8 @@
function testComplete() {
logger.debug("Test complete");
var latencyMS = context.JK.FtueWizard.latencyMS;
if (latencyMS <= 20) {
var ftueSucceeded = latencyMS <= 20;
if (ftueSucceeded) {
logger.debug(latencyMS + " is <= 20. Setting FTUE status to true");
ftueSave(true); // Save the profile
context.jamClient.FTUESetStatus(true); // No FTUE wizard next time
@ -113,6 +114,10 @@
// notify anyone curious about how it went
$('div[layout-id=ftue]').trigger('ftue_success');
}
// notify GA of the success
context.JK.GA.trackFTUECompletion(ftueSucceeded, context.JK.detectOS());
updateGauge();
}

View File

@ -16,7 +16,9 @@
var categories = {
register : "Register",
download : "DownloadClient"
download : "DownloadClient",
audioTest : "AudioTest"
}
function translatePlatformForGA(platform) {
@ -67,9 +69,19 @@
ga('send', 'event', categories.download, normalizedPlatform);
}
function trackFTUECompletion(success, platform) {
assertBoolean(success);
var normalizedPlatform = translatePlatformForGA(platform);
var status = success ? "Passed" : "Failed";
ga('send', 'event', categories.audioTest, status, normalizedPlatform);
}
var GA = {};
GA.trackRegister = trackRegister;
GA.trackDownload = trackDownload;
GA.trackFTUECompletion = trackFTUECompletion;
context.JK.GA = GA;