mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-20 03:22:37 +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}',
|
cdnDomain : '!{settings.templates.cdnDomain}',
|
||||||
indexName : '!{settings.templates.indexName}'
|
indexName : '!{settings.templates.indexName}'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- if (settings.overleaf && settings.overleaf.useOLFreeTrial)
|
||||||
|
script.
|
||||||
|
window.redirectToOLFreeTrialUrl = '!{settings.overleaf.host}/users/trial'
|
||||||
|
|
||||||
body
|
body
|
||||||
if(settings.recaptcha)
|
if(settings.recaptcha)
|
||||||
script(src="https://www.google.com/recaptcha/api.js?render=explicit")
|
script(src="https://www.google.com/recaptcha/api.js?render=explicit")
|
||||||
|
|
|
@ -533,14 +533,6 @@ define [
|
||||||
else
|
else
|
||||||
$scope.switchToSideBySideLayout()
|
$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) ->
|
App.factory "synctex", ["ide", "$http", "$q", (ide, $http, $q) ->
|
||||||
# enable per-user containers by default
|
# enable per-user containers by default
|
||||||
perUserCompile = true
|
perUserCompile = true
|
||||||
|
|
|
@ -4,8 +4,3 @@ define [
|
||||||
App.controller "TrackChangesUpgradeModalController", ($scope, $modalInstance) ->
|
App.controller "TrackChangesUpgradeModalController", ($scope, $modalInstance) ->
|
||||||
$scope.cancel = () ->
|
$scope.cancel = () ->
|
||||||
$modalInstance.dismiss()
|
$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()
|
w = window.open()
|
||||||
go = () ->
|
go = () ->
|
||||||
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"
|
if window.redirectToOLFreeTrialUrl?
|
||||||
if couponCode?
|
url = window.redirectToOLFreeTrialUrl
|
||||||
url = "#{url}&cc=#{couponCode}"
|
else
|
||||||
|
url = "/user/subscription/new?planCode=#{plan}&ssp=true"
|
||||||
|
if couponCode?
|
||||||
|
url = "#{url}&cc=#{couponCode}"
|
||||||
$scope.startedFreeTrial = true
|
$scope.startedFreeTrial = true
|
||||||
|
|
||||||
switch source
|
switch source
|
||||||
|
@ -27,7 +30,7 @@ define [
|
||||||
|
|
||||||
else
|
else
|
||||||
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
|
if $scope.shouldABTestPlans
|
||||||
|
|
Loading…
Reference in a new issue