Пример #1
0
        public void CreateGoalConversion(string goalName, int weight)
        {
            if (request.Cookies[APP_NAME + ".ab." + goalName] != null)
            {
                if (request.Cookies[APP_NAME + "." + goalName + ".converted"] != null)
                {
                    return;
                }

                string testName = request.Cookies[APP_NAME + ".ab." + goalName].Value;

                int views;
                if (!int.TryParse(request.Cookies[APP_NAME + ".ab." + testName + ".views"].Value, out views))
                {
                    views = 1;
                }

                if (testName != null && testName != "")
                {
                    ABTestConversionClient abtcc = new ABTestConversionClient();
                    abtcc.AddConversion(goalName, testName, weight, views);

                    response.Cookies[APP_NAME + "." + goalName + ".converted"].Value = "1";
                }
            }
        }
Пример #2
0
 public void CreateAutomatedConversion(string goalName, string testName, int weight)
 {
     if (Force)
     {
         if (testName != null && testName != "")
         {
             ABTestConversionClient abtcc = new ABTestConversionClient();
             abtcc.AddConversion(goalName, testName, weight, 1);
         }
     }
 }