在Google Analytics中使用R. [英] Using R with Google Analytics
问题描述
我找到了一个名为r-google-analytics的优秀项目,我想使用它,这样我就可以在本网站的R中操作GA dat http://code.google.com/p/r-google-analytics/ 。
我运行这部分代码:
library(RCurl)
library(XML)
#1.创建一个新的Google Analytics API对象
ga < - RGoogleAnalytics()
#2.使用您的Google Analytics帐户凭证授权对象
ga $ SetCredentials (INSERT_USER_NAME,INSERT_PASSWORD)
我得到这个错误信息:
postForm中的错误(https://www.google.com/accounts/ClientLogin,电子邮件=用户名,:
SSL证书问题,请验证CA证书是否正确。详细信息:
错误:14090086:SSL例程:SSL3_GET_SERVER_CERTIFICATE:证书验证失败
关于什么可能是cau的任何想法唱错误?
谢谢!
金
请参阅 http://www.omegahat.org/ RCurl / FAQ.html 以获取详细的解释,尤其是(取决于您对安全性的偏好):
如果您没有适当的证书您可以使用ssl.verifypeer选项禁止验证证书:
x = getURLContent(https://www.google.com,ssl.verifypeer = FALSE)
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
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)
这篇关于在Google Analytics中使用R.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!