Sha256: c1ba59e76136706dfd21decb8799fdb618e9129b6ec686419a2c79c075258381
Contents?: true
Size: 411 Bytes
Versions: 10
Compression:
Stored size: 411 Bytes
Contents
class Rack::Tracker::Facebook < Rack::Tracker::Handler class Event < OpenStruct def write ['track', self.id, to_h.except(:id).compact].to_json end end self.position = :body def render Tilt.new( File.join( File.dirname(__FILE__), 'template/facebook.erb') ).render(self) end def self.track(name, *event) { name.to_s => [event.last.merge('class_name' => 'Event')] } end end
Version data entries
10 entries across 10 versions & 1 rubygems