Google Analytics API Python快速入门 [英] Google Analytics API Python quickstart

查看:69
本文介绍了Google Analytics API Python快速入门的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从Google Analytics(分析)中获取一些数据.在快速入门指南的第3.3步中,将其替换为SERVICE_ACCOUNT_EMAIL的值.问题是我找不到变量SERVICE_ACCOUNT_EMAIL.既不在client_secrets.json文件中,也不在HelloAnalytics.py文件中.

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.

有什么想法吗?

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

推荐答案

它位于JSON文件中,其密钥为"client_email"(至少在我的所有密钥文件中),您应该在"IAM和管理员"中找到它API控制台(或现在明显称为Cloud控制台)的部分.

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).

但是,您无需在任何地方输入此内容.这是拼写错误,或者是API先前版本的保留.分析模块将从json文件中获取电子邮件地址.

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.

这篇关于Google Analytics API Python快速入门的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