Closed bseay closed 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
});
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.
I was using Mixpanel HTTP API as a reference for naming and they use $add
there. But I agree that increment
is better name.
Does your library support incrementing people properties?
https://mixpanel.com/help/reference/javascript-full-api-reference#mixpanel.people.increment