Get account information

891 views
Skip to first unread message

Hao Long

unread,
Jan 11, 2022, 8:45:33 AM1/11/22
to Google Ads API and AdWords API Forum
Hi Team,

we have below adwords code to get customer info:
val session = googleSessionService .buildAdwordsSession(managedCustomer.customerId, siteId) val customerService = adwordsService.get(session, classOf[CustomerServiceInterface]) val customerList = new ListBuffer[Customer]() val customers = customerService.getCustomers customers.map(customer => { customerList.append(new Customer( customer.getCustomerId, customer.getDescriptiveName, customer.getCurrencyCode, customer.getDateTimeZone, customer.getTrackingUrlTemplate, customer.getRemarketingSettings.getGoogleGlobalSiteTag, customer.getConversionTrackingSettings.getEffectiveConversionTrackingId, customer.getConversionTrackingSettings.getUsesCrossAccountConversionTracking, customer.getFinalUrlSuffix, customer.getParallelTrackingEnabled, customer.getAutoTaggingEnabled, customer.getCanManageClients, managedCustomer.mccCustomerId, managedCustomer, managedCustomer.accountLabels) ) } ) customerList.toList


could you please advice how to get the same fields list from Google Ads API?

Google Ads API Forum Advisor

unread,
Jan 11, 2022, 1:45:22 PM1/11/22
to adwor...@googlegroups.com
Hi there,

You may modify the Get Account Hierarchy sample by adding a customer report pull for each customer Id of each production account. Feel free to get back to us.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2UikHa:ref

Hao Long

unread,
Jan 12, 2022, 2:50:31 AM1/12/22
to Google Ads API and AdWords API Forum
Hi Baker,

