mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Switch redirectToOLFreeTrialUrl to calculate trial url
Sending unnecessary query params to OL seems like a footgun, so switch to compromise that is more explicit but doesn't send unnecessary query params
This commit is contained in:
@@ -98,11 +98,8 @@ html(itemscope, itemtype='http://schema.org/Product')
|
|||||||
|
|
||||||
- if (settings.overleaf && settings.overleaf.host)
|
- if (settings.overleaf && settings.overleaf.host)
|
||||||
script.
|
script.
|
||||||
window.freeTrialBaseUrl = '!{settings.overleaf.host}/users/trial'
|
window.redirectToOLFreeTrialUrl = '!{settings.overleaf.host}/users/trial'
|
||||||
- else
|
|
||||||
script.
|
|
||||||
window.freeTrialBaseUrl = '/user/subscription/new'
|
|
||||||
|
|
||||||
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")
|
||||||
|
|||||||
@@ -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 = "#{window.freeTrialBaseUrl}?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
|
||||||
|
|||||||
Reference in New Issue
Block a user