Missing metric data in campaign API results

44 views
Skip to first unread message

Bryan Yen

unread,
Mar 27, 2023, 1:06:30 PM3/27/23
to Google Ads API and AdWords API Forum
Hi,

I created a test ad account and a test campaign. I'm running the following query to get data for the campaigns.

{
  "query" : "SELECT campaign.name, campaign.status, metrics.impressions, metrics.clicks, metrics.ctr, metrics.average_cpc, metrics.cost_micros, campaign.advertising_channel_type, campaign.start_date, campaign.end_date, metrics.conversions, metrics.cost_per_all_conversions, metrics.cost_per_conversion, metrics.all_conversions_from_interactions_rate
            FROM campaign
            WHERE segments.date DURING LAST_30_DAYS"
}

I'm missing some of the fields (like metrics.ctr and metrics.average_cpc etc.) in the results. Is there something wrong with my SQL or my test campaign not setup correctly? Any insight is appreciated.

{
"results": [
{
"campaign": {
"resourceName": "customers/xxx/campaigns/xxx",
"status": "ENABLED",
"advertisingChannelType": "DISPLAY",
"name": "test-1",
"startDate": "2023-03-23",
"endDate": "2037-12-30"
},
"metrics": {
"clicks": "0",
"conversions": 0,
"costMicros": "0",
"impressions": "0"
}
}

Google Ads API Forum Advisor

unread,
Mar 27, 2023, 3:23:27 PM3/27/23
to bryan...@gmail.com, adwor...@googlegroups.com
Hi Bryan,

Thank you for raising this issue to the Google Ads API support team.

Regarding your concern, please note that Google Ads API mirrors the Google Ads UI. Meaning, whatever the Google Ads UI is showing, the Google Ads API should pull it. That said, can you provide the complete request and response logs with the request ID and request header generated on your end and uncropped Google Ads UI screenshot (including the customer id) showing the data that you want to get via the Google Ads API so that our team can better investigate and provide the accurate recommendations to you?

Note that these logs can be requested or provided to the developer handling the Google Ads API transactions when logging of the API requests has been enabled. You may check here and click your client library for the specific guideline to enable it.

For REST interface requests, you can enable logging via the curl command by using the -i flag. This will cause the tool to include HTTP response headers in the output. 

You may then send the requested logs 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.

Regards,
Google Logo Google Ads API Team


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