mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Remove virtual page view tracking
Wasn’t useful, and distorts our GA real page view analytics.
This commit is contained in:
parent
9ec4b741c4
commit
5817553d54
13 changed files with 0 additions and 20 deletions
|
@ -51,7 +51,6 @@ module.exports = FacebookHandler = class FacebookHandler extends CocoClass
|
||||||
window.tracker?.trackEvent 'Facebook Login', category: "Signup", ['Google Analytics']
|
window.tracker?.trackEvent 'Facebook Login', category: "Signup", ['Google Analytics']
|
||||||
if model.id is beforeID
|
if model.id is beforeID
|
||||||
window.tracker?.trackEvent 'Finished Signup', category: "Signup", label: 'Facebook'
|
window.tracker?.trackEvent 'Finished Signup', category: "Signup", label: 'Facebook'
|
||||||
window.tracker?.trackPageView "signup/finished", ['Google Analytics']
|
|
||||||
window.location.reload() if model.get('email') isnt oldEmail
|
window.location.reload() if model.get('email') isnt oldEmail
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,6 @@ module.exports = GPlusHandler = class GPlusHandler extends CocoClass
|
||||||
window.tracker?.trackEvent 'Google Login', category: "Signup", ['Google Analytics']
|
window.tracker?.trackEvent 'Google Login', category: "Signup", ['Google Analytics']
|
||||||
if model.id is beforeID
|
if model.id is beforeID
|
||||||
window.tracker?.trackEvent 'Finished Signup', label: 'GPlus'
|
window.tracker?.trackEvent 'Finished Signup', label: 'GPlus'
|
||||||
window.tracker?.trackPageView "signup/finished", ['Google Analytics']
|
|
||||||
window.location.reload() if wasAnonymous and not model.get('anonymous')
|
window.location.reload() if wasAnonymous and not model.get('anonymous')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ module.exports = class SubscriptionView extends RootView
|
||||||
onClickStartSubscription: (e) ->
|
onClickStartSubscription: (e) ->
|
||||||
@openModalView new SubscribeModal()
|
@openModalView new SubscribeModal()
|
||||||
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'account subscription view'
|
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'account subscription view'
|
||||||
window.tracker?.trackPageView "subscription/show-modal", ['Google Analytics']
|
|
||||||
|
|
||||||
onSubscribed: ->
|
onSubscribed: ->
|
||||||
document.location.reload()
|
document.location.reload()
|
||||||
|
|
|
@ -91,7 +91,6 @@ module.exports = class AuthModal extends ModalView
|
||||||
return forms.applyErrorsToForm(@$el, res.errors) unless res.valid
|
return forms.applyErrorsToForm(@$el, res.errors) unless res.valid
|
||||||
Backbone.Mediator.publish "auth:signed-up", {}
|
Backbone.Mediator.publish "auth:signed-up", {}
|
||||||
window.tracker?.trackEvent 'Finished Signup', label: 'CodeCombat'
|
window.tracker?.trackEvent 'Finished Signup', label: 'CodeCombat'
|
||||||
window.tracker?.trackPageView "signup/finished", ['Google Analytics']
|
|
||||||
@enableModalInProgress(@$el)
|
@enableModalInProgress(@$el)
|
||||||
createUser userObject, null, window.nextLevelURL
|
createUser userObject, null, window.nextLevelURL
|
||||||
|
|
||||||
|
|
|
@ -56,14 +56,11 @@ module.exports = class RootView extends CocoView
|
||||||
switch @id
|
switch @id
|
||||||
when 'home-view'
|
when 'home-view'
|
||||||
window.tracker?.trackEvent 'Started Signup', category: 'Homepage', label: 'Homepage'
|
window.tracker?.trackEvent 'Started Signup', category: 'Homepage', label: 'Homepage'
|
||||||
window.tracker?.trackPageView "signup/start", ['Google Analytics']
|
|
||||||
when 'world-map-view'
|
when 'world-map-view'
|
||||||
# TODO: add campaign data
|
# TODO: add campaign data
|
||||||
window.tracker?.trackEvent 'Started Signup', category: 'World Map', label: 'World Map'
|
window.tracker?.trackEvent 'Started Signup', category: 'World Map', label: 'World Map'
|
||||||
window.tracker?.trackPageView "signup/start", ['Google Analytics']
|
|
||||||
else
|
else
|
||||||
window.tracker?.trackEvent 'Started Signup', label: @id
|
window.tracker?.trackEvent 'Started Signup', label: @id
|
||||||
window.tracker?.trackPageView "signup/start", ['Google Analytics']
|
|
||||||
@openModalView new AuthModal {mode: 'signup'}
|
@openModalView new AuthModal {mode: 'signup'}
|
||||||
|
|
||||||
onClickLoginButton: ->
|
onClickLoginButton: ->
|
||||||
|
|
|
@ -227,7 +227,6 @@ module.exports = class WorldMapView extends RootView
|
||||||
if level.requiresSubscription and @requiresSubscription and not @levelStatusMap[level.id] and not level.adventurer
|
if level.requiresSubscription and @requiresSubscription and not @levelStatusMap[level.id] and not level.adventurer
|
||||||
@openModalView new SubscribeModal()
|
@openModalView new SubscribeModal()
|
||||||
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'map level clicked', level: levelID
|
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'map level clicked', level: levelID
|
||||||
window.tracker?.trackPageView "subscription/show-modal", ['Google Analytics']
|
|
||||||
else if $(e.target).attr('disabled')
|
else if $(e.target).attr('disabled')
|
||||||
Backbone.Mediator.publish 'router:navigate', route: '/contribute/adventurer'
|
Backbone.Mediator.publish 'router:navigate', route: '/contribute/adventurer'
|
||||||
return
|
return
|
||||||
|
@ -236,13 +235,11 @@ module.exports = class WorldMapView extends RootView
|
||||||
else
|
else
|
||||||
@startLevel levelElement
|
@startLevel levelElement
|
||||||
window.tracker?.trackEvent 'Clicked Level', category: 'World Map', levelID: levelID, ['Google Analytics']
|
window.tracker?.trackEvent 'Clicked Level', category: 'World Map', levelID: levelID, ['Google Analytics']
|
||||||
window.tracker?.trackPageView "world-map/clicked-level/#{levelID}", ['Google Analytics']
|
|
||||||
|
|
||||||
onClickStartLevel: (e) ->
|
onClickStartLevel: (e) ->
|
||||||
levelElement = $(e.target).parents('.level-info-container')
|
levelElement = $(e.target).parents('.level-info-container')
|
||||||
@startLevel levelElement
|
@startLevel levelElement
|
||||||
window.tracker?.trackEvent 'Clicked Start Level', category: 'World Map', levelID: levelElement.data('level-id'), ['Google Analytics']
|
window.tracker?.trackEvent 'Clicked Start Level', category: 'World Map', levelID: levelElement.data('level-id'), ['Google Analytics']
|
||||||
window.tracker?.trackPageView "world-map/clicked-start-level/#{levelElement.data('level-id')}", ['Google Analytics']
|
|
||||||
|
|
||||||
startLevel: (levelElement) ->
|
startLevel: (levelElement) ->
|
||||||
@setupManager?.destroy()
|
@setupManager?.destroy()
|
||||||
|
|
|
@ -99,7 +99,6 @@ module.exports = class ControlBarView extends CocoView
|
||||||
|
|
||||||
onClickSignupButton: ->
|
onClickSignupButton: ->
|
||||||
window.tracker?.trackEvent 'Started Signup', category: 'Play Level', label: 'Control Bar', level: @levelID
|
window.tracker?.trackEvent 'Started Signup', category: 'Play Level', label: 'Control Bar', level: @levelID
|
||||||
window.tracker?.trackPageView "signup/start", ['Google Analytics']
|
|
||||||
|
|
||||||
onDisableControls: (e) -> @toggleControls e, false
|
onDisableControls: (e) -> @toggleControls e, false
|
||||||
onEnableControls: (e) -> @toggleControls e, true
|
onEnableControls: (e) -> @toggleControls e, true
|
||||||
|
|
|
@ -111,7 +111,6 @@ module.exports = class LevelLoadingView extends CocoView
|
||||||
onClickStartSubscription: (e) ->
|
onClickStartSubscription: (e) ->
|
||||||
@openModalView new SubscribeModal()
|
@openModalView new SubscribeModal()
|
||||||
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'level loading', level: @options.level.get('name') ? 'unknown'
|
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'level loading', level: @options.level.get('name') ? 'unknown'
|
||||||
window.tracker?.trackPageView "subscription/show-modal", ['Google Analytics']
|
|
||||||
|
|
||||||
onSubscribed: ->
|
onSubscribed: ->
|
||||||
document.location.reload()
|
document.location.reload()
|
||||||
|
|
|
@ -134,7 +134,6 @@ module.exports = class PlayLevelView extends RootView
|
||||||
loadDuration = @loadEndTime - @loadStartTime
|
loadDuration = @loadEndTime - @loadStartTime
|
||||||
console.debug "Level unveiled after #{(loadDuration / 1000).toFixed(2)}s"
|
console.debug "Level unveiled after #{(loadDuration / 1000).toFixed(2)}s"
|
||||||
application.tracker?.trackEvent 'Finished Level Load', category: 'Play Level', label: @levelID, level: @levelID, loadDuration: loadDuration, ['Google Analytics']
|
application.tracker?.trackEvent 'Finished Level Load', category: 'Play Level', label: @levelID, level: @levelID, loadDuration: loadDuration, ['Google Analytics']
|
||||||
application.tracker?.trackPageView "level-loaded/#{@levelID}", ['Google Analytics']
|
|
||||||
application.tracker?.trackTiming loadDuration, 'Level Load Time', @levelID, @levelID
|
application.tracker?.trackTiming loadDuration, 'Level Load Time', @levelID, @levelID
|
||||||
|
|
||||||
# CocoView overridden methods ###############################################
|
# CocoView overridden methods ###############################################
|
||||||
|
@ -417,7 +416,6 @@ module.exports = class PlayLevelView extends RootView
|
||||||
category: 'Play Level'
|
category: 'Play Level'
|
||||||
level: @level.get('name')
|
level: @level.get('name')
|
||||||
label: @level.get('name')
|
label: @level.get('name')
|
||||||
application.tracker?.trackPageView "level-completed/#{@levelID}", ['Google Analytics']
|
|
||||||
application.tracker?.trackTiming victoryTime, 'Level Victory Time', @levelID, @levelID, 100
|
application.tracker?.trackTiming victoryTime, 'Level Victory Time', @levelID, @levelID, 100
|
||||||
|
|
||||||
showVictory: ->
|
showVictory: ->
|
||||||
|
|
|
@ -342,5 +342,4 @@ module.exports = class HeroVictoryModal extends ModalView
|
||||||
onClickSignupButton: (e) ->
|
onClickSignupButton: (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
window.tracker?.trackEvent 'Started Signup', category: 'Play Level', label: 'Hero Victory Modal', level: @level.get('slug')
|
window.tracker?.trackEvent 'Started Signup', category: 'Play Level', label: 'Hero Victory Modal', level: @level.get('slug')
|
||||||
window.tracker?.trackPageView "signup/start", ['Google Analytics']
|
|
||||||
@openModalView new AuthModal {mode: 'signup'}
|
@openModalView new AuthModal {mode: 'signup'}
|
||||||
|
|
|
@ -73,7 +73,6 @@ module.exports = class VictoryModal extends ModalView
|
||||||
onClickSignupButton: (e) ->
|
onClickSignupButton: (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
window.tracker?.trackEvent 'Started Signup', category: 'Play Level', label: 'Victory Modal', level: @level.get('slug')
|
window.tracker?.trackEvent 'Started Signup', category: 'Play Level', label: 'Victory Modal', level: @level.get('slug')
|
||||||
window.tracker?.trackPageView "signup/start", ['Google Analytics']
|
|
||||||
@openModalView new AuthModal {mode: 'signup'}
|
@openModalView new AuthModal {mode: 'signup'}
|
||||||
|
|
||||||
onGameSubmitted: (e) ->
|
onGameSubmitted: (e) ->
|
||||||
|
|
|
@ -69,7 +69,6 @@ module.exports = class GameMenuModal extends ModalView
|
||||||
|
|
||||||
onClickSignupButton: (e) ->
|
onClickSignupButton: (e) ->
|
||||||
window.tracker?.trackEvent 'Started Signup', category: 'Play Level', label: 'Game Menu', level: @options.levelID
|
window.tracker?.trackEvent 'Started Signup', category: 'Play Level', label: 'Game Menu', level: @options.levelID
|
||||||
window.tracker?.trackPageView "signup/start", ['Google Analytics']
|
|
||||||
# TODO: Default already seems to be prevented. Need to be explicit?
|
# TODO: Default already seems to be prevented. Need to be explicit?
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@openModalView new AuthModal {mode: 'signup'}
|
@openModalView new AuthModal {mode: 'signup'}
|
||||||
|
|
|
@ -54,13 +54,11 @@ module.exports = class SubscribeModal extends ModalView
|
||||||
container: @$el
|
container: @$el
|
||||||
).on 'shown.bs.popover', =>
|
).on 'shown.bs.popover', =>
|
||||||
application.tracker?.trackEvent 'Subscription parent hover', {}
|
application.tracker?.trackEvent 'Subscription parent hover', {}
|
||||||
application.tracker?.trackPageView "subscription/parent-hover", ['Google Analytics']
|
|
||||||
|
|
||||||
onClickPurchaseButton: (e) ->
|
onClickPurchaseButton: (e) ->
|
||||||
@playSound 'menu-button-click'
|
@playSound 'menu-button-click'
|
||||||
return @openModalView new AuthModal() if me.get('anonymous')
|
return @openModalView new AuthModal() if me.get('anonymous')
|
||||||
application.tracker?.trackEvent 'Started subscription purchase', {}
|
application.tracker?.trackEvent 'Started subscription purchase', {}
|
||||||
application.tracker?.trackPageView "subscription/start-purchase", ['Google Analytics']
|
|
||||||
options = {
|
options = {
|
||||||
description: $.i18n.t('subscribe.stripe_description')
|
description: $.i18n.t('subscribe.stripe_description')
|
||||||
amount: @product.amount
|
amount: @product.amount
|
||||||
|
@ -95,7 +93,6 @@ module.exports = class SubscribeModal extends ModalView
|
||||||
|
|
||||||
onSubscriptionSuccess: ->
|
onSubscriptionSuccess: ->
|
||||||
application.tracker?.trackEvent 'Finished subscription purchase', revenue: @purchasedAmount / 100
|
application.tracker?.trackEvent 'Finished subscription purchase', revenue: @purchasedAmount / 100
|
||||||
application.tracker?.trackPageView "subscription/finish-purchase", ['Google Analytics']
|
|
||||||
Backbone.Mediator.publish 'subscribe-modal:subscribed', {}
|
Backbone.Mediator.publish 'subscribe-modal:subscribed', {}
|
||||||
@playSound 'victory'
|
@playSound 'victory'
|
||||||
@hide()
|
@hide()
|
||||||
|
|
Loading…
Reference in a new issue