Learn R Programming

RMixpanel (version 0.7-1)

mixpanelGetProfiles: Get Profiles From Mixpanel API

Description

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

Usage

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

Arguments

account

A mixpanel account, as defined in mixpanelCreateAccount.

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.

References

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

See Also

mixpanelGetEvents

Examples

Run this code
# 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)
# }

Run the code above in your browser using DataLab