mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-02 11:58:10 -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
|
@listenToOnce @level, 'sync', @onLevelLoaded
|
||||||
|
|
||||||
reportLoadError: ->
|
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
|
return if me.isAdmin() or /dev=true/.test(window.location?.href ? '') or reportedLoadErrorAlready
|
||||||
reportedLoadErrorAlready = true
|
reportedLoadErrorAlready = true
|
||||||
context = email: me.get('email')
|
context = email: me.get('email')
|
||||||
|
|
Loading…
Reference in a new issue