Get a matrix of events segmented by 1 or 2 properties. Event data is taken from the Mixpanel Segmentation API.
mixpanelGetSegmentation(account, event, from, to, unit, type, on, action, verbose, ...)
A mixpanel account, as defined in mixpanelCreateAccount
.
Event name. If empty, all events are returned. Custom events are supported, if account
is set up correctly using mixpanelCreateAccount.
Start date in either format <"yyyy-mm-dd"> or <yyyymmdd>. Inclusive.
End date in either format <"yyyy-mm-dd"> or <yyyymmdd>. Inclusive.
Defaults to 'day'.
This can be "general", "unique", or "average".
Array of up to 2 property names for segmentation. An empty array returns un-segmented counts. E.g. 'properties["$os"]'
Could be "sum" or "average". If given, 1st property listed in on
is aggregated by this function.
If FALSE
less output is generated.
Additional arguments to Mixpanel API. See also https://mixpanel.com/help/reference/data-export-api#segmentation.
2 or 3-dimensional array showing event counts. The first dimension represents the time in the specified unit. The other dimension(s) are determined by the segmention properties. Usually the Mixpanel API does not return more than 60 or 100 slots per segmentation property. For more data, use the events API (mixpanelGetEvents
).
https://mixpanel.com/help/reference/data-export-api#segmentation