zevarito / mixpanel

Simple lib to track events in Mixpanel service. It can be used in any rack based framework.
MIT License
273 stars 84 forks source link

Fix for Issue #59 for location tracking based on $ip parameter #63

Closed etagwerker closed 11 years ago

etagwerker commented 11 years ago

Hey @zevarito!

These commits solve the location tracking issue described in Issue #59.

It's a proposed implementation, with no additional tests. I just want to see what you think about it.

I've tested it locally and in production and it works.

It allows you to do this:

tracker = Mixpanel::Tracker.new MIXPANEL_API_KEY
tracker.set("12345", {:first_name => "John", :last_name => "Doe" }, { "$ip".to_sym => "186.137.140.183" } )

Thoughts?

I'd appreciate any comments on the code and potential tests.

zevarito commented 11 years ago

Hi @etagwerker!

Thanks for submitting your code.

Please take a look at my comment here: https://github.com/zevarito/mixpanel/issues/59#issuecomment-11640333

Thanks!

zevarito commented 11 years ago

62 Was merged, please see comments on #59. Thanks.

etagwerker commented 11 years ago

@zevarito cool!