GAQL on campaign with labels and cost doesn't work

196 views
Skip to first unread message

Ales Sturala

unread,
Sep 15, 2021, 5:36:17 AM9/15/21
to AdWords API and Google Ads API Forum
Hello,

I noticed after migrating from v6 to v8 that we cannot run a simple GAQL query where we ask campaign for Cost and filter on labels.

This query used to work before migrating to v8:

SELECT campaign.resource_name, metrics.cost_micros FROM campaign WHERE campaign.labels CONTAINS ALL ('customers/5238202189/labels/21157228181')


After the migration it fails with this error:

{ "errorCode": { "requestError": "UNKNOWN" }, "message": "The error code is not in this version.", "trigger": { "stringValue": "A_campaign__CampaignAssociation.entity_id" } }
  • Interesting is that it says that the error code is not in this version but it runs on v8 and latest .NET lib.


If I remove metrics.cost_micros OR the where predicate for labels, then the query works. But it doesn't work with both:


No metrics.cost_micros - works

SELECT campaign.resource_name FROM campaign WHERE campaign.labels CONTAINS ALL ('customers/5238202189/labels/21157228181')


No labels predicate - works

SELECT campaign.resource_name, metrics.cost_micros FROM campaign


We use the C# library for Google Ads API.


Any idea what the issue is? Thank you in advance.


Best,

Google Ads API Forum Advisor

unread,
Sep 15, 2021, 11:11:07 PM9/15/21
to al...@trueclicks.com, adwor...@googlegroups.com

Hi Ales,

Thanks for posting your concern to us.

For our team to check better, could you provide us with the complete request and response logs with the request-id generated when you added field metrics.cost_micros and the where predicate for labels in GAQL using Google Ads API v8 version?

If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. .NET) > 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.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2NUIIL:ref

Ales Sturala

unread,
Sep 28, 2021, 4:32:34 AM9/28/21
to AdWords API and Google Ads API Forum
Hello,

I sent the log already some time ago. Is there any update on this?


Best,
 Ales

Google Ads API Forum Advisor

unread,
Sep 28, 2021, 9:17:40 AM9/28/21
to al...@trueclicks.com, adwor...@googlegroups.com
Hello Ales,

It appears that this is much more complicated to pin down than I originally thought. One person has looked into it and is now working with someone else to try to find what needs to change, so I don't have an update for you, yet.

Cheers,
Nadine, Google Ads API Team

ref:_00D1U1174p._5004Q2NUIIL:ref

Ales Sturala

unread,
Sep 28, 2021, 9:43:41 AM9/28/21
to AdWords API and Google Ads API Forum
Ok, thank you for the update. I can see that this won't be fixed soon which is not a problem, we will do the filtering on our side after downloading all the data.

Google Ads API Forum Advisor

unread,
Jun 30, 2022, 4:07:15 PM6/30/22
to al...@trueclicks.com, adwor...@googlegroups.com
Hello,

It looks like we were able to make some changes that hopefully should enable this for you. Feel free to give it a try.

Best,
Google Logo
Nadine Wang
Google Ads API Team
 


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