mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-03 10:23:48 -05:00
19 lines
No EOL
737 B
CoffeeScript
19 lines
No EOL
737 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
App.controller "FreeTrialModalController", ($scope, abTestManager)->
|
|
|
|
$scope.buttonClass = "btn-primary"
|
|
|
|
$scope.startFreeTrial = (source) ->
|
|
|
|
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 |