mixpanel-data-export-js icon indicating copy to clipboard operation
mixpanel-data-export-js copied to clipboard

segmentation/sum not working for me

Open ploner opened this issue 8 years ago • 3 comments

Hi, I tried to use the aggregation on the segmentation, but it did not work. Call:

panel.sumSegmentation({
  from_date: "2016-11-01",
  to_date: "2016-11-09",
  event: "View",
  type: "general",
  unit: "day",
  on: 'number(properties["Stat"])'
}).then(function(data) {
...

I also tried to add the parameter action:'sum'.

On the other side a dirct http call works fine, using https://[email protected]/api/2.0/segmentation/sum?event=View&from_date=2016-11-01&to_date=2016-11-09&unit=day&type=general&action=sum&on=number%28properties%5B%22Stat%22%5D%29&".

Any help appreciated! Thx

ploner avatar Nov 09 '16 11:11 ploner

segmentation is not working for me, too MP.segmentation({ event: 'Page View', from_date: '2016-11-04', to_date: '2016-11-04', on: 'properties["gts_Source"]' }).then((data) => { segmentation = data; });

Coqueiro avatar Nov 10 '16 14:11 Coqueiro

@ploner @Coqueiro Is this still an issue for either of you? Sad to say it seems to be working fine for me locally. What do you get back from the API?

michaelcarter avatar Apr 30 '17 14:04 michaelcarter

@michaelcarter @Coqueiro I did not try anymore. In the meanwhile I wrote an R package which also handles the endpoints segmentation/sum and segmentation/average (https://github.com/ploner/RMixpanel/blob/master/man/mixpanelGetSegmentation.Rd). But you might need a JS implementation.

ploner avatar May 07 '17 13:05 ploner