Closed ASHWINI-GUPTA closed 4 years ago
@ASHWINI-GUPTA this seems more like an issue with the API or something missing in your request than with the client library itself. When you try this same query on the API Explorer (where it says Try this API on the following image), what result do you get? If it fails there as well, then the issue you are seing is not related to the client library and I would recommend in that case that you explore this Support resources.
Please take into account that the maintainers of this repo are not experts in the APIs themselves (this repo has client libraries for over 100 APIs) but only on the client libraries themselves.
@amanda-tarafa seems like some issue with SDK only, tried using "Try this API" got the 200 Response.
Response data -
{
"kind": "doubleclickbidmanager#query",
"queryId": "733180910",
"metadata": {
"title": "AG - DBM Reach API - Try Now",
"dataRange": "LAST_7_DAYS",
"format": "CSV",
"running": true,
"sendNotification": false
},
"params": {
"type": "TYPE_REACH_AND_FREQUENCY",
"groupBys": [
"FILTER_PARTNER",
"FILTER_COUNTRY",
"FILTER_ADVERTISER",
"FILTER_INSERTION_ORDER",
"FILTER_LINE_ITEM"
],
"filters": [
{
"type": "FILTER_ADVERTISER",
"value": ""
}
],
"metrics": [
"METRIC_UNIQUE_REACH_IMPRESSION_REACH",
"METRIC_UNIQUE_REACH_CLICK_REACH",
"METRIC_UNIQUE_REACH_TOTAL_REACH",
"METRIC_UNIQUE_REACH_AVERAGE_IMPRESSION_FREQUENCY"
]
},
"schedule": {
"frequency": "ONE_TIME"
}
}
Request data -
{
"kind": "doubleclickbidmanager#query",
"metadata": {
"dataRange": "LAST_7_DAYS",
"format": "CSV",
"sendNotification": false,
"title": "AG - DBM Reach API - Try Now"
},
"params": {
"filters": [
{
"type": "FILTER_ADVERTISER",
"value": ""
}
],
"groupBys": [
"FILTER_PARTNER",
"FILTER_COUNTRY",
"FILTER_ADVERTISER",
"FILTER_INSERTION_ORDER",
"FILTER_LINE_ITEM"
],
"includeInviteData": true,
"metrics": [
"METRIC_UNIQUE_REACH_IMPRESSION_REACH",
"METRIC_UNIQUE_REACH_CLICK_REACH",
"METRIC_UNIQUE_REACH_TOTAL_REACH",
"METRIC_UNIQUE_REACH_AVERAGE_IMPRESSION_FREQUENCY"
],
"type": "TYPE_REACH_AND_FREQUENCY"
},
"schedule": {
"endTimeMs": 0,
"frequency": "ONE_TIME"
}
}
Tried pulling this created report using queryId
using SDK got response with "METRIC_UNKNOWN" -
{
"kind": "doubleclickbidmanager#query",
"metadata": {
"dataRange": "LAST_7_DAYS",
"format": "CSV",
"googleCloudStoragePathForLatestReport": "",
"googleDrivePathForLatestReport": "",
"latestReportRunTimeMs": 1600764466093,
"locale": null,
"reportCount": 0,
"running": false,
"sendNotification": false,
"shareEmailAddress": null,
"title": "AG - DBM Reach API - Try Now",
"ETag": null
},
"params": {
"filters": [
{
"type": "FILTER_ADVERTISER",
"value": "",
"ETag": null
}
],
"groupBys": [
"FILTER_PARTNER",
"FILTER_COUNTRY",
"FILTER_ADVERTISER",
"FILTER_INSERTION_ORDER",
"FILTER_LINE_ITEM"
],
"includeInviteData": true,
"metrics": [
"METRIC_UNKNOWN",
"METRIC_UNKNOWN",
"METRIC_UNKNOWN",
"METRIC_UNKNOWN"
],
"type": "TYPE_REACH_AND_FREQUENCY",
"ETag": null
},
"queryId": 733180910,
"reportDataEndTimeMs": null,
"reportDataStartTimeMs": null,
"schedule": {
"endTimeMs": 0,
"frequency": "ONE_TIME",
"nextRunMinuteOfDay": null,
"nextRunTimezoneCode": null,
"ETag": null
},
"timezoneCode": null,
"ETag": "\"ZelHb3Dp5JnMm78yZe-j6LnxBf82VZ-LV3xEnzr3lKI/0Y3RGWpZ6WayL-BXCdUlFeR5exw\""
}
Thanks, I'll take a look later this week.
I haven't been able to reproduce this, but will try again at the end of the week.
Hey @amanda-tarafa, able to reproduce the issue?
Hi @ASHWINI-GUPTA not yet, I'm having to set up a DBM account and that's been requiring a little more work than I expected. But I'm still trying to reproduce, and will get there eventually, I'm working on this in between some other things.
Take into account that as the maintainers of this repo, we are not experts in each of the individual APIs or products, but only on the client libraries themselves, making sure that they accurately reflect what the corresponding API offers. So an issue like this, which seems to be client library related but also product specific, it's a little harder than usual for us to diagnose.
But again, I'm working on it and will get back here as soon as I have more info, probably early next week.
@ASHWINI-GUPTA I'm looking at this now, I'll report back as soon as I know what's happening.
@ASHWINI-GUPTA I've been able to reproduce this issue and I think I know what the problem is. I believe you are using Google.Apis.DoubleClickBidManager.v1 but you should be using Google.Apis.DoubleClickBidManager.v1_1. The metrics you are using don't exist in DoubleClikc Bid Manager v1 (which is being deprecated) but only on DoubleClikc Bid Manager v1.1. Everything should work as expected if you use Google.Apis.DoubleClickBidManager.v1_1, it just worked for me. If I use Google.Apis.DoubleClickBidManager.v1 I can reproduce what you are seing.
Hey @amanda-tarafa, You are correct i was using the v1 package instead of v1_1, updating to v1_1 has resolved the issue. Thanks a lot 😇.
Happy that it worked! Closing now.
I was trying to create the reach report using Create Query call - https://developers.google.com/bid-manager/v1.1/queries/createquery using SDK, getting below error response from API.
When I checked DV360 UI I'm able to see the newly created Reach Report but it did not contain any Metrics provided -
I also try to pull the Reach report created on DV360 Platform to check the correct metric name, getting metrics name as "METRIC_UNKNOWN" for all Reach metrics selected in Report -
Complete Response
Referring this doc for metric naming - https://developers.google.com/bid-manager/v1.1/filters-metrics#metrics
Using the below
Query
object for creating new Reach report -