mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
When upgrading track changes on V2, redirect to V1 trial page
This commit is contained in:
parent
9fe1f36df4
commit
f5c914ed6c
2 changed files with 11 additions and 4 deletions
|
@ -95,6 +95,10 @@ html(itemscope, itemtype='http://schema.org/Product')
|
|||
cdnDomain : '!{settings.templates.cdnDomain}',
|
||||
indexName : '!{settings.templates.indexName}'
|
||||
}
|
||||
|
||||
- if (settings.overleaf && settings.overleaf.host)
|
||||
script.
|
||||
window.v1BaseUrl = '!{settings.overleaf.host}'
|
||||
|
||||
body
|
||||
if(settings.recaptcha)
|
||||
|
|
|
@ -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.v1BaseUrl?
|
||||
url = "#{window.v1BaseUrl}/users/trial"
|
||||
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