Skip to content
forrest edited this page Oct 28, 2011 · 1 revision

Sorry for the messy wiki. Feel free to help get it organized ;-)

Default Events

: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…

Custom Events

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.

Creating Metrics & Reports

Creating AB Tests

which_ab_test_group?(__test_sym__)
Gotcha: If this tests against user_id or account_id, the it should be called after your set the user_id and account_id with the hooks described in the __SETUP__ section.