Google Analytics API Python quickstart

白昼怎懂夜的黑 提交于 2021-02-08 10:22:58

问题


I would like to get some data out of Google Analytics. On step 3.3 on the quickstart guide is written to replace the value of SERVICE_ACCOUNT_EMAIL. The problem is that I cant find the variable SERVICE_ACCOUNT_EMAIL. Neither in the client_secrets.json file nor in the HelloAnalytics.py file.

Any ideas?

Guide: https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-py


回答1:


It's in the JSON file with the key "client_email" (at least in all my key files), and you should find it in the "IAM and admin" section of the API console (or Cloud console as it is apparently called now).

However you do not need to enter this anywhere. This is a typo, or a holdover from a previous version of the API. The analytics module will take the email address from the json file.



来源:https://stackoverflow.com/questions/45916648/google-analytics-api-python-quickstart

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