试用Google Analytics API,使用service account的认证方式,结果它报错:“User doesnot have any Google Analytics Account”。
解决方法:
- 在Google开发者控制台中确认Analytics API已经使能
- Service account的邮箱域为@developer.gserviceaccount.com
- 拥有适当的AccountID和ProfileID,并将serviceaccount(至少以读取和分析权限)添加到Google Analytics profile
参考
Google’s instructions for adding an email address to an Analytics profile