Add level to Inventory Play analytics event

This commit is contained in:
Matt Lott 2015-05-05 15:05:18 -07:00
parent a652b70728
commit bf20d5f7be

View file

@ -480,6 +480,7 @@ module.exports = class InventoryModal extends ModalView
onClickPlayLevel: (e) ->
return if @$el.find('#play-level-button').prop 'disabled'
levelSlug = @options.level.get('slug')
@playSound 'menu-button-click'
@showLoading()
ua = navigator.userAgent.toLowerCase()
@ -488,7 +489,7 @@ module.exports = class InventoryModal extends ModalView
hasGoneFullScreenOnce = true
@updateConfig =>
@trigger? 'play-click'
window.tracker?.trackEvent 'Inventory Play', category: 'Play Level'
window.tracker?.trackEvent 'Inventory Play', category: 'Play Level', level: levelSlug
updateConfig: (callback, skipSessionSave) ->
sessionHeroConfig = @options.session.get('heroConfig') ? {}