mixpanel-data-export-js
mixpanel-data-export-js copied to clipboard
segmentation/sum not working for me
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
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; });
@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 @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.