ploner / rmixpanel Goto Github PK
View Code? Open in Web Editor NEWThis project forked from kfayzullin/rmixpanel
RMixpanel - Mixpanel API client package for R
License: Other
This project forked from kfayzullin/rmixpanel
RMixpanel - Mixpanel API client package for R
License: Other
Hello,
I can't seem to authenticate with any https://mixpanel.com/ endpoints. This includes segmentation and funnels. Based on the simple funnel example I tried the following:
mixpanelGetData(account, method="funnels/list/", args=list(), data=TRUE)
headers = c(Authorization = paste("Basic ", base64enc::base64encode(charToRaw(paste(account$apiSecret,
":", account$apiSecret, sep = ""))), sep = ""))
url <- "https://mixpanel.com/api/2.0/funnels/list/?"
RCurl::getURL(url, httpheader = headers)
AuthenticationRequired
Authentication required."url <- "https://data.mixpanel.com/api/2.0/funnels/list/?"
RCurl::getURL(url, httpheader = headers)
url <- "https://data.mixpanel.com/api/2.0/export/?event=%5B%22Purchase3%22%5D&from_date=2018-10-01&to_date=2018-10-02&"
RCurl::getURL(url, httpheader = headers)
myArgs <- list()
myArgs$event
<- "["Purchase3"]"
myArgs$from_date <- "2018-10-01"
myArgs$to_date <- "2018-10-02"
mixpanelGetData(account, method="export/", args=myArgs, data=TRUE)
Any idea what is going on? Thanks in advance.
Hi,
Thanks for developing this, its actually pretty useful!
I am trying to pull event data for each profile in my Mixpanel project, however I keep getting an error message.
I am able to authenticate correctly into Mixpanel, and pull profile information with mixpanelGetProfiles(account)
Now, I am trying to pull event data for each profile (for this example, just for the first profile) by using the following command:
profileIDs = profiles[, "distinct_id"] events_profile = mixpanelGetEventsForProfiles(account, profileIDs[1], from_date=2018-11-01, to_date=2018-12-01)
but I get the following text in return:
## Download https://mixpanXXXXXXXXXXX2.0/stream/query?from_date=2010-01-01&to_date=2020-01-01&distinct_ids=%5B%22165790f3f08375-0f3c30b4faed45-772b1906-5b524-165790f3f09c0%22%5D&... parse data... $request [1] "/api/2.0/stream/query?from_date=2010-01-01&to_date=2020-01-01&distinct_ids=%5B%22165790f3f08375-0f3c30b4faed45-772b1906-5b524-165790f3f09c0%22%5D&" $error [1] "Date range exceeds 365 days into the past"
I also tried running the same command but without the from and to date, and still get the same return
Would you be able to let me know what the issue is, or if there is something I am doing wrong!
Thanks,
F.A.Calvo
Seems to be an issue supporting non ASCII chars or escape strings inside of results from Mixpanel. Error probably originates from RCURL or jsonlite. Source has around 64,000 results with a mix of English and extended characters from Asian languages.
As of this past week, I'm not able to authenticate data.mixpanel.com endpoints (ie. "export") with the secret in the URL. Instead, it needs to be added as a Basic Auth header in the username. I've verified this via curl.
Line 14 in 45509e2
Hi,
I am having an issue when I call mixpanelJQLQuery() - I get an error as follows
this is the code snippet:
jql_que <- "
function main() {
return Events({
from_date: '2021-06-01',
to_date: '2021-06-01',
event_selectors: [
{event : 'appOpened'}
]
})
}"
appOpened <- mixpanelJQLQuery(account, jqlString = jql_que)
The credentials for "account" are set up correctly as I am able to run mixpanelGetEvents() with no issue. I can also run the JQL code in Mixpanel and it returns results. Please let me know if there is something I am missing with this function call - I am running R version 4.1.1
Thanks very much!
res <- mixpanelJQLQuery(account, jqlQuery)
is resulting in the following error on PC only:
Error in system(curlCall, intern = TRUE, ignore.stderr = TRUE) : 'curl' not found
Tested and tried on multiple PCs and the full code stops there. Weirdly enough, the code works flawlessly on a Mac.
Hi,
When running:
tmp = mixpanelGetEvents(account, from = date, to = date, daysPerBlock = 10,
select = vars, verbose = TRUE, df = TRUE, encoding="UTF-8")
I was getting the error:
Error: lexical error: invalid character inside string.
amsung","$carrier":"DAIS-Virgi ",
(right here) ------^
Apparently, Mixpanel was putting some invalid json character on the data we were getting and that was causing the error.
I managed to fix it by going into the function eventsJson2RMatrix and adding at the start:
jsonData = gsub('\x06','',jsonData)
I hope this helps improve the package. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.