mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Add levelID property to show subscription modal events
Allows us to consolidate analytics collection indexes and code someday.
This commit is contained in:
parent
d0185cc2cd
commit
06436a4bb7
3 changed files with 7 additions and 3 deletions
|
@ -482,7 +482,8 @@ module.exports = class CampaignView extends RootView
|
|||
canPlayAnyway = not @requiresSubscription or level.adventurer or @levelStatusMap[level.slug]
|
||||
if requiresSubscription and not canPlayAnyway
|
||||
@openModalView new SubscribeModal()
|
||||
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'map level clicked', level: levelSlug
|
||||
# TODO: Added levelID on 2/9/16. Remove level property and associated AnalyticsLogEvent 'properties.level' index later.
|
||||
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'map level clicked', level: levelSlug, levelID: levelSlug
|
||||
else
|
||||
@startLevel levelElement
|
||||
window.tracker?.trackEvent 'Clicked Start Level', category: 'World Map', levelID: levelSlug
|
||||
|
|
|
@ -193,7 +193,9 @@ module.exports = class LevelLoadingView extends CocoView
|
|||
|
||||
onClickStartSubscription: (e) ->
|
||||
@openModalView new SubscribeModal()
|
||||
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'level loading', level: @level?.get('slug') or @options.level?.get('slug')
|
||||
levelSlug = @level?.get('slug') or @options.level?.get('slug')
|
||||
# TODO: Added levelID on 2/9/16. Remove level property and associated AnalyticsLogEvent 'properties.level' index later.
|
||||
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'level loading', level: levelSlug, levelID: levelSlug
|
||||
|
||||
onSubscribed: ->
|
||||
document.location.reload()
|
||||
|
|
|
@ -89,7 +89,8 @@ module.exports = class LevelGuideView extends CocoView
|
|||
clickSubscribe: (e) ->
|
||||
level = @levelSlug # Save ref to level slug
|
||||
@openModalView new SubscribeModal()
|
||||
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'help video clicked', level: level
|
||||
# TODO: Added levelID on 2/9/16. Remove level property and associated AnalyticsLogEvent 'properties.level' index later.
|
||||
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'help video clicked', level: level, levelID: level
|
||||
|
||||
clickTab: (e) =>
|
||||
@$el.find('li.active').removeClass('active')
|
||||
|
|
Loading…
Reference in a new issue