mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-17 07:21:05 +00:00
Merge pull request #202 from sharelatex/as-v2-upgrade-redirect
Use V1 trial page on V2 instead of legacy SL
This commit is contained in:
commit
f3342f327d
4 changed files with 12 additions and 18 deletions
|
@ -95,7 +95,11 @@ html(itemscope, itemtype='http://schema.org/Product')
|
|||
cdnDomain : '!{settings.templates.cdnDomain}',
|
||||
indexName : '!{settings.templates.indexName}'
|
||||
}
|
||||
|
||||
|
||||
- if (settings.overleaf && settings.overleaf.useOLFreeTrial)
|
||||
script.
|
||||
window.redirectToOLFreeTrialUrl = '!{settings.overleaf.host}/users/trial'
|
||||
|
||||
body
|
||||
if(settings.recaptcha)
|
||||
script(src="https://www.google.com/recaptcha/api.js?render=explicit")
|
||||
|
|
|
@ -533,14 +533,6 @@ define [
|
|||
else
|
||||
$scope.switchToSideBySideLayout()
|
||||
|
||||
$scope.startFreeTrial = (source) ->
|
||||
ga?('send', 'event', 'subscription-funnel', 'compile-timeout', source)
|
||||
|
||||
event_tracking.sendMB "subscription-start-trial", { source }
|
||||
|
||||
window.open("/user/subscription/new?planCode=#{$scope.startTrialPlanCode}")
|
||||
$scope.startedFreeTrial = true
|
||||
|
||||
App.factory "synctex", ["ide", "$http", "$q", (ide, $http, $q) ->
|
||||
# enable per-user containers by default
|
||||
perUserCompile = true
|
||||
|
|
|
@ -4,8 +4,3 @@ define [
|
|||
App.controller "TrackChangesUpgradeModalController", ($scope, $modalInstance) ->
|
||||
$scope.cancel = () ->
|
||||
$modalInstance.dismiss()
|
||||
|
||||
$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
|
|
@ -11,9 +11,12 @@ define [
|
|||
w = window.open()
|
||||
go = () ->
|
||||
ga?('send', 'event', 'subscription-funnel', 'upgraded-free-trial', source)
|
||||
url = "/user/subscription/new?planCode=#{plan}&ssp=true"
|
||||
if couponCode?
|
||||
url = "#{url}&cc=#{couponCode}"
|
||||
if window.redirectToOLFreeTrialUrl?
|
||||
url = window.redirectToOLFreeTrialUrl
|
||||
else
|
||||
url = "/user/subscription/new?planCode=#{plan}&ssp=true"
|
||||
if couponCode?
|
||||
url = "#{url}&cc=#{couponCode}"
|
||||
$scope.startedFreeTrial = true
|
||||
|
||||
switch source
|
||||
|
@ -27,7 +30,7 @@ define [
|
|||
|
||||
else
|
||||
event_tracking.sendMB "subscription-start-trial", { source, plan }
|
||||
|
||||
|
||||
w.location = url
|
||||
|
||||
if $scope.shouldABTestPlans
|
||||
|
|
Loading…
Reference in a new issue