Thanks for your updates, i know your points we could draft query from customer_client(https://developers.google.com/google-ads/api/fields/v9/customer_client)
but we can not find the relationship for some fields, such as from google adwords getEffectiveConversionTrackingId to google ads which field

could you please help provide below fields relationship between adwords and ads api?

adwords fields:

customer.getCanManageClients,
customer.getParallelTrackingEnabled,
customer.getConversionTrackingSettings.getEffectiveConversionTrackingId,  

Google Ads API Forum Advisor

unread,
Jan 12, 2022, 9:07:47 AM1/12/22
to adwor...@googlegroups.com
Hi Hao,

Thank you for the reply.

The possible field that you can use in the canManageClients is customer.manager while customer.conversion_tracking_setting.cross_account_conversion_tracking_id for EffectiveConversionTrackingId. Please verify if you can get the information that you are looking for in the suggested fields.

If not please let us know so that I can include it to the feature request that I am going to create for parallelTrackingEnabled.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2UikHa:ref

Hao Long

unread,
Jan 13, 2022, 9:10:33 AM1/13/22
to Google Ads API and AdWords API Forum
Thanks John,

we have the same question on  managedCustomer.accountLabels, could you please help guide how to get this field in Google Ads?

Google Ads API Forum Advisor

unread,
Jan 14, 2022, 2:52:11 AM1/14/22
to adwor...@googlegroups.com
Hi Hao,

Thank you for your follow up.

By managedCustomer.accountLabels, are you referring to labels associated to an account/customer? If yes, then you can try the customer_label report. Let me know if this is what you're looking for.

Otherwise, could you share further details on the above labels field so our team can verify and provide appropriate recommendations?

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2UikHa:ref

Hao Long

unread,
Jan 14, 2022, 3:27:44 AM1/14/22
to Google Ads API and AdWords API Forum
Thanks Peter,

you mean i need query the lables from another resource? 

how about  customer_client.applied_labels in https://developers.google.com/google-ads/api/fields/v9/customer_client

Hao Long

unread,
Jan 14, 2022, 10:35:48 AM1/14/22
to Google Ads API and AdWords API Forum
Here i need summary my encounter issues when i migrate my program from Google Adwords API to Google Ads API:

1. for ad group performance report migrate from adwords(ADGROUP_PERFORMANCE_REPORT) to ads(ad_group)
         a. for Device we could found the mapping between two API(Device - segments.device) and we found each API have below possible values:
             Adwords: Computers, Mobile devices with full browsers, Other, Tablets with full browsers, Devices streaming video content to TV screens
             Ads:  DESKTOP, MOBILE, OTHER, TABLET, CONNECTED_TV, UNKNOW, UNSPECIFIED
             we know except new added UNKNOW, UNSPECIFIED value the rest five device have one-one mapping between adwords and ads API, could you please help guide the two new added device value?
        b. during the download the ad grp performance data we could download more data from ads api than adwords api, we know there have some unsupported data(campaign type) on adwords available on ads, could you please provide the list which support in ads api but not support on adwrods api?


2. for account service on adwords API we use customer.getAccountLabels to get the account information, it could use this field to identify the account dimension info such as channel. and below list some sample returned values for this field:
     Text,New Account Structure,Phrase,Real Estate
DSA,Text,New Account Structure Text,Broad,New Account Structure,H&G Text,New Account Structure,Fashion,Exact Text,New Account Structure,Exact,Null Text,Broad,New Account Structure,Null Text,New Account Structure,Phrase,Null Text,New Account Structure,Exact,Null Text,New Account Structure,Vehicles,Phrase
 
    we tried customer_client.applied_labels and  customer_label both, but they all returned null. could you please help investigate?

Google Ads API Forum Advisor

unread,
Jan 14, 2022, 4:01:35 PM1/14/22
to adwor...@googlegroups.com
Hi Hao,

I work with Peter and will assist you. Here's a list of improved features in Ads, the list of campaigns that are supported by Ads and unsupported by AdWords is in this list.

Here's our guide to labels in Ads API and here's a link to how to get the resource name of manager labels that are applied to accounts under them using the Get Account Hierarchy sample. The customer_client report will give you all the resource names of all labels applied by the calling account to all it's client accounts. You can get the label contents by pulling a label report on that manager account.

Regarding UNKNOWN, UNSPECIFIED in device type usage, let me bring this up with my team. We will get back to you as soon as possible.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2UikHa:ref

Google Ads API Forum Advisor

unread,
Jan 14, 2022, 4:08:11 PM1/14/22
to adwor...@googlegroups.com
Hi, Hao,

UNKNOWN is for devices unspecified in this version of Ads API, it's there to allow for compatibility with v9 if new devices are added in v10 or higher. We will get back to you as soon as possible on UNKNOWN.

Hao Long

unread,
Jan 16, 2022, 2:26:30 PM1/16/22
to Google Ads API and AdWords API Forum
Thanks Baker,

as suggestion we have tried customer_client.applied_labels and  customer_label both, they all return empty.

customer.getAccountLabels is very important field for us, could you please help on this?

Hao Long

unread,
Jan 17, 2022, 8:53:12 AM1/17/22
to Google Ads API and AdWords API Forum
for customer.getAccountLabels migrate, i try customer_client.applied_labels and customer_labe to get the values and returned below sample values:
customers/8772668342 customers/9293907848/labels/3064162226 customers/8772668342/customerLabels/3064162226 customers/8772668342 customers/9293907848/labels/4016686538 customers/8772668342/customerLabels/4016686538 customers/8772668342 customers/9293907848/labels/4016758408 customers/8772668342/customerLabels/4016758408 customers/8772668342 customers/9293907848/labels/4396769194 customers/8772668342/customerLabels/4396769194

it totally diff with adwords returns:
 Text,New Account Structure,Phrase,Real Estate
DSA,Text,New Account Structure Text,Broad,New Account Structure,H&G Text,New Account Structure,Fashion,Exact Text,New Account Structure,Exact,Null Text,Broad,New Account Structure,Null Text,New Account Structure,Phrase,Null Text,New Account Structure,Exact,Null Text,New Account Structure,Vehicles,Phrase  

Google Ads API Forum Advisor

unread,
Jan 17, 2022, 3:24:17 PM1/17/22
to adwor...@googlegroups.com
Hi Hao,

You can get the label contents by pulling a label report on manager account 9293907848. 'label.resource_name' matches 'customers/9293907848/labels/3064162226'.

My team came back to me that:

'UNKNOWN ' - it's used for unrecognized values, which is potentially caused by newer versions of the API overlapping with older versions of our generated protobufs.

'UNSPECIFIED' is included because it's a convention of protobuf for the 0 value to have this name. It's not really used explicitly and it's not something you should need to think about.

Hao Long

unread,
Jan 18, 2022, 2:00:02 PM1/18/22
to Google Ads API and AdWords API Forum
Thanks

you mean i could  use customer_client.applied_labels to get label resource name like  'customers/9293907848/labels/3064162226' and then use label report  'label.resource_name' = 'customers/9293907848/labels/3064162226' to get  label.id and  label.name?

is there anyway we could pull label report on manager account to get all the accounts label is and label name, and use attribute resource customer.id in label report to mapping the account list ?

Google Ads API Forum Advisor

unread,
Jan 19, 2022, 7:16:02 AM1/19/22
to adwor...@googlegroups.com

Hi Hao,

Thanks for getting back to us. Yes, you can pull the label report on the manager account by using the customer.id field in your where clause in the label report. Also, I suggest you use the Query builder to construct your GAQL.

Let us know if you have any further questions.

Regards,

Google Logo
Yasar
Google Ads API Team
 

 

 



ref:_00D1U1174p._5004Q2UikHa:ref

Hao Long

unread,
Jan 20, 2022, 10:10:36 AM1/20/22
to Google Ads API and AdWords API Forum
Thanks Yasar,

we try to use your suggestion to get account label and find below exception case:

String searchQuery = "SELECT label.id, label.name, label.resource_name FROM label ";

SearchGoogleAdsStreamRequest request = SearchGoogleAdsStreamRequest.newBuilder() .setCustomerId(Long.toString(customerId)) -- 2416439399(Mediacom eBay Strategic 3 ) .setQuery(searchQuery) .build();
the label.name returned "rotationid:707-242133-51242-2,rotationid:707-242133-51242-0,rotationid:707-242133-51242-4,rotationid:707-242133-51242-3,rotationid:707-242133-51242-1,rotationid:707-242133-51242-5,rotationid:217484,rotationid:217479,rotationid:217477,rotationid:217475,rotationid:217473,rotationid:217470,rotationid:217481,rotationid:217486,rotationid:217483,rotationid:217482,rotationid:217478,rotationid:217476,rotationid:217474,rotationid:217472,rotationid:217471,rotationid:217485,rotationid:217469,rotationid:217480,rotationid:225302,rotationid:225303,rotationid:225306,rotationid:225305,rotationid:225301,rotationid:225304,Phase 1,rotationid:707-153632-990044-9,Phase 2,rotationid:707-153632-990369-8,rotationid:707-153632-990149-2,rotationid:499184,rotationid:499185,rotationid:501343,rotationid:499204,rotationid:501342,rotationid:499218,rotationid:499217,rotationid:499216,rotationid:499182,rotationid:499181,rotationid:501344,rotationid:499194,rotationid:499193,rotationid:499192,rotationid:499209,rotationid:499206,rotationid:499208,rotationid:499169,rotationid:499168,rotationid:499205,rotationid:501345,rotationid:499172,rotationid:499221,rotationid:499180,rotationid:499197,rotationid:499196,rotationid:499173,rotationid:499170,rotationid:499220,rotationid:501341,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,rotationid:707-155896-654609-5,rotationid:707-155896-655410-0,rotationid:707-155896-655806-9,rotationid:707-155896-655211-1,rotationid:707-155896-655608-4,rotationid:707-155896-653805-6,rotationid:707-155896-654407-2,rotationid:707-155896-653618-9,rotationid:707-155896-654813-5,rotationid:707-155896-654217-5,rotationid:707-155896-655008-0,rotationid:707-155896-654011-3,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done,LinkChecker_Done"

from adwrods API returned "Display". the value is align with Bing portal as attached.

could you please help check from Google side?

Thanks
Hao

account label.jpg

Google Ads API Forum Advisor

unread,
Jan 21, 2022, 6:32:24 AM1/21/22
to adwor...@googlegroups.com
Hi Hao,

Thank you for providing further details to your concern.

The label that you've shown to the provided screenshot is created and belongs in the higher MCC account 236-043-6167. With this, if you want to get the "Display" label, then you need to query the report for the MCC account 236-043-6167.

Let me know if you have further questions.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2UikHa:ref

Hao Long

unread,
Jan 21, 2022, 8:03:12 AM1/21/22
to Google Ads API and AdWords API Forum
Thanks John,

for your inputs that means the account labels are setup on MCC level, all the accounts under this mcc account will have the same account label value?

Thanks
Hao

Hao Long

unread,
Jan 21, 2022, 8:20:16 AM1/21/22
to Google Ads API and AdWords API Forum
made up some info base on previous message.

the account label should setup on account level not MCC account, we could see lots of case the accounts have diff labels under the same mcc account. detail please see attached pic.

ukmcc.jpg

Hao Long

unread,
Jan 21, 2022, 9:39:43 AM1/21/22
to Google Ads API and AdWords API Forum
Currently we only found one way to get the account labels:

call customer_client to get the customer list  then call customer_lable to get the lables, and at last to call label to get the label name.

as we could find there have efficient way to get account labels: customer_client.applied_labels from wiki https://developers.google.com/google-ads/api/fields/v9/customer_client?hl=en#customer_client.applied_labels
and currently seems this field not support cause we get null in returned object:
query:  "SELECT customer_client.applied_labels, customer_client.client_customer, customer_client.level, customer_client.manager, customer_client.descriptive_name,customer_client.currency_code, customer_client.time_zone,customer_client.id FROM customer_client where customer_client.id = '3946126948' "

returned object
Body: results { customer_client { resource_name: "customers/3946126948/customerClients/3946126948" client_customer: "customers/3946126948" level: 0 time_zone: "America/Los_Angeles" manager: false descriptive_name: "CA DSA" currency_code: "USD" id: 3946126948 } } field_mask { paths: "customer_client.applied_labels" paths: "customer_client.client_customer" paths: "customer_client.level" paths: "customer_client.manager" paths: "customer_client.descriptive_name" paths: "customer_client.currency_code" paths: "customer_client.time_zone" paths: "customer_client.id" }



could you please help advice when customer_client.applied_labels could be available?

Google Ads API Forum Advisor

unread,
Jan 21, 2022, 8:54:39 PM1/21/22
to adwor...@googlegroups.com
Hi Hao,

You can try customer_client on an MCC account to see the resource names of the labels that that MCC gives to the client accounts beneath it. It will also tell you how many levels down in the hierarchy the account is. You can get the label contents from a label report with that MCC. It's not recommended for use on a standard account.

Could you send us privately a full screen screenshot of the UI that you want to copy using the API? You can then clearly show what you want the API to do.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2UikHa:ref

Hao Long

unread,
Jan 24, 2022, 10:00:30 AM1/24/22
to Google Ads API and AdWords API Forum
Hi Baker,

The current pending issue is how to get the account labels on client account, the account will help us to derive some useful fields like channel/subchannel

and we tried your suggestion get the resource_name from  customer_client and is returned customers/***/customerClients/*** not customers/{customer_id}/labels/{label_id}
ukmcc.jpg

Google Ads API Forum Advisor

unread,
Jan 25, 2022, 2:52:50 AM1/25/22
to adwor...@googlegroups.com
Hi Hao,

In my earlier response, I recommended that customer_label (Represents a relationship between a customer and a label.) report so that this may return the applied label to the customer_id specified in your API request. 

The customer_client.applied_labels (The resource names of the labels owned by the requesting customer that are applied to the client customer.) that you then responded to me, refers to the labels owned by the requesting customer but not necessarily the label applied to that customer.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2UikHa:ref

Hao Long

unread,
Jan 26, 2022, 8:50:40 AM1/26/22
to Google Ads API and AdWords API Forum
Thanks Peter,

yes, as your suggest first we get label from customer_label resource and use the label(customers/{customer_id}/labels/{label_id}) value to map  resource_name in label resource to get label.name. we got the value as we want.
Reply all
Reply to author
Forward
0 new messages