Hello,
I am using Google Ads API to get all *ad_group_ads* that reside within a
*campaign*, as well as all the *ad_group_ad_labels* that are attached to
each *ad_group_ad*.
I tried
SELECT ad_group_ad.ad.id,
ad_group_ad.ad.final_urls,
ad_group_ad.status,
ad_group_ad_label.resource_name,
campaign.id
FROM ad_group_ad
WHERE segments.date DURING YESTERDAY
AND campaign.id = $campaignId
AND ad_group.status IN ('ENABLED', 'PAUSED')
AND ad_group_ad.status IN ('ENABLED', 'PAUSED')
LIMIT 1
receiving the following error.
PROHIBITED_RESOURCE_TYPE_IN_SELECT_CLAUSE
because the AD_GROUP_AD_LABEL resource is incompatible with the AD_GROUP_AD
resource.
In the Adwords API I could just do
$selector = new Selector();
$selector->setFields([
'CampaignId',
'AdGroupId',
'Id',
'CreativeFinalUrls',
'Status',
'Labels',
]);
$reportDefinition = new ReportDefinition();
$reportDefinition->setSelector($selector);
$reportDefinition->setReportType(
ReportDefinitionReportType::AD_PERFORMANCE_REPORT
);
and get the list of label names for every AdGroupAd in the response.
Am I missing something here?
Thank you in advance,
Andreas
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
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/24e9a02b-c88b-46fc-b5b0-2d2d36d1807c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.