searching Customers using google ads

210 views
Skip to first unread message

benj...@effilab-local.com

unread,
Apr 12, 2019, 9:28:06 PM4/12/19
to AdWords API and Google Ads API Forum
Using the adwors library, I took advantage of the ManagedCustomerService

I used to query based on names etc.

How could I achieve the same outcome using google ads please?

Thanks in advance

googleadsapi...@google.com

unread,
Apr 14, 2019, 11:49:06 PM4/14/19
to AdWords API and Google Ads API Forum
Hi Benjamin,

Thank you for reaching out. The AdWords API Account Hierarchy code sample uses the ManagedCustomerService.get() operation which returns all the accounts that are managed by the manager account. In the Google Ads API perspective, this would be GetCustomerClientRequest which will return the accounts under a manager account. If you're looking to get the accounts list of accounts that are directly accessible via your OAuth credentials, you can use the CustomerService.ListAccessibleCustomers request. This will return all the accounts directly accessible by the user authenticating the call. 

Let me know if you have further clarifications.

Regards,
Dannison
Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/8a6a101e-425c-46b4-92fd-6ef3335c3ab2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

benj...@effilab-local.com

unread,
Apr 18, 2019, 4:08:10 PM4/18/19
to AdWords API and Google Ads API Forum
Hi Dannison,

I have ten of thousands of accounts in my MCC, loading them all feels completely off.
Is there a way to filter/query like it used to be?

Thanks,

Benjamin

googleadsapi...@google.com

unread,
Apr 19, 2019, 1:44:07 PM4/19/19
to benj...@effilab-local.com, AdWords API and Google Ads API Forum
Hello Benjamin,

You could get the resource names of all the accounts under the hierarchy by using the customer_client resource. You could use the below query to fetch the accounts.

Query: 'SELECT customer_client.resource_name, customer_client.client_customer, customer_client.level, customer_client.hidden FROM customer_client';

Please give it a try and let me know if you have any further questions.

Regards,
Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

benj...@effilab-local.com

unread,
Apr 23, 2019, 5:33:02 AM4/23/19
to AdWords API and Google Ads API Forum
Hi,

I guess it is a start of the answer yet I cannot get exactly what I am looking for. I am actually confused with the new naming of the different entities.

With adwords api, using the ManagedCustomerService I get over 8k results.

But with google ads:
- if I use the query you suggested based on customer_client, I get over 8k results, which is expected. Yet, as you know, I cannot get the descriptive names out of it, so I cant filter which is my goal
- if I query `customer`, then I get only one result: the main MCC.
- if I use ListAccessibleCustomers, I get 2 results
- if I do "SELECT customer_client.resource_name, customer_client.client_customer, customer.descriptive_name FROM customer_client", the only customer I get is the MCC
 
My initial question is unfortunately still open: how to search managed customers based on names please?

Thanks!

googleadsapi...@google.com

unread,
Apr 23, 2019, 1:50:03 PM4/23/19
to AdWords API and Google Ads API Forum
Hello Benjamin,

Please find my response below:
  • if I use the query you suggested based on customer_client, I get over 8k results, which is expected. Yet, as you know, I cannot get the descriptive names out of it, so I can't filter which is my goal
    The CustomerClient resource will be having only the resources fields resource_name, client_customer, hidden and level only. It is not possible to fetch the descriptive name via CustomerClient.

  • if I query `customer`, then I get only one result: the main MCC.
  • Because the customer resource always points to the client customer Id you are passing to the API call and fetches the details of that customer only. As you are making the API call using the MCC account id the customer resource always points to that MCC account. 

  • if I use ListAccessibleCustomers, I get 2 results
  • The ListAccessibleCustomers will fetch only the resource names of the accounts that can be directly accessible with the OAuth credentials of the user making the API call. If you see 2 accounts that means you have access to only 2 accounts directly via that user.

  • if I do "SELECT customer_client.resource_name, customer_client.client_customer, customer.descriptive_name FROM customer_client", the only customer I get is the MCC
  • Since the customer resource is always pointing to the client customer Id you are passing to the API call, even when you include it with the Customer_client resource you will still get the Manager details from the fields of the customer resource. 

  • My initial question is unfortunately still open: how to search managed customers based on names please?
  • It is not possible to get the customers based on the names. Also, name is not a primary attribute of the customer.
You could refer this guide to see the equivalent services for AdWords API that are available in Google Ads API. The query using CustomerClient will give all the resource names of the accounts under a manager account. Using this you will get the account hierarchy but to get the details of those customers you have make another API call for each resource name using the customer resource.

Sample customer query:

"SELECT customer.resource_name, customer.descriptive_name, customer.id, customer.test_account, customer.manager, customer.tracking_url_template FROM customer" //Pass the customer Id that you found on the resource names earlier by the CustomerClient.


Please give it a try and let me know if you have any further questions.

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

benj...@effilab-local.com

unread,
Apr 23, 2019, 3:35:24 PM4/23/19
to AdWords API and Google Ads API Forum
So unfortunately, to sum up, I guess your answer is:

No I cannot search customers by names as I used to do.

Can we call this a regression?

googleadsapi...@google.com

unread,
Apr 24, 2019, 10:16:32 AM4/24/19
to AdWords API and Google Ads API Forum
Hello Benjamin,

I will let my team know regarding your concern to see if there is a possibility to introduce the customer name field in the CustomerClient itself in the future releases. Meanwhile you could keep an eye on our blog for information related to the future releases.

va...@adcore.com

unread,
Apr 24, 2019, 12:40:31 PM4/24/19
to AdWords API and Google Ads API Forum
Hi,
as I understand many of us have the same problems.
Could you please add to the CustomerClient   Clients Name and canManageClients property?
And same properties to CustomerClientLink...

Thanks

googleadsapi...@google.com

unread,
Apr 24, 2019, 4:30:01 PM4/24/19
to va...@adcore.com, AdWords API and Google Ads API Forum
Hello vadim,

Thanks for the suggestion, I have shared it with the team. Meanwhile you could keep an eye on our blog for information related to the future releases.

Reards,
Reply all
Reply to author
Forward
0 new messages