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:
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!