how to Google Analytic dat through YQL or Yahoo pipes?

此生再无相见时 提交于 2020-01-04 10:59:08

问题


I use Google analytic, i want to retrieve the last 100 search string from my Google analytic account using YQL or Yahoo pipes, how can i do it?? Please help..


回答1:


I just checked in some Google Analytics YQL tables. Right now they use ClientLogin for authentication. Here is the code:

http://github.com/yql/yql-tables/blob/master/google/google.analytics.xml

You need to first authenticate with Email and Passwd and extract out the Auth token from the result. Use that Auth token to call the APIs that will list your accounts and pull data from the API. You should use the Google Analytics explorer to figure out what you want to pull down:

http://code.google.com/apis/analytics/docs/gdata/gdataExplorer.html

Here is an example query that I am using to get a list of my most active pages:

use 'http://github.com/yql/yql-tables/raw/master/google/google.analytics.xml' as ga; select * from ga where auth='...' and ids='ga:2938948' and dimensions='ga:pagePath' and metrics="ga:pageviews" and sort="-ga:pageviews" and start="2010-04-04" and end="2010-04-18" and max='50'




回答2:


You can't access Analythics API using Yahoo pipes or YQL because google services requires Google Account authentication using ClientLogin\AuthSub\OAuth.

With a workaround you could export your analythics data on google groups and then retrieving it using Yahoo pipes.
Check this article.



来源:https://stackoverflow.com/questions/2630345/how-to-google-analytic-dat-through-yql-or-yahoo-pipes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!