Re: How can i get total ads count using Campaign ID? Just Count.

2019-09-09 Thread yogesh patel
Hey,

I know that things.but i want to get the count of active ads using campaign
id?

On Tue, Sep 10, 2019 at 2:37 AM Google Ads API Forum Advisor Prod <
adsapiforumadvi...@gmail.com> wrote:

> Hi Yogesh,
>
> Thank you for reaching the support. You could use Ad Performance Report
> 
> to get the list of the ads associated with a campaign based on the campaign
> id. Please find below the sample report query for reference.
> SELECT Id, CampaignId FROM AD_PERFORMANCE_REPORT WHERE CampaignId IN
> ["22", "20X265"] AND Status IN ["ENABLED"]
> Let us know if you need any additional information.
>
> Regards,
> Nikisha Patel, Google Ads API Team
>
>
> ref:_00D1U1174p._5001UHG8ba:ref



-- 
*Assuring Best Service,*

*Regards,*
*Web-Developer ,*
*Yogesh Patel,*
*8866330189.*

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CAL12jsmYXBA9xaDYD5HDE-QO8hsbgZh%3Dbv8UiGiZt5jWmP11Og%40mail.gmail.com.


RE: How can i get total ads count using Campaign ID? Just Count.

2019-09-09 Thread Google Ads API Forum Advisor Prod
Hi Yogesh,

Thank you for reaching the support. You could use Ad Performance Report to get 
the list of the ads associated with a campaign based on the campaign id. Please 
find below the sample report query for reference.
SELECT Id, CampaignId FROM AD_PERFORMANCE_REPORT WHERE CampaignId IN 
["22", "20X265"] AND Status IN ["ENABLED"]
Let us know if you need any additional information.

Regards,
Nikisha Patel, Google Ads API Team
ref:_00D1U1174p._5001UHG8ba:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6Fawq0PXL1BM00lmHZY0ljQFa1_GrtQIbn8g%40sfdc.net.


How can i get total ads count using Campaign ID? Just Count.

2019-09-09 Thread yogesh patel
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 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6bcbbdf0-d47b-4e9a-aa78-dc7014fd3176%40googlegroups.com.