mixpanelGetSegmentation {RMixpanel} | R Documentation |
Segmentation Report
Description
Get a matrix of events segmented by 1 or 2 properties. Event data is taken from the Mixpanel Segmentation API.
Usage
mixpanelGetSegmentation(account, event, from, to, unit, type, on, action, verbose, ...)
Arguments
account |
A mixpanel account, as defined in |
event |
Event name. If empty, all events are returned. Custom events are supported, if |
from |
Start date in either format <"yyyy-mm-dd"> or <yyyymmdd>. Inclusive. |
to |
End date in either format <"yyyy-mm-dd"> or <yyyymmdd>. Inclusive. |
unit |
Defaults to 'day'. |
type |
This can be "general", "unique", or "average". |
on |
Array of up to 2 property names for segmentation. An empty array returns un-segmented counts. E.g. 'properties["$os"]' |
.
action |
Could be "sum" or "average". If given, 1st property listed in |
verbose |
If |
... |
Additional arguments to Mixpanel API. See also https://mixpanel.com/help/reference/data-export-api#segmentation. |
Value
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
).
Author(s)
Meinhard Ploner
References
https://mixpanel.com/help/reference/data-export-api#segmentation