mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-25 12:20:32 -04:00
Add level to Inventory Play analytics event
This commit is contained in:
parent
a652b70728
commit
bf20d5f7be
1 changed files with 2 additions and 1 deletions
|
@ -480,6 +480,7 @@ module.exports = class InventoryModal extends ModalView
|
||||||
|
|
||||||
onClickPlayLevel: (e) ->
|
onClickPlayLevel: (e) ->
|
||||||
return if @$el.find('#play-level-button').prop 'disabled'
|
return if @$el.find('#play-level-button').prop 'disabled'
|
||||||
|
levelSlug = @options.level.get('slug')
|
||||||
@playSound 'menu-button-click'
|
@playSound 'menu-button-click'
|
||||||
@showLoading()
|
@showLoading()
|
||||||
ua = navigator.userAgent.toLowerCase()
|
ua = navigator.userAgent.toLowerCase()
|
||||||
|
@ -488,7 +489,7 @@ module.exports = class InventoryModal extends ModalView
|
||||||
hasGoneFullScreenOnce = true
|
hasGoneFullScreenOnce = true
|
||||||
@updateConfig =>
|
@updateConfig =>
|
||||||
@trigger? 'play-click'
|
@trigger? 'play-click'
|
||||||
window.tracker?.trackEvent 'Inventory Play', category: 'Play Level'
|
window.tracker?.trackEvent 'Inventory Play', category: 'Play Level', level: levelSlug
|
||||||
|
|
||||||
updateConfig: (callback, skipSessionSave) ->
|
updateConfig: (callback, skipSessionSave) ->
|
||||||
sessionHeroConfig = @options.session.get('heroConfig') ? {}
|
sessionHeroConfig = @options.session.get('heroConfig') ? {}
|
||||||
|
|
Loading…
Add table
Reference in a new issue