Re: Efficiency pulling reports for many clients - Adwords API vs Google Ads API (PHP)

2018-09-20 Thread 'Dhanya Sundararaju (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi James,

In the ParallelReportDownload 

 example, 
it is creating a session for the MCCid to be able to read all the accounts 
under it. Then, for each account, it is establishing a session in order to 
run a report against it. For each new client customer id, it has to create 
a session with the OAuth credentials as the reports work at a client 
customer id level. Please see this section 

 of 
guide for better clarity. In your scenario, it is taking a long time as it 
is not supporting multithreading. The current report has to finish 
downloading before the next report is started. Please let me know if you 
have any further questions.

Regards,
Dhanya, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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+unsubscr...@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/8d670138-1744-43ac-8940-d7d91b93864e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Efficiency pulling reports for many clients - Adwords API vs Google Ads API (PHP)

2018-09-20 Thread James Robinett
Hello,

TLDR version - is there a way to reuse the same Adwords session across 
multiple different client report downloads without rebuilding it?

Basically in this example: 
https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201809/Reporting/ParallelReportDownload.php#L91

You need to rebuild the session for each pass of the loop through clients: 
// Construct an API session for the specified client customer ID. $session = 
$sessionBuilder->withClientCustomerId($customerId)->build(); 
With the new Google Ads API, you can pass the CustomerId in after the 
session/authentication has happened, during the actual query:
$response = $googleAdsServiceClient->search($customerId, $query, ['pageSize' 
=> self::PAGE_SIZE]);
Doing a test run, downloading a simple campaign report for all our clients 
(over 1000), the old Adwords API takes over 1 hour, while the new Google 
Ads API takes around 20 minutes. I'm guessing there are several reasons for 
that but mainly it seems like having to rebuild the session for each client 
is a inefficient step. Is there anyway around that in the Adwords API as is?

I would love to use the new API to pull these reports but it doesn't 
support Gmail/Video campaigns yet, so we'll need to use the old one.

Thanks!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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+unsubscr...@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/6c1e72e2-815f-437b-a09a-3721d17413fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.