mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Don't call participate if should not test plans
This commit is contained in:
parent
e268275e77
commit
ae2d030a32
1 changed files with 9 additions and 5 deletions
|
@ -9,15 +9,19 @@ define [
|
||||||
plan = 'collaborator_free_trial_7_days'
|
plan = 'collaborator_free_trial_7_days'
|
||||||
|
|
||||||
w = window.open()
|
w = window.open()
|
||||||
sixpack.participate 'plans-1610', ['default', 'heron', 'ibis'], (chosenVariation, rawResponse)->
|
go = () ->
|
||||||
if $scope.shouldABTestPlans and chosenVariation in ['heron', 'ibis']
|
|
||||||
plan = "collaborator_#{chosenVariation}"
|
|
||||||
|
|
||||||
ga?('send', 'event', 'subscription-funnel', 'upgraded-free-trial', source)
|
ga?('send', 'event', 'subscription-funnel', 'upgraded-free-trial', source)
|
||||||
url = "/user/subscription/new?planCode=#{plan}&ssp=true"
|
url = "/user/subscription/new?planCode=#{plan}&ssp=true"
|
||||||
if couponCode?
|
if couponCode?
|
||||||
url = "#{url}&cc=#{couponCode}"
|
url = "#{url}&cc=#{couponCode}"
|
||||||
|
|
||||||
$scope.startedFreeTrial = true
|
$scope.startedFreeTrial = true
|
||||||
event_tracking.sendMB "subscription-start-trial", { source, plan}
|
event_tracking.sendMB "subscription-start-trial", { source, plan}
|
||||||
w.location = url
|
w.location = url
|
||||||
|
|
||||||
|
if $scope.shouldABTestPlans
|
||||||
|
sixpack.participate 'plans-1610', ['default', 'heron', 'ibis'], (chosenVariation, rawResponse)->
|
||||||
|
if chosenVariation in ['heron', 'ibis']
|
||||||
|
plan = "collaborator_#{chosenVariation}"
|
||||||
|
go()
|
||||||
|
else
|
||||||
|
go()
|
||||||
|
|
Loading…
Reference in a new issue