eealeivan / mixpanel-csharp

Mixpanel C# integration library
MIT License
63 stars 15 forks source link

Increment People Properties #1

Closed bseay closed 9 years ago

bseay commented 9 years ago

Does your library support incrementing people properties?

https://mixpanel.com/help/reference/javascript-full-api-reference#mixpanel.people.increment

eealeivan commented 9 years ago

Yes, this is done using PeopleAdd method. Here is an example:

var mc = new MixpanelClient("e3bc4100330c35722740fb8c6f5abddc");
mc.PeopleAdd(new {
    DistinctId = "12345",
    TransactionsCount = 1,
    MoneySpent = 24.99M
});
bseay commented 9 years ago

I missed this because when I was going through the method definitions, I thought "PeopleAdd" was for adding a new people object (based on the method name) so I skipped over it. I was looking for something like "PeopleIncrement" ... my fault for not having read your method descriptions more thoroughly.

Great library by the way; it's much appreciated.

eealeivan commented 9 years ago

I was using Mixpanel HTTP API as a reference for naming and they use $add there. But I agree that increment is better name.