From 72905c7ff2d11342ae2f3b1491c869fdb17c807b Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Wed, 20 Jul 2016 14:45:13 -0700 Subject: [PATCH] Reduce Mixpanel event tracking Turning off homepage events and play pageviews. --- app/core/Tracker.coffee | 2 +- app/views/NewHomeView.coffee | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/core/Tracker.coffee b/app/core/Tracker.coffee index 8c0f2eefc..22af1dfa5 100644 --- a/app/core/Tracker.coffee +++ b/app/core/Tracker.coffee @@ -96,7 +96,7 @@ module.exports = class Tracker extends CocoClass trackPageView: (includeIntegrations=[]) -> includeMixpanel = (name) -> - mixpanelIncludes = ['', 'schools', 'play', 'play/level/dungeons-of-kithgard'] + mixpanelIncludes = [] name in mixpanelIncludes or /courses|students|teachers/ig.test(name) name = Backbone.history.getFragment() diff --git a/app/views/NewHomeView.coffee b/app/views/NewHomeView.coffee index d3a1a05e8..e57c0f403 100644 --- a/app/views/NewHomeView.coffee +++ b/app/views/NewHomeView.coffee @@ -62,42 +62,42 @@ module.exports = class NewHomeView extends RootView super() onClickLearnMoreLink: -> - window.tracker?.trackEvent 'Homepage Click Learn More', category: 'Homepage', ['Mixpanel'] + window.tracker?.trackEvent 'Homepage Click Learn More', category: 'Homepage', [] @scrollToLink('#classroom-in-box-container') onClickPlayButton: (e) -> - window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel'] + window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', [] onClickRequestDemo: (e) -> @playSound 'menu-button-click' e.preventDefault() e.stopImmediatePropagation() - window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel'] + window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', [] if me.isTeacher() application.router.navigate '/teachers/update-account', trigger: true else application.router.navigate '/teachers/demo', trigger: true onClickSetupClass: (e) -> - window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel'] + window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', [] application.router.navigate("/teachers/classes", { trigger: true }) onClickStudentButton: (e) -> - window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel'] + window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', [] onClickTeacherButton: (e) -> - window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel'] + window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', [] if me.isTeacher() application.router.navigate('/teachers', { trigger: true }) else @scrollToLink('.request-demo-row', 600) onClickViewProfile: (e) -> - window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel'] + window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', [] application.router.navigate("/user/#{me.getSlugOrID()}", { trigger: true }) onClickWikiButton: (e) -> - window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', ['Mixpanel'] + window.tracker?.trackEvent $(e.target).data('event-action'), category: 'Homepage', [] window.location.href = 'https://sites.google.com/a/codecombat.com/teacher-guides/course-guides' afterRender: ->