added ab test to show collar plan to people in editor

This commit is contained in:
Henry Oswald 2014-11-24 16:21:03 +00:00
parent a52b91691a
commit 6c0f03e9c7
6 changed files with 28 additions and 11 deletions

View file

@ -57,6 +57,7 @@ module.exports = SubscriptionController =
plan_code: req.query.planCode
currency: currency
plan:plan
showStudentPlan: req.query.ssp
recurlyConfig: JSON.stringify
currency: currency
subdomain: Settings.apis.recurly.subdomain

View file

@ -34,6 +34,12 @@ block content
.col-md-3.col-md-pull-6
if showStudentPlan == 'true'
a.btn-primary.btn.plansPageStudentLink(
href,
ng-click="switchToStudent()"
) #{translate("half_price_student")}
.card.card-first
.paymentPageFeatures
.page-header

View file

@ -35,11 +35,6 @@ block content
script(type="text/javascript").
window.ab = [
{step:2, bucket:"eu-eu", testName:"multi_currency"},
{step:2, bucket:"eu-usd", testName:"multi_currency"},
{step:1, bucket:"eu-eu", testName:"multi_currency_editor"},
{step:1, bucket:"eu-usd", testName:"multi_currency_editor"}
{step:1, bucket:"student_control", testName:"editor_plan"},
{step:1, bucket:"collab_test", testName:"editor_plan"},
]

View file

@ -65,10 +65,17 @@ define [
$scope.chat = {}
$scope.startFreeTrial = (source) ->
ga?('send', 'event', 'subscription-funnel', 'upgraded-free-trial', source)
window.open("/user/subscription/new?planCode=student_free_trial_7_days")
$scope.startedFreeTrial = true
testBuckets = [
{ bucketName:"student_control", planName:"student"}
{ bucketName:"collab_test", planName:"collaborator"}
]
editorPlanBucket = abTestManager.getABTestBucket "editor_plan", testBuckets
abTestManager.processTestWithStep("editor_plan", editorPlanBucket.bucketName, 0)
ga?('send', 'event', 'subscription-funnel', 'upgraded-free-trial', source)
window.open("/user/subscription/new?planCode=#{editorPlanBucket.planName}_free_trial_7_days&ssp=#{editorPlanBucket.planName == 'collaborator'}")
$scope.startedFreeTrial = true
window._ide = ide
ide.project_id = $scope.project_id = window.project_id

View file

@ -8,4 +8,7 @@ define [
$scope.plans = MultiCurrencyPricing.plans
$scope.changeCurrency = (newCurrency)->
window.location = "/user/subscription/new?planCode=#{window.plan_code}&currency=#{newCurrency}"
window.location = "/user/subscription/new?planCode=#{window.plan_code}&currency=#{newCurrency}"
$scope.switchToStudent = ()->
window.location = "/user/subscription/new?planCode=student&currency=#{$scope.currencyCode}"

View file

@ -91,6 +91,11 @@
}
}
.plansPageStudentLink {
margin-left: 20px;
margin-top: 20px;
}