我已经为我的网站创建了一份 Google Analytics 自定义报告,我想使用 Python 访问该报告。任何人都可以给我一个简单的例子吗?
我已经在 code.google.com 的页面上搜索了几个小时,但我仍然完全不知所措。
谢谢
请您参考如下方法:
你可以试试google python客户端http://code.google.com/p/gdata-python-client/ . 这是分析文档 http://code.google.com/apis/analytics/docs/更具体地看http://code.google.com/apis/analytics/docs/gdata/dimsmets/customvars.html
或
您可以使用 Google API 资源管理器,这是我正在使用的 https://code.google.com/apis/explorer/#_s=analytics&_v=v3&_m=report.get&end-date=2011-11-18&start-date=2011-10-17&metrics=ga:visits&ids=ga:52179970 .将 ids(ga:52179970) 替换为您的 ID(查看自定义报告的 URL),并将指标替换为您所需的 csv 格式矩阵。
