From 137cffabecd80223884a17cafa856823a9e8d62a Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 2 Sep 2014 13:54:09 +0100 Subject: [PATCH] added some console.logs in --- .../coffee/analytics/AbTestingManager.coffee | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/services/web/public/coffee/analytics/AbTestingManager.coffee b/services/web/public/coffee/analytics/AbTestingManager.coffee index 70421a0eac..82bcf71112 100644 --- a/services/web/public/coffee/analytics/AbTestingManager.coffee +++ b/services/web/public/coffee/analytics/AbTestingManager.coffee @@ -5,17 +5,25 @@ define [ App.factory "abTestManager", ($http, ipCookie) -> - _buildCookieKey = (testName, bucket)-> "sl_abt_#{testName}_#{bucket}" + _buildCookieKey = (testName, bucket)-> + key = "sl_abt_#{testName}_#{bucket}" + console.log key + return key + _getTestCookie = (testName, bucket)-> cookieKey = _buildCookieKey(testName, bucket) - return ipCookie(cookieKey) + cookie = ipCookie(cookieKey) + console.log cookie + return cookie _persistCookieStep = (testName, bucket, newStep)-> - ipCookie(_buildCookieKey(testName, bucket), {step:newStep}, {expires:100, path:"/"}) + cookieKey = _buildCookieKey(testName, bucket) + ipCookie(cookieKey, {step:newStep}, {expires:100, path:"/"}) ga('send', 'event', 'ab_tests', "#{testName}:#{bucket}", "step-#{newStep}") _checkIfStepIsNext = (cookieStep, newStep)-> + console.log cookieStep, newStep, "checking if step is next" if !cookieStep? and newStep != 0 return false else if newStep == 0