Best practice for downloading reports from multiple ClientCustomerIDs within an MCC account.

69 views
Skip to first unread message

Mark Ibanez

unread,
Sep 8, 2013, 3:45:38 AM9/8/13
to adwor...@googlegroups.com
Hi, 

Before I pose the question, please allow me to describe what I am trying accomplish. I am using AdHoc reports v201302 within C# .net (I think using the .net library). My goal is to grab reports from multiple accounts (different ClientCustomerIDs) contained within an MCC account and combine them into a single report.

Now I have already designed a logic to do this, which is as follows:

1. Create an AdwordsUser object and set the AdwordsUser.Config.ClientCustomerID property to the MCC Account's ClientCustomerID.
2. Get a list of accounts in the MCC account using the following classes: ManagedCustomerService, ManagedCustomerPage, ManagedCustomer (1 API Call)
3. Iterate through the ManagedCustomerPage.entries
          3a. Parse ManagedCustomer.customerID to ClientCustomerID format (ex. 123-456-7890)
          3b. Set AdwordsUser.Config.ClientCustomerID to parsed ManagedCustomer.customerID value
          3c. Download report for particular account using ReportUtilties.GetClientReport() (1 API Call)

The above logic works fine although I think it is a bit inefficient in terms of API Calls. The number of API calls is 1 + n, where n is the number of accounts in an MCC account. So if there are 5 accounts, there will be six API calls.

So my question is as follows: Is there a more efficient way of accomplishing the logic using just less API calls? (1 API call would be ideal)

I am looking forward to your help. Thank you in advance.


Best regards,

Mark Ibanez

Anash P. Oommen (AdWords API Team)

unread,
Sep 10, 2013, 1:05:11 PM9/10/13
to adwor...@googlegroups.com
Hi Mark,

I responded on your other thread,

Cheers,
Anash

Jonathan Mallia

unread,
Apr 11, 2018, 5:44:18 AM4/11/18
to AdWords API Forum
Hi Mark,

Can you please share the .Net code for points 1 - 3 as I am trying to get the list of accounts within the MCC?

That would be great help.

Cheers
Jon

Anash P. Oommen (AdWords API Team)

unread,
Apr 12, 2018, 11:23:07 AM4/12/18
to AdWords API Forum
Hi Jonathan,

This is a pretty old thread, but to answer your question,

1. Download the AdWords API .NET library. https://github.com/googleads/googleads-dotnet-lib
2. The GetAccountHierarchy example shows how to retrieve the account hierarchy.
3. The reporting examples show how to download reports.
4. https://github.com/googleads/googleads-dotnet-lib/wiki/Understanding-App.config shows how to configure the client library at runtime instead of using App.config.

Hope this helps?

Cheers
Anash P. Oommen,
AdWords API Advisor.
Reply all
Reply to author
Forward
0 new messages