michaelcarter / mixpanel-data-export-js

Mixpanel data export js
91 stars 38 forks source link

Add new method to support segmentation on multiple properties #13

Closed youbbi closed 9 years ago

youbbi commented 9 years ago

Why?

Support the segmentation/multiseg API which allows to segment on two properties instead of a single one.

Extra

This is not officially documented by mixpanel, but if you inspect their network request in their web app, you will notice the following request with multiseg

https://mixpanel.com/api/2.0/segmentation/multiseg?inner=properties%5B%22property1%22%5D&outer=properties%5B%22property2%22%5D

where inner is the first property you want to segment and outer is the segmentation on the inner property.

Note that it was already implemented by other libraries http://libsaas.readthedocs.org/en/latest/generated/mixpanel/

michaelcarter commented 9 years ago

Hi @youbbi, thanks for the PR. I'm away this week on business but will take a look at this over the weekend once I'm home. Sorry for ignoring it for so long... life getting in the way!

michaelcarter commented 9 years ago

Hi @youbbi. I'm terrible at open source apparently. Just getting back around to this now. I've updated the docs with a line on making your own requests via the library for undocumented endpoints etc. I'd rather not get into the business of writing a library that claims to offer support for features of Mixpanel's API that could drop out from under people's feet at any moment.

Hope that's ok. See the 1.7.0 supported methods -> get for more info.