google-api-python-client
google-api-python-client copied to clipboard
Duplicated columns for AUDIENCE_COMPOSITION report type
Hello,
Recently I've noticed that I received a report with duplicated columns. I want to get the AUDIENCE_COMPOSITION. Here is the query I sent:
{
"metadata":{
"title":"Google Display & Video 360 - Audience Composition Report (2022-10-27 00:00-2022-10-27 23:59)",
"dataRange":{
"customStartDate":{
"day":27,
"month":10,
"year":2022
},
"customEndDate":{
"day":27,
"month":10,
"year":2022
},
"range":"CUSTOM_DATES"
},
"format":"CSV",
"sendNotification":false
},
"schedule":{
"frequency":"ONE_TIME",
"nextRunTimezoneCode":"UTC"
},
"params":{
"type":"AUDIENCE_COMPOSITION",
"metrics":[
"METRIC_BID_REQUESTS",
"METRIC_UNIQUE_VISITORS_COOKIES"
],
"groupBys":[
"FILTER_DATE",
"FILTER_ELIGIBLE_COOKIES_ON_FIRST_PARTY_AUDIENCE_LIST",
"FILTER_ELIGIBLE_COOKIES_ON_THIRD_PARTY_AUDIENCE_LIST_AND_INTEREST",
"FILTER_USER_LIST_FIRST_PARTY_NAME",
"FILTER_FIRST_PARTY_AUDIENCE_LIST_COST",
"FILTER_USER_LIST_FIRST_PARTY",
"FILTER_FIRST_PARTY_AUDIENCE_LIST_TYPE",
"FILTER_MATCH_RATIO",
"FILTER_USER_LIST_THIRD_PARTY_NAME",
"FILTER_THIRD_PARTY_AUDIENCE_LIST_COST",
"FILTER_USER_LIST_THIRD_PARTY",
"FILTER_THIRD_PARTY_AUDIENCE_LIST_TYPE"
],
"options":{
"includeOnlyTargetedUserLists":false
},
"filters":[
{
"type":"FILTER_USER_LIST_THIRD_PARTY",
"value":"<ID>"
},
{
"type":"FILTER_USER_LIST_THIRD_PARTY",
"value":"<ID>"
},
{
"type":"FILTER_PARTNER",
"value":"<ID>"
}
]
}
}
I received a proper report but I cannot distinguish which Audience List came from First Party or Third Party because report columns are duplicated, this is a report header:
b'Date,Eligible Cookies on First-Party Audience List,Eligible Cookies on Third-Party Audience List & Interest,Audience List,Audience List Cost (USD),Audience List ID,Audience List Type,Match Ratio,Audience List,Audience List Cost (USD),Audience List ID,Audience List Type,Potential Impressions,Unique Cookies with Impressions'```
As you can see there are 2x:
- Audience List Cost (USD)
- Audience List ID
- Audience List
I couldn't find any information in the API documentation about prefixing columns or something like that.
Client version: google-api-python-client==2.58.0
API version: V2
Pseudo code to reproduce:
reply = client.queries().create(body=<json_provided_above>).execute()
query_id = reply["queryId"]
report_id = reply["key"]["reportId"]
# download the report
metadata = client.queries().reports().get(queryId=query_id, reportId=report_id).execute().get("metadata")
report_url = metadata.get("googleCloudStoragePath")
response = requests.get(report_url, stream=True, timeout=API_TIMEOUT)
Could you help me with this or should I contact withe the support?