Remove test-related tracking and analytics code.

This commit is contained in:
Paulo Reis 2016-11-22 10:50:29 +00:00
parent dce272462a
commit fab7ec3e98

View file

@ -72,7 +72,6 @@ define [
}
$scope.user = window.user
$scope.shouldABTestPlans = false
if $scope.user.signUpDate >= '2016-10-27'
$scope.shouldABTestPlans = true
@ -86,23 +85,6 @@ define [
$scope.ui.reviewPanelOpen = !$scope.ui.reviewPanelOpen
$scope.$digest()
# Only run the header AB test for newly registered users.
_abTestStartDate = new Date(Date.UTC(2016, 8, 28))
_userSignUpDate = new Date(window.user.signUpDate)
$scope.shouldABTestHeaderLabels = _userSignUpDate > _abTestStartDate
$scope.headerLabelsABVariant = ""
if ($scope.shouldABTestHeaderLabels)
sixpack.participate "editor-header", [ "default", "labels"], (chosenVariation) ->
$scope.headerLabelsABVariant = chosenVariation
$scope.trackABTestConversion = (headerItem) ->
event_tracking.sendMB "header-ab-conversion", {
headerItem: headerItem,
variant: $scope.headerLabelsABVariant
}
# Tracking code.
$scope.$watch "ui.view", (newView, oldView) ->
if newView? and newView != "editor" and newView != "pdf"