简体   繁体   English

谷歌分析报告 api v4 不显示 isDataGolden

[英]google analytics reporting api v4 not show isDataGolden

I am using Python example to do a query.我正在使用 Python 示例进行查询。 Here is my requests:这是我的要求:

body={
        'reportRequests': [
        {
            'viewId': VIEW_ID,
            'dateRanges': [{'startDate': '2018-01-01', 'endDate': '2018-01-16'}],
            'metrics': [{'expression': 'ga:sessions'}],
            'dimensions': [{'name': 'ga:country'}],
            'samplingLevel' : 'LARGE'
        }]
      }

In the response, I checked and there are valid data from the response, however, I am looking for the "isDataGolden" field in the ReportData object and it's not present;在响应中,我检查了响应中的有效数据,但是,我正在寻找 ReportData object 中的“isDataGolden”字段,但它不存在; only these fields are present 'totals', 'rowCount', 'rows', 'minimums', 'maximums'.只有这些字段存在“总计”、“行计数”、“行”、“最小值”、“最大值”。

Does anyone have any thoughts on why field is not present?有人对为什么字段不存在有任何想法吗? Google's documentation shows that it suppose to be there.谷歌的文档显示它应该在那里。

Thanks.谢谢。

If any boolean field is absent, you can assume its value is false.如果任何 boolean 字段不存在,则可以假定其值为 false。

From the documentation :文档中:

Note: When parsing the response body, if a boolean field is absent, you can assume its value is false.注意:在解析响应体时,如果 boolean 字段不存在,则可以假设其值为 false。 Only boolean fields with true value are shown in the response;响应中仅显示具有真值的 boolean 字段; for example, the isDataGolden field will be in the response if its value is true.例如,如果 isDataGolden 字段的值为 true,它将在响应中。

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

相关问题 Google Analytics API v4 最大结果 - Google analytics API v4 max results 通过google analytics v4 admin API 创建账户 - Create account through google analytics v4 admin API 为什么 GA4 数据 API Beta 版本没有 GA 报告 API V4 中可用的指标? - Why does GA4 Data API Beta version does not have metrics that available in GA Reporting API V4? Google Cloud Functions 和 Sheets v4 之间的并发问题 API - Concurrency Issues between Google Cloud Functions and Sheets v4 API 无法从 Google Measurement Protocol (Google Analytics v4) 接收事件 - Cannot receive events from Google Measurement Protocol (Google Analytics v4) 访问 v4 TPU - Access to the v4 TPUs 在使用 Google Analytics 4 自动增强测量事件时报告 Data Studio 中的下载量为 URL? - Reporting URL of downloads in Data Studio when using Google Analytics 4 automatic enhanced measurement events? 如何通过 GitLab V4 api 列出 gitlab 项目中的所有项目变量 - How to list all the project variables in a gitlab project via GitLab V4 api Gitlab v4 api 403 project.variables.list 禁止错误(get_all=True) - Gitlab v4 api 403 forbidden error for project.variables.list(get_all=True) Google Analytics 4 报告了 api 个过时数据 - Google Analytics 4 reported for api outdated data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM