Permalink
Browse files

Don't track visitors on these two experiments.

  • Loading branch information...
1 parent 2568e78 commit 57ea4c023fc3eb98d23627b90b26a3b5f26b50d2 @mpereira mpereira committed Oct 31, 2011
@@ -1,7 +1,6 @@
# -*- coding: undecided -*-
# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
-require 'singleton'
class ApplicationController < ActionController::Base
include AuthenticatedSystem
@@ -19,15 +18,6 @@ class ApplicationController < ActionController::Base
before_filter :track_user
layout :set_layout
- # Vanity expects an object that responds to #id.
- class UntrackedUser
- include Singleton
-
- def id
- '03571a60f217cf68f795875d108a73fa21e0c2bcce7f'
- end
- end
-
# This is a turnaround for the shortcomings of the vanity gem. This code will
# create at most one participant and one conversion in a random group for all
# our untracked users. This is necessary because `use_vanity` is a class-level
@@ -36,7 +26,7 @@ def id
def _vanity_identity
if current_user
- current_user.tracked? ? current_user : UntrackedUser.instance
+ current_user.tracked? ? current_user : Umamao::UntrackedUser.instance
end
end
@@ -1,4 +1,6 @@
ab_test 'Answer with form position' do
alternatives :below, :above
metrics :new_search_result
+ identify { |c| c.current_user ? c.current_user.id :
+ Umamao::UntrackedUser.instance.id }
end
@@ -1,4 +1,6 @@
ab_test 'Question responding helpers' do
alternatives :none, :google_search_link, :bing_results
metrics :question_posted
+ identify { |c| c.current_user ? c.current_user.id :
+ Umamao::UntrackedUser.instance.id }
end
View
@@ -0,0 +1,3 @@
+module Umamao; end
+
+require File.expand_path('../umamao/untracked_user', __FILE__)
@@ -0,0 +1,10 @@
+require 'singleton'
+
+# Vanity expects an object that responds to #id.
+class Umamao::UntrackedUser
+ include Singleton
+
+ def id
+ '03571a60f217cf68f795875d108a73fa21e0c2bcce7f'
+ end
+end

0 comments on commit 57ea4c0

Please sign in to comment.