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.
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 anappend
method impossible. I have chosen to name this new method toappend_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.