mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 06:23:41 -04:00
Tracking simulator clicks.
This commit is contained in:
parent
b973b749c0
commit
763e0500b2
2 changed files with 4 additions and 1 deletions
app
|
@ -55,6 +55,7 @@ module.exports = class Simulator extends CocoClass
|
|||
console.log info
|
||||
@trigger 'statusUpdate', info
|
||||
@simulateAnotherTaskAfterDelay()
|
||||
application.tracker?.trackEvent 'Simulator Result', label: "No Games"
|
||||
|
||||
simulateAnotherTaskAfterDelay: =>
|
||||
console.log "Retrying in #{@retryDelayInSeconds}"
|
||||
|
@ -169,6 +170,7 @@ module.exports = class Simulator extends CocoClass
|
|||
unless @options.headlessClient
|
||||
simulatedBy = parseInt($('#simulated-by-you').text(), 10) + 1
|
||||
$('#simulated-by-you').text(simulatedBy)
|
||||
application.tracker?.trackEvent 'Simulator Result', label: "Success"
|
||||
|
||||
handleTaskResultsTransferError: (error) =>
|
||||
@trigger 'statusUpdate', 'There was an error sending the results back to the server.'
|
||||
|
@ -270,7 +272,7 @@ module.exports = class Simulator extends CocoClass
|
|||
if spellTeam not in playerTeams then useProtectAPI = false
|
||||
@spells[spellKey].thangs[thang.id].aether = @createAether @spells[spellKey].name, method, useProtectAPI
|
||||
|
||||
transpileSpell: (thang, spellKey, methodName) ->
|
||||
transpileSpell: (thang, spellKey, methodName) ->
|
||||
|
||||
slugifiedThangID = _.string.slugify thang.id
|
||||
source = @currentUserCodeMap[[slugifiedThangID,methodName].join '/'] ? ""
|
||||
|
|
|
@ -38,6 +38,7 @@ module.exports = class SimulateTabView extends CocoView
|
|||
# Simulations
|
||||
|
||||
onSimulateButtonClick: (e) ->
|
||||
application.tracker?.trackEvent 'Simulate Button Click', {}
|
||||
$("#simulate-button").prop "disabled", true
|
||||
$("#simulate-button").text "Simulating..."
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue