Sha256: 67505e29fd48144e4003da492baa618c787dcb93a9deede487d9f6c53d88628e
Contents?: true
Size: 740 Bytes
Versions: 2
Compression:
Stored size: 740 Bytes
Contents
require 'rubygems' require 'keen' # Get these from the keen.io website: project_id = 'asdfasldkfjalsdkfalskdfj' auth_token = 'asldfjklj325tkl32jaskdlfjaf' # First you must setup the client: keen = Keen::Client.new(project_id, auth_token) # Then, you can use that client to send events. keen.add_event("purchases", { :quantity => @quantity, :user => @user.hashify, :item => @item.hashify, :session => @session.hashify, }) keen.add_event("pageviews", { :user => @user.hashify, :route => @current_route, :session => @session.hashify, }) # (These examples pretend your important objects all have a method called # "hashify", and that method serializes state information you wish to track.)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
keen-0.0.5 | examples.rb |
keen-0.0.4 | examples.rb |