Hi Yin,
Thanks for your super fast response.
I know that i have called the variable $adgroup, but I think this is
actually the AdGroupAd object. (each of the page -> entries)
I'm currently selecting the entry's status:
AdGroupAdPage Object
(
[entries] => Array
(
[0] => *AdGroupAd Object*
(
[adGroupId] => 25347XXXXX
[ad] => ProductAd Object
(
[promotionLine] =>
[id] => 81178XXXXXX
[url] =>
[displayUrl] =>
[finalUrls] => www.google.com
[finalMobileUrls] =>
[finalAppUrls] =>
[trackingUrlTemplate] =>
[urlCustomParameters] =>
[devicePreference] =>
[AdType] => ProductAd
[_parameterMap:Ad:private] => Array
(
[Ad.Type] => AdType
)
)
[experimentData] =>
*[status] => ENABLED*
[approvalStatus] => UNCHECKED
[trademarks] =>
[disapprovalReasons] =>
[trademarkDisapproved] =>
[labels] =>
[forwardCompatibilityMap] =>
)
)
[totalNumEntries] => 1
[PageType] => AdGroupAdPage
[_parameterMap:Page:private] => Array
(
[Page.Type] => PageType
)
)
>From the AdGroupAd selector guide it looks like adGroupAd.status is
accessed at entries->status
<https://lh3.googleusercontent.com/-q3dm971DC9A/VsbuzHrHqsI/AAAAAAAAAAM/4XtZZ4uTQAk/s1600/Screen%2BShot%2B2016-02-19%2Bat%2B11.27.22.png>
I've added a new predicate (
$selector->predicates[] = new Predicate('Status', 'EQUALS', 'ENABLED');
but I still get a lot of results where the status is enabled even though
the ad, or adgroup or campaign or account are paused / disabled.
Thanks again for your help!
James
On Thursday, February 18, 2016 at 5:54:09 PM UTC+1, Yin Niu wrote:
>
> Hi James,
>
> You are checking on AdGroup status instead of AdGroupAd status in your
> code. In your selector, you can add a predicate where AdGroupAd.status ==
> "ENABLED" so that you don't have to loop through all results.
>
> Thanks,
> Yin, AdWords API Team.
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
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/762da078-cff9-4e71-b1b7-ee83d57c6830%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.