mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
fix ab cookies and send 0 event when clicking monthly free trial button on plans page
This commit is contained in:
@@ -12,7 +12,7 @@ define [
|
||||
return ipCookie(cookieKey)
|
||||
|
||||
_persistCookieStep = (testName, bucket, newStep)->
|
||||
ipCookie(_buildCookieKey(testName, bucket), {step:newStep}, {expires:100})
|
||||
ipCookie(_buildCookieKey(testName, bucket), {step:newStep}, {expires:100, path:"/"})
|
||||
ga('send', 'event', 'ab_tests', "#{testName}:#{bucket}", "step-#{newStep}")
|
||||
|
||||
_checkIfStepIsNext = (cookieStep, newStep)->
|
||||
@@ -30,7 +30,7 @@ define [
|
||||
user_uuid = ipCookie(sl_user_test_token)
|
||||
if !user_uuid?
|
||||
user_uuid = Math.random()
|
||||
ipCookie(sl_user_test_token, user_uuid, {expires:365})
|
||||
ipCookie(sl_user_test_token, user_uuid, {expires:365, path:"/"})
|
||||
hash = CryptoJS.MD5("#{user_uuid}:#{testName}")
|
||||
return hash
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ define [
|
||||
$scope.signUpNowClicked = (plan, annual)->
|
||||
if $scope.ui.view == "annual"
|
||||
plan = "#{plan}_annual"
|
||||
else
|
||||
abTestManager.processTestWithStep("trial_len", bucket.bucketName, 0)
|
||||
event_tracking.send 'subscription-funnel', 'sign_up_now_button', plan
|
||||
|
||||
$scope.switchToMonthly = ->
|
||||
|
||||
Reference in New Issue
Block a user