mixpanelGetProfiles: Get Profiles From Mixpanel API

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

View source: R/mixpanelGetProfiles.R

Description

Get a matrix filled with profiles (also called 'users' or 'people') taken from the Mixpanel People API.

Usage

1
mixpanelGetProfiles(account, where="", select, maxPage=100000, verbose=TRUE)

Arguments

account

A mixpanel account, as defined in mixpanelCreateAccount.

where

Expression, see https://mixpanel.com/help/reference/data-export-api#segmentation-expressions.

select

If "select" is an array of column names, only the specified properties are selected. If TRUE, all columns are selected.

maxPage

The API delivers usually about 1000 users per page. Setting this parameter can limit the response for testing purposes. A value of 9 returns page 0 to page 9, i.e. 10000 profiles.

verbose

If FALSE less output is generated.

Value

A character matrix showing one profile per line. The first column represents the distinct ID of the profile, the other column the profile properties.

Author(s)

Meinhard Ploner

References

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

See Also

mixpanelGetEvents

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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...")
                                
profiles = mixpanelGetProfiles(account, where='properties["KPI1"] > 1.32', 
                             select=c("KPI1", "KPI2"))
print(profiles)

## End(Not run)

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