get all account performance report

36 views
Skip to first unread message

Abdurrahman Al Faruqi

unread,
Jun 22, 2016, 10:06:43 PM6/22/16
to AdWords API Forum

Hi guys, I know we cannot get all account performance report using MCC.
I am able to get the data but it takes so long because I have to call API's multiple times, in my cases it took 120 calls because of in my case i have 199 accounts.
what Im doing is using ManagedCustomerService and then call one by one of the accounts using awql ACCOUNT_PERFORMANCE_REPORT. And it takes so long.
my question is any better idea to workaround with this problem? 
Some people using ReportUtilities.GetClientReport() method here, how do this works? I can't find enough documentation or examples about this method.
by the way I code with C#.

Peter Oliquino

unread,
Jun 22, 2016, 11:02:17 PM6/22/16
to AdWords API Forum
Hi,

ReportUtilities accepts the AdWordsUser, API Version, and the report definition as seen in this example. In the workaround discussed in the forum, the user then passed these information to the ReportUtilities in order to process the reports. You may refer to the code in the example for downloading the report.

Thanks,
Peter
AdWords API Team

Zweitze

unread,
Jun 23, 2016, 5:30:43 AM6/23/16
to AdWords API Forum
.NET has several options to deal with this problem.
First, there is multithreading. Just run multiple threads at the same time, each thread doing (say) 20 reports. Another possibility is asynchronous processing. Pro-tip: if you go this way, add the following to app-config:
<configuration>
    <system.net>
        <connectionManagement>
            <add address ="*" maxconnection ="1000"/>
        </connectionManagement>
    </system.net>
</configuration>

Item "maxconnection" is the key member. Look it up.

Note this all depends on your definition of slow, and the times you wish to achieve. To give you a baseline, my C# code processes 280 accounts in 2.5 hours, with about 30 reports for most accounts - and these reports are all much bigger than an ACCOUNT_PERFORMANCE_REPORT. Processing means requesting reports, downloading and decompressing them, uploading to SQL Server, and processing them in SQL Server.
I suggest you add start extensive logging to figure out what exactly takes such a long time. For instance, in my situation 75% of the time goes to SQL processing.
Reply all
Reply to author
Forward
0 new messages