ga completion event modif
This commit is contained in:
@ -13,8 +13,6 @@ window.common = (function(global) {
|
||||
challengeTypes
|
||||
} = common;
|
||||
|
||||
let attempts = 0;
|
||||
|
||||
common.executeChallenge$ = function executeChallenge$() {
|
||||
const code = common.editor.getValue();
|
||||
const originalCode = code;
|
||||
@ -22,8 +20,6 @@ window.common = (function(global) {
|
||||
const tail = common.arrayToNewLineString(common.tail);
|
||||
const combinedCode = head + code + tail;
|
||||
|
||||
attempts++;
|
||||
|
||||
ga('send', 'event', 'Challenge', 'ran-code', common.challengeName);
|
||||
|
||||
// run checks for unsafe code
|
||||
|
@ -6,14 +6,14 @@ window.common = (function(global) {
|
||||
} = global;
|
||||
|
||||
common.showCompletion = function showCompletion() {
|
||||
var time = Math.floor(Date.now() - common.started);
|
||||
|
||||
ga(
|
||||
'send',
|
||||
'event',
|
||||
'Challenge',
|
||||
'solved',
|
||||
common.challengeName + ', Time: ' + time + ', Attempts: ' + 0
|
||||
common.challengeName,
|
||||
true
|
||||
);
|
||||
|
||||
var solution = common.editor.getValue();
|
||||
|
@ -92,7 +92,6 @@ block content
|
||||
common.challengeType = !{JSON.stringify(challengeType)};
|
||||
common.dashedName = !{JSON.stringify(dashedName)};
|
||||
|
||||
common.started = Math.floor(Date.now());
|
||||
common.username = !{JSON.stringify(user && user.username || '')};
|
||||
|
||||
include ../partials/challenge-footer
|
||||
|
@ -86,7 +86,6 @@ block content
|
||||
common.challengeType = !{JSON.stringify(challengeType)};
|
||||
common.dashedName = !{JSON.stringify(dashedName)};
|
||||
|
||||
common.started = Math.floor(Date.now());
|
||||
common.init.push(function() {
|
||||
common.editor.setOption('lint', false);
|
||||
common.editor.setOption('mode', 'text/html');
|
||||
@ -99,4 +98,3 @@ block content
|
||||
window.main.chat.createHelpChat('freecodecamp/help', '#challenge-help-btn');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -88,7 +88,6 @@ block content
|
||||
common.challengeType = !{JSON.stringify(challengeType)};
|
||||
common.dashedName = !{JSON.stringify(dashedName)};
|
||||
|
||||
common.started = Math.floor(Date.now());
|
||||
|
||||
include ../partials/challenge-footer
|
||||
script.
|
||||
|
@ -72,7 +72,6 @@ block content
|
||||
var common = window.common || { init: [] };
|
||||
common.challengeId = !{JSON.stringify(challengeId)};
|
||||
common.challengeName = !{JSON.stringify(name)};
|
||||
common.started = Math.floor(Date.now());
|
||||
common.dashedName = !{JSON.stringify(dashedName)};
|
||||
common.challengeType = !{JSON.stringify(challengeType)};
|
||||
|
||||
|
Reference in New Issue
Block a user