-
-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails AB testing with “split” gem: Negative numbers on non-finished…? #43
Comments
What happened to me in this case was that when a user clicked refresh on the page it finalized twice, giving it negative numbers. As I understand the non-finished is calculated as "finished - participants". |
When you use the I suspect the desired behaviour when using |
For me yes! That would make sense. |
+1 |
+1 @andrew, I think there should be a new config that specifies if a participant should be counted for multiple conversions. In some cases you would want to be able to see total real conversions, but in many other (funnels for example) I just want to know how many participants got to the goal. Does that make sense? I might get around to adding this feature if its useful enough. |
@peppyheppy I don't think we need another config option for this, if you are resetting the user then they will be counted for multiple conversions, otherwise they should always receive the same alternative and not increment any counters. |
Has there been progress on this issue? |
Looking a little further - even with :reset => true, the following line of code is not executing as expected. Line 31 in Split::Helper.rb session[:split].delete(experiment_name) if options[:reset] The session experiment is still there after calling finished('test'). One can work around this by resetting the session manually and the completed counts will no longer increment. |
Clarififcation: This comment is about the previous comment where reset => true not reseting things In most places, the code access the session using
But in the finished method is using
Therefore easy to miss, but it should at a minimum do
but even better if it was consistent and did
I'll try to put a patch together in the next few hours |
No further response on this, closing for now. |
This fixes a major bug when negative non-finished numbers appear and simple random exception fired on dashboard. The problem was with User#cleanup_old_experiments! method because it treats “experimen1:finished” key as a non-found experiment and just deletes it. Related issues: splitrb#43 splitrb#103 splitrb#133 splitrb#355 splitrb#294 splitrb#272
This fixes a major bug when negative non-finished numbers appear and simple random exception fired on dashboard. The problem was with User#cleanup_old_experiments! method because it treats “experimen1:finished” key as a non-found experiment and just deletes it. Related issues: splitrb#43 splitrb#103 splitrb#133 splitrb#355 splitrb#294 splitrb#272
Usage is quite simple:
some_signin_view_file.erb:
<% signin_mode = ab_test( 'log in style','LogIn_ATest','LogIn_BTest' )%>
.
.
Do something according to signin_mode...
and
some_post_signin_controller_file.rb:
finished("log in style", :reset=> FALSE)
Did one simple test with no problems. However, my second test yield negative numbers on the non-finished columns, and only on the first experiment (marked as control).
How can it be negative...? Am i missing something?
[EDIT: remove a non working workaround that was here...]
see also http://stackoverflow.com/questions/9964357/rails-ab-testing-with-split-gem-negative-numbers-on-non-finished/9972546#9972546
The text was updated successfully, but these errors were encountered: