Sha256: f8250ce333350384a9d8a014a77e3e23f45d8a268b06f1e0a1e4bc8b6cbcf83a

Contents?: true

Size: 380 Bytes

Versions: 33

Compression:

Stored size: 380 Bytes

Contents

module TestTrack::Analytics
  class MixpanelClient
    def track(analytics_event)
      mixpanel.track(analytics_event.visitor_id, analytics_event.name, analytics_event.properties)
    end

    private

    def mixpanel
      raise "ENV['MIXPANEL_TOKEN'] must be set" unless ENV['MIXPANEL_TOKEN']
      @mixpanel ||= Mixpanel::Tracker.new(ENV['MIXPANEL_TOKEN'])
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
test_track_rails_client-4.0.0.alpha33 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha32 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha31 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha30 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha29 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha28 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha27 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha26 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha25 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha24 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha23 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha22 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha21 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha20 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha19 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha18 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha17 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha16 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha15 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha14 app/models/test_track/analytics/mixpanel_client.rb