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

Add Track charge API method #70

Closed michiels closed 11 years ago

michiels commented 11 years ago

This little patch adds the new "$append" or track_charge() API call to the gem. It uses the People API, but $append behaves a bit different from the increment/set API calls so I had to hack around a few abstracted things.

Also, I noticed there is already an append method in the Mixpanel Tracker class, which makes tracking charges using an append method impossible. I have chosen to name this new method to append_charge in stead, which does break consistency with the Mixpanel API.

I propose renaming the original append method that appends an action to the queue in a new pull request. This would break all apps currently making use of it.

michiels commented 11 years ago

Ah. I didn't look at the pull requests. This feature is also implemented in https://github.com/zevarito/mixpanel/pull/69 but with different namings.

zevarito commented 11 years ago

I'll close this in favor of #69 Thanks.