Hello,
How can I get total ADS count using Campaign ID? I already did some code
but it was taking too much time when I have multiple campaigns?
$selectorAds = new Selector();
$selectorAds->setFields(['Id']);
$selectorAds->setOrdering([new OrderBy('Id',
SortOrder::ASCENDING)]);
$selectorAds->setPredicates(
[
new Predicate('CampaignId',
PredicateOperator::IN, [$campaign->getId()]),
new
Predicate('Status',PredicateOperator::IN,[AdGroupAdStatus::ENABLED])
]
);
$pageAds = $adGroupAdService->get($selectorAds);
// Print out some information for each ad group ad.
if ($pageAds->getEntries() !== null) {
$no_of_active_ads =
$pageAds->getTotalNumEntries();
}
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/6bcbbdf0-d47b-4e9a-aa78-dc7014fd3176%40googlegroups.com.