melissaguyre / mixpanel-segmentation-google-spreadsheets

Mixpanel Segmentation Data Export script for report automation into Google Spreadsheets
46 stars 31 forks source link

Extract data with 'on' instead of 'where' #4

Open donfratello opened 8 years ago

donfratello commented 8 years ago

Hi Melissa,

Thank you for your script, it works awesome ans save me lots of time!

I have a small problem. I want to extract multiple columns of data with 'on' instead of 'where'. For example: From an event 'Account Activated' I want the returned data split up into all countries. We have the property 'Country' for that. Same as example 2 given by Mixpanel: https://mixpanel.com/docs/api-documentation/data-export-api#segmentation-default

I added the ParametersEntry in line 201 ('on=' + parametersEntry[4],) to the script and included the fifth part into the query in your Step 4. --> 'Account Activated' : [ 'Account Activated', '', '(properties["Country"])', 'general', 'month' ], <-- Unfortunately this doesn't work.

I guess because the returned values can not be read correctly, since the returned data contains multiple columns instead of only 2.

Could you please help me edit the script to make this possible? Because I have very little knowledge of coding :).

Thank you so much!

Best, Marnix

tohyongcheng commented 8 years ago

@donfratello check out my forked version at https://github.com/tohyongcheng/mixpanel-segmentation-google-spreadsheets.

I implemented a 'on' parameter.

donfratello commented 8 years ago

@tohyongcheng Thank you very much! Very much appreciated!