使用Python API访问Google Analytics自定义报告

时间:2021-10-07 13:52:21

I read some subjects on the forum and I know that it's not possible to access and manipulate custom reports in google analytics through the python API. Instead, I want to know if it's possible to just download the CSV from a python script, with a precise date.

我在论坛上阅读了一些主题,我知道通过python API访问谷歌分析中的自定义报告是不可能的。相反,我想知道是否可以从python脚本下载具有精确日期的CSV。

So I will just have to run the script with a precise date to get my custom report, then I will run another script on the Excel/CSV file.

所以我只需要运行带有精确日期的脚本来获取我的自定义报告,然后我将在Excel / CSV文件上运行另一个脚本。

Thanks

谢谢

1 个解决方案

#1


0  

No the API does not allow to download custom reports but i ll let you query with all the same parameters you create your report so i don't see how that would be different. I ll take the chance to leave you with documentation and a really good post to query GA data:

没有API不允许下载自定义报告,但我会让您使用创建报告的所有相同参数进行查询,因此我不知道这会有什么不同。我将抓住机会为您提供文档和一个非常好的帖子来查询GA数据:

Query with python: http://www.ryanpraski.com/python-google-analytics-api-unsampled-data-multiple-profiles/

使用python查询:http://www.ryanpraski.com/python-google-analytics-api-unsampled-data-multiple-profiles/

Docs: https://developers.google.com/analytics/devguides/reporting/core/v4/

文档:https://developers.google.com/analytics/devguides/reporting/core/v4/

#1


0  

No the API does not allow to download custom reports but i ll let you query with all the same parameters you create your report so i don't see how that would be different. I ll take the chance to leave you with documentation and a really good post to query GA data:

没有API不允许下载自定义报告,但我会让您使用创建报告的所有相同参数进行查询,因此我不知道这会有什么不同。我将抓住机会为您提供文档和一个非常好的帖子来查询GA数据:

Query with python: http://www.ryanpraski.com/python-google-analytics-api-unsampled-data-multiple-profiles/

使用python查询:http://www.ryanpraski.com/python-google-analytics-api-unsampled-data-multiple-profiles/

Docs: https://developers.google.com/analytics/devguides/reporting/core/v4/

文档:https://developers.google.com/analytics/devguides/reporting/core/v4/