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.alpha13 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha12 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha11 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha10 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha9 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha8 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha7 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha6 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha5 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha4 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha3 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha2 app/models/test_track/analytics/mixpanel_client.rb
test_track_rails_client-4.0.0.alpha1 app/models/test_track/analytics/mixpanel_client.rb