mixpanelGetSegmentation: Segmentation Report

Description Usage Arguments Value Author(s) References

View source: R/mixpanelGetSegmentation.R

Description

Get a matrix of events segmented by 1 or 2 properties. Event data is taken from the Mixpanel Segmentation API.

Usage

1
mixpanelGetSegmentation(account, event, from, to, unit, type, on, action, verbose, ...)

Arguments

account

A mixpanel account, as defined in mixpanelCreateAccount.

event

Event name. If empty, all events are returned. Custom events are supported, if account is set up correctly using mixpanelCreateAccount.

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 on is aggregated by this function.

verbose

If FALSE less output is generated.

...

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


RMixpanel documentation built on May 1, 2019, 10:46 p.m.