简体   繁体   English

如何配置Google Analytics API v3

[英]How do I configure Google Analytics API v3

Facing error: 面对错误:

Error calling GET https://www.googleapis.com/analytics/v3/data/ga?.....: (403) User does not have sufficient permissions for this profile.

I have multiple accounts in analytics. 我在分析中有多个帐户。 I've added my verylongxxx@developer.gserviceaccount.com to each account admin > view > user management with permissions edit, collaborate, read & analyze . 我已将我的verylongxxx@developer.gserviceaccount.com添加到每个帐户admin> view> 具有权限 编辑,协作,阅读和分析的 用户管理

What I do wrong? 我做错了什么?

// upd //更新

the request is 请求是

$service->get(
    'ga:XXXXXXXXXXXXX',
    '2014-05-25',
    '2014-06-24',
    'ga:visits'
)

And this XXXXXXXXXXXXX is project number in Google console. 这个XXXXXXXXXXXXX是Google控制台中的项目编号。

Set this permission on account level,it will automatically set all permission to your web property and view level . 在帐户级别设置此权限,它将自动为您的网络媒体资源和查看级别设置所有权限。

  go to your analytics account
  Administration› User Management 
  and set Read & Analyze or as you wish, then Click Save.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM