mixpanelGetRetention: Retention Report

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/mixpanelGetRetention.R

Description

Get retention data from Mixpanel API. The resulting object can be printed nicely using print.retention.

Usage

1
2
mixpanelGetRetention(account, event, from, to, unit, retentionType, 
  intervalCount, verbose=TRUE, ...)

Arguments

account

A mixpanel account, as defined in mixpanelCreateAccount.

event

Event name. If empty, all events are returned.

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'.

retentionType

birth (=First time) or compounded (=Recurring). Defaults to 'birth'.

intervalCount

Number of intervals per cohort to return.

verbose

If TRUE more output is generated.

...

Additional arguments to Mixpanel API. E.g. born_event='Event name' (needed for retention type 'birth'), or born_where='properties["Prop name"]=="value"'.

Value

Object of class retention including

dates

Start dates of each cohort.

cohortCount

Size of cohorts (people count).

retainCount

Number of retained people.

retainPerc

Percentage of retained people.

Author(s)

Meinhard Ploner

References

https://mixpanel.com/help/reference/data-export-api#retention

See Also

mixpanelGetAddiction

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
## Fill in here the API token, key and secret as found on 
## www.mixpanel.com - Account -> Projects. 
account = mixpanelCreateAccount("ProjectName",
                                token="c12g3...",
                                secret="168e7e...", 
                                key="543c55...")
mixpanelGetRetention(account, born_event="AppInstall", event="WatchedItem", 
                     from=20150701, to=20151101, unit="week")

## End(Not run)

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