mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 10:56:53 -05:00
Add analytics even for LevelLoad errors.
This commit is contained in:
parent
e9c7edb6be
commit
b308da0473
1 changed files with 5 additions and 0 deletions
|
@ -79,6 +79,11 @@ module.exports = class LevelLoader extends CocoClass
|
|||
@listenToOnce @level, 'sync', @onLevelLoaded
|
||||
|
||||
reportLoadError: ->
|
||||
window.tracker?.trackEvent 'LevelLoadError',
|
||||
category: 'Error',
|
||||
levelSlug: @work?.level?.slug,
|
||||
unloaded: JSON.stringify(@supermodel.report().map (m) -> _.result(m.model, 'url'))
|
||||
|
||||
return if me.isAdmin() or /dev=true/.test(window.location?.href ? '') or reportedLoadErrorAlready
|
||||
reportedLoadErrorAlready = true
|
||||
context = email: me.get('email')
|
||||
|
|
Loading…
Reference in a new issue