diff --git a/client/commonFramework/execute-challenge-stream.js b/client/commonFramework/execute-challenge-stream.js index 2a29b9edf6..b81de64486 100644 --- a/client/commonFramework/execute-challenge-stream.js +++ b/client/commonFramework/execute-challenge-stream.js @@ -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 diff --git a/client/commonFramework/show-completion.js b/client/commonFramework/show-completion.js index 363e054478..5080efd629 100644 --- a/client/commonFramework/show-completion.js +++ b/client/commonFramework/show-completion.js @@ -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(); diff --git a/server/views/coursewares/showBonfire.jade b/server/views/coursewares/showBonfire.jade index fdd408fd67..0196efbb2a 100644 --- a/server/views/coursewares/showBonfire.jade +++ b/server/views/coursewares/showBonfire.jade @@ -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 diff --git a/server/views/coursewares/showHTML.jade b/server/views/coursewares/showHTML.jade index 1ca92040b4..8b8539dd28 100644 --- a/server/views/coursewares/showHTML.jade +++ b/server/views/coursewares/showHTML.jade @@ -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'); } }); - diff --git a/server/views/coursewares/showJS.jade b/server/views/coursewares/showJS.jade index 3b4c1131b4..4ca73e1f02 100644 --- a/server/views/coursewares/showJS.jade +++ b/server/views/coursewares/showJS.jade @@ -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. diff --git a/server/views/coursewares/showZiplineOrBasejump.jade b/server/views/coursewares/showZiplineOrBasejump.jade index 30c90ffec7..03c1ebb19e 100644 --- a/server/views/coursewares/showZiplineOrBasejump.jade +++ b/server/views/coursewares/showZiplineOrBasejump.jade @@ -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)};