Getting customer ID by using GclId

18 views
Skip to first unread message

Samir Sabri

unread,
Nov 15, 2020, 9:46:53 AM11/15/20
to AdWords API and Google Ads API Forum
Hello

We have multiple customer IDs, and we have a history of GclIds
We need to find a way to map each GclId to its customer ID

The only way we found so far is to use CLICK_PERFORMANCE_REPORT by looping through customer IDs for each GclId until we find the result is not empty.

So, if we have 100 GclId, and 5 customer IDs, we will have 5 API requests at maximum for each GclId to determine its customer ID.

adwords.config.set("authentication.client_customer_id", "xxxx")

report_query_builder = adwords.report_query_builder do |b|
b.select(*%w[GclId ExternalCustomerId CampaignId AdGroupId])
b.from('CLICK_PERFORMANCE_REPORT')
b.where('GclId').equal_to("'xxxx'")

Isn't there any better way to handle this situation?
Reply all
Reply to author
Forward

Google Ads API Forum Advisor Prod

unread,
Nov 16, 2020, 3:08:39 PM11/16/20
to as3...@gmail.com, adwor...@googlegroups.com

Hi Samir,

Thank you for reaching out. I’m afraid this is the only way to fetch the account information for the given GclId. As a GclId belongs to a specific account, when authenticating as a specific account, you would only be able to access the GclIds that are within the account. 

Thanks and regards,
Xiaoming, Google Ads API Team

 

Google Logo
Xiaoming
Google Ads API Team
 


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