mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -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']
|
||||
if model.id is beforeID
|
||||
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
|
||||
})
|
||||
|
||||
|
|
|
@ -118,7 +118,6 @@ module.exports = GPlusHandler = class GPlusHandler extends CocoClass
|
|||
window.tracker?.trackEvent 'Google Login', category: "Signup", ['Google Analytics']
|
||||
if model.id is beforeID
|
||||
window.tracker?.trackEvent 'Finished Signup', label: 'GPlus'
|
||||
window.tracker?.trackPageView "signup/finished", ['Google Analytics']
|
||||
window.location.reload() if wasAnonymous and not model.get('anonymous')
|
||||
})
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ module.exports = class SubscriptionView extends RootView
|
|||
onClickStartSubscription: (e) ->
|
||||
@openModalView new SubscribeModal()
|
||||
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'account subscription view'
|
||||
window.tracker?.trackPageView "subscription/show-modal", ['Google Analytics']
|
||||
|
||||
onSubscribed: ->
|
||||
document.location.reload()
|
||||
|
|
|
@ -91,7 +91,6 @@ module.exports = class AuthModal extends ModalView
|
|||
return forms.applyErrorsToForm(@$el, res.errors) unless res.valid
|
||||
Backbone.Mediator.publish "auth:signed-up", {}
|
||||
window.tracker?.trackEvent 'Finished Signup', label: 'CodeCombat'
|
||||
window.tracker?.trackPageView "signup/finished", ['Google Analytics']
|
||||
@enableModalInProgress(@$el)
|
||||
createUser userObject, null, window.nextLevelURL
|
||||
|
||||
|
|
|
@ -56,14 +56,11 @@ module.exports = class RootView extends CocoView
|
|||
switch @id
|
||||
when 'home-view'
|
||||
window.tracker?.trackEvent 'Started Signup', category: 'Homepage', label: 'Homepage'
|
||||
window.tracker?.trackPageView "signup/start", ['Google Analytics']
|
||||
when 'world-map-view'
|
||||
# TODO: add campaign data
|
||||
window.tracker?.trackEvent 'Started Signup', category: 'World Map', label: 'World Map'
|
||||
window.tracker?.trackPageView "signup/start", ['Google Analytics']
|
||||
else
|
||||
window.tracker?.trackEvent 'Started Signup', label: @id
|
||||
window.tracker?.trackPageView "signup/start", ['Google Analytics']
|
||||
@openModalView new AuthModal {mode: 'signup'}
|
||||
|
||||
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
|
||||
@openModalView new SubscribeModal()
|
||||
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')
|
||||
Backbone.Mediator.publish 'router:navigate', route: '/contribute/adventurer'
|
||||
return
|
||||
|
@ -236,13 +235,11 @@ module.exports = class WorldMapView extends RootView
|
|||
else
|
||||
@startLevel levelElement
|
||||
window.tracker?.trackEvent 'Clicked Level', category: 'World Map', levelID: levelID, ['Google Analytics']
|
||||
window.tracker?.trackPageView "world-map/clicked-level/#{levelID}", ['Google Analytics']
|
||||
|
||||
onClickStartLevel: (e) ->
|
||||
levelElement = $(e.target).parents('.level-info-container')
|
||||
@startLevel levelElement
|
||||
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) ->
|
||||
@setupManager?.destroy()
|
||||
|
|
|
@ -99,7 +99,6 @@ module.exports = class ControlBarView extends CocoView
|
|||
|
||||
onClickSignupButton: ->
|
||||
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
|
||||
onEnableControls: (e) -> @toggleControls e, true
|
||||
|
|
|
@ -111,7 +111,6 @@ module.exports = class LevelLoadingView extends CocoView
|
|||
onClickStartSubscription: (e) ->
|
||||
@openModalView new SubscribeModal()
|
||||
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: ->
|
||||
document.location.reload()
|
||||
|
|
|
@ -134,7 +134,6 @@ module.exports = class PlayLevelView extends RootView
|
|||
loadDuration = @loadEndTime - @loadStartTime
|
||||
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?.trackPageView "level-loaded/#{@levelID}", ['Google Analytics']
|
||||
application.tracker?.trackTiming loadDuration, 'Level Load Time', @levelID, @levelID
|
||||
|
||||
# CocoView overridden methods ###############################################
|
||||
|
@ -417,7 +416,6 @@ module.exports = class PlayLevelView extends RootView
|
|||
category: 'Play Level'
|
||||
level: @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
|
||||
|
||||
showVictory: ->
|
||||
|
|
|
@ -342,5 +342,4 @@ module.exports = class HeroVictoryModal extends ModalView
|
|||
onClickSignupButton: (e) ->
|
||||
e.preventDefault()
|
||||
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'}
|
||||
|
|
|
@ -73,7 +73,6 @@ module.exports = class VictoryModal extends ModalView
|
|||
onClickSignupButton: (e) ->
|
||||
e.preventDefault()
|
||||
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'}
|
||||
|
||||
onGameSubmitted: (e) ->
|
||||
|
|
|
@ -69,7 +69,6 @@ module.exports = class GameMenuModal extends ModalView
|
|||
|
||||
onClickSignupButton: (e) ->
|
||||
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?
|
||||
e.preventDefault()
|
||||
@openModalView new AuthModal {mode: 'signup'}
|
||||
|
|
|
@ -54,13 +54,11 @@ module.exports = class SubscribeModal extends ModalView
|
|||
container: @$el
|
||||
).on 'shown.bs.popover', =>
|
||||
application.tracker?.trackEvent 'Subscription parent hover', {}
|
||||
application.tracker?.trackPageView "subscription/parent-hover", ['Google Analytics']
|
||||
|
||||
onClickPurchaseButton: (e) ->
|
||||
@playSound 'menu-button-click'
|
||||
return @openModalView new AuthModal() if me.get('anonymous')
|
||||
application.tracker?.trackEvent 'Started subscription purchase', {}
|
||||
application.tracker?.trackPageView "subscription/start-purchase", ['Google Analytics']
|
||||
options = {
|
||||
description: $.i18n.t('subscribe.stripe_description')
|
||||
amount: @product.amount
|
||||
|
@ -95,7 +93,6 @@ module.exports = class SubscribeModal extends ModalView
|
|||
|
||||
onSubscriptionSuccess: ->
|
||||
application.tracker?.trackEvent 'Finished subscription purchase', revenue: @purchasedAmount / 100
|
||||
application.tracker?.trackPageView "subscription/finish-purchase", ['Google Analytics']
|
||||
Backbone.Mediator.publish 'subscribe-modal:subscribed', {}
|
||||
@playSound 'victory'
|
||||
@hide()
|
||||
|
|
Loading…
Reference in a new issue