Not getting result when migrating CAMPAIGN_PERFORMANCE_REPORT from AdWords API to Ads API

57 views
Skip to first unread message

W Zhang

unread,
Oct 14, 2021, 12:13:04 PM10/14/21
to AdWords API and Google Ads API Forum
I follow the migration guide on campaign performance reporting ( CAMPAIGN_PERFORMANCE_REPORT ) from the following link https://developers.google.com/google-ads/api/docs/migration/mapping#campaign_performance

I have trouble to get the correct results from the new API, and it looks like there is something wrong with segments.

I try to get the following test query working:
SELECT campaign.id,campaign.name,customer.time_zone,customer.currency_code,segments.date,segments.device,segments.ad_network_type,metrics.cost_micros,metrics.impressions,metrics.clicks,metrics.video_views,metrics.video_view_rate FROM campaign WHERE campaign.id IN (1028553832,765307360,914618535) AND segments.date BETWEEN '2021-09-23' AND '2021-09-24'
An empty result  is returned as following
{
  "fieldMask": "campaign.id,campaign.name,customer.timeZone,customer.currencyCode,segments.date,segments.device,segments.adNetworkType,metrics.costMicros,metrics.impressions,metrics.clicks,metrics.videoViews,metrics.videoViewRate"
}


I have verified the productive campaign report with Google Adwords, and there are valid records with given parameter.

I also run a test with reduced number of attributes, and it works with relevant records showing up in the response.
SELECT campaign.id,campaign.name, campaign.start_date,campaign.end_date, customer.time_zone, metrics.impressions FROM campaign WHERE campaign.id IN (1028553832,765307360,914618535) AND segments.date BETWEEN '2021-09-23' AND '2021-09-24'

I am aware that once segments related attributes are added to the select condition, the result will always be empty. Is there something I missed with the query or there is an known issue with segments?

Best regards,
Wanling  

Google Ads API Forum Advisor

unread,
Oct 18, 2021, 2:31:20 AM10/18/21
to rin...@gmail.com, adwor...@googlegroups.com
Hi Wanling,

Thank you for reaching out to our API support team.

So that our team may take a closer look at the issue you are encountering, could you provide more details regarding not being able to acquire correct results in your API report request? Could you provide us with examples?

In addition, could you also share the generated and complete request and response logs, with the request-id? If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2PJd5l:ref
Reply all
Reply to author
Forward
0 new messages