customer_client.applied_labels

116 views
Skip to first unread message

Aaron Weiner

unread,
Nov 19, 2021, 8:05:15 PM11/19/21
to AdWords API and Google Ads API Forum
How can I grab all customer_client that have a specific customer_client.applied_labels?

For example, this does not seem to work for me:

SELECT
    customer_client.descriptive_name, 
    customer_client.applied_labels, 
    customer_client.client_customer, 
    customer_client.currency_code, 
    customer_client.time_zone 
FROM 
    customer_client
WHERE
    customer_client.applied_labels CONTAINS_ANY [customers/1111111111/labels/2222222222]     
ORDER BY

Google Ads API Forum Advisor

unread,
Nov 22, 2021, 12:13:50 AM11/22/21
to aa...@softwarepromotions.com, adwor...@googlegroups.com

Hi Aaron,

 

I'm Kevin from the Google Ads API Team.

 

Upon checking, it seems that filtering on applied_labels is not possible. You can refer here for our guide on retrieving labels applied to a customer. Since filtering via API is not supported, you can do post-processing on your end once you've retrieved the list of applied_labels from the API.

 

Regards,

Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey
 

Google Logo
Kevin Gil Soriano
Google Ads API Team
 


ref:_00D1U1174p._5004Q2RurKP:ref

Aaron Weiner

unread,
Nov 22, 2021, 8:53:02 AM11/22/21
to AdWords API and Google Ads API Forum
Does that mean that the documentation is incorrect or am I reading it wrong? 

Within the customer_client report, customer_client.applied_labels says that filterable = true. 

If that is correct in the documentation, how would I set up that filter? 

Google Ads API Forum Advisor

unread,
Nov 22, 2021, 10:59:59 PM11/22/21
to aa...@softwarepromotions.com, adwor...@googlegroups.com
Hi Aaron,

Thank you for the reply. I am also a member of the Google Ads API team and let me provide support to your concern.

To check your concern, could you provide the complete request and response logs with request ID and request header generated on your end when tried to filter the report using customer_client.applied_labels?

You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Also, if you haven't enabled the logging of the API transactions for the specific client library that you are using, then please refer to the specific guide below:
Java - https://developers.google.com/google-ads/api/docs/client-libs/java/logging
.Net - https://developers.google.com/google-ads/api/docs/client-libs/dotnet/logging
PHP - https://developers.google.com/google-ads/api/docs/client-libs/php/logging
Python - https://developers.google.com/google-ads/api/docs/client-libs/python/logging
Ruby - https://developers.google.com/google-ads/api/docs/client-libs/ruby/logging
Perl - https://developers.google.com/google-ads/api/docs/client-libs/perl/logging


Regards,

Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey
 
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2RurKP:ref

Aaron Weiner

unread,
Nov 23, 2021, 8:18:05 AM11/23/21
to AdWords API and Google Ads API Forum
How can I send you the logs if I cannot even run the query? 

See the following screenshots:

2021-11-23_7-gaql-Query-Validator.jpg


The documentation says that it's filterable:

2021-11-23_7-09-51 - customer_client.applied_labels.jpg

Did I write the query incorrectly or is the documentation wrong or something else?

Thanks and I look forward to your reply.

Aaron

Google Ads API Forum Advisor

unread,
Nov 24, 2021, 3:51:51 AM11/24/21
to aa...@softwarepromotions.com, adwor...@googlegroups.com
Hi Aaron,

Thank you for all the details you have provided. I was able to replicate this issue and I have now raised this issue with the rest of our team. We'll reach out to you once we have updates.

Best regards,


Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey
 
Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2RurKP:ref

Aaron Weiner

unread,
Dec 7, 2021, 2:21:22 PM12/7/21
to AdWords API and Google Ads API Forum
Is there any news on this issue?

Thanks and I look forward to your reply.

Aaron

Google Ads API Forum Advisor

unread,
Dec 8, 2021, 9:44:46 PM12/8/21
to aa...@softwarepromotions.com, adwor...@googlegroups.com
Hi Aaron,

Thank you for bumping this thread.

Our team is still looking into the cause of the issue. I've already sent a follow up and I will update you via this thread once we receive feedback.

Best regards,

Google Ads API Forum Advisor

unread,
Dec 9, 2021, 4:10:46 PM12/9/21
to adwor...@googlegroups.com, aa...@softwarepromotions.com
Hi Aaron,

The query you provided will work with a few changes:
  1. Instead of CONTAINS_ANY with an underscore, please use CONTAINS ANY with a space.
  2. Use parentheses instead of square brackets around the list of label resource names.
  3. Quote the label resource names within parentheses.
With the above changes applied, the query will be:
SELECT customer_client.id, customer_client.descriptive_name, customer_client.applied_labels,
  customer_client.client_customer, customer_client.currency_code, customer_client.time_zone
FROM customer_client
WHERE customer_client.applied_labels CONTAINS ANY
  ('customers/1234567890/labels/54321','customers/1234567890/labels/76543')
ORDER BY customer_client.id
I realize that the Query Validator states that this query is invalid, but I was able to successfully execute it on my test manager account without errors. I'll look into why the validator isn't working as intended, but please give the query a try and let me know if you still encounter any issues.

Cheers,
Josh, Google Ads API Team
 

ref:_00D1U1174p._5004Q2RurKP:ref

Aaron Weiner

unread,
Dec 9, 2021, 4:25:44 PM12/9/21
to AdWords API and Google Ads API Forum
That worked perfectly.

Thank you!

Aaron

Reply all
Reply to author
Forward
0 new messages