Usage
Sorry for the messy wiki. Feel free to help get it organized ;-)
:hit, :new_visitor and :return_visit events will be logged automatically.
When a user get’s added part way through, the :user_id will get filled in for all the previous events for that session. The :new_visitor event for the session will also be turned into a :return_visit if the user has an earlier dated :new_visitor event on their account. The amount fo time that must past for a :return_visit event is going to be configurable once I get to it…
You can store any additional by calling report!(event_sym, options = {})
in the controller. You can also log an event from a model with the same method report!(event_sym, options = {})
, but you will need to provide the :user_id
or :account_id
in the options, if you want them recorded.
…
…
…
which_ab_test_group?(__test_sym__)