我使用google Python example连接到Google Analytics(分析)并收集了所有数据。使用此示例时,我能够连接并收集数据,但是当我更改b
以选择其他视图时,出现以下错误:
是:
profile_id
现在:
profile_id = get_first_profile_id(service)
答案 0 :(得分:0)
需要here所述的Google Analytics(分析)授予创建的电子邮件帐户的权限:
The newly created service account will have an email address that looks similar to:
quickstart@PROJECT-ID.iam.gserviceaccount.com
Use this email address to add a user to the Google analytics view you want to access via the API. For this tutorial only Read & Analyze permissions are needed.