Sha256: 4108404e8a0f3473af1e8d3b62b73556eece424abb43761c37ad2393aeaf0b31
Contents?: true
Size: 721 Bytes
Versions: 2
Compression:
Stored size: 721 Bytes
Contents
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.2 | examples.rb |
keen-0.0.1 | examples.rb |