Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using R with Google Analytics

I found a great project called r-google-analytics that I'd like to use so I can manipulate GA dat in R at this website http://code.google.com/p/r-google-analytics/.

I run this portion of the code:

library(RCurl)

library(XML)

# 1. Create a new Google Analytics API object 
ga <- RGoogleAnalytics()  
# 2. Authorize the object with your Google Analytics Account Credentials
ga$SetCredentials("INSERT_USER_NAME", "INSERT_PASSWORD") 

And I get this error message:

Error in postForm("https://www.google.com/accounts/ClientLogin", Email = username,  : 
  SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Any ideas as to what could be causing the error?

Thanks!

Kim

like image 589
Kim Hicks Avatar asked Dec 08 '10 18:12

Kim Hicks


1 Answers

see http://www.omegahat.org/RCurl/FAQ.html for a thorough explanation and particularly (depending on your preference for security):

If you don't have a certificate from an appropriate signing agent, you can suppress verifying the certificate with the ssl.verifypeer option:

x = getURLContent("https://www.google.com", ssl.verifypeer = FALSE)

like image 142
Mark Bulling Avatar answered Sep 30 '22 12:09

Mark Bulling