简体   繁体   中英

google analytics reporting api v4 not show isDataGolden

I am using Python example to do a query. 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; 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.

From the documentation :

Note: When parsing the response body, if a boolean field is absent, you can assume its value is false. Only boolean fields with true value are shown in the response; for example, the isDataGolden field will be in the response if its value is true.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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