Use me to push data to Dash-fu in real time.

Add this gem to your project's Gemfile:

gem "dash-fu"

The only configuration you need is setting the API key in config/environments/production.rb:

DashFu.api_key = "<your API key>"

Your API key is available from account settings.

You only want to push data in production, so make sure the API key is only set in production environment. Calls to created/active with no API key are simply ignored.


You can send events by calling DashFu.push with UID and event, or using the specialized created and active methods.

For example, to assign a user to a cohort, we're going to notify Dash-fu whenever an acount gets created:

class User < ActiveRecord::Model
  after_create do
    DashFu.created id
  end
end

In this example, we consider a user active whenever they post a status update, and notify Dash-fu accordingly:

class StatusUpdate < ActiveRecord::Model
  after_create do
    DashFu.active id
  end
end