How to get the Campaigns with query advertisingChannelType?

108 views
Skip to first unread message

Pham Triet

unread,
May 15, 2019, 5:05:21 AM5/15/19
to AdWords API and Google Ads API Forum
Hi there,
I have an issue when getting Campaigns. I tried with the code below but it errors notification.

***Query
$query = ( new ReportQueryBuilder() )
    ->select([
        'Date',
        'CampaignId',
        'CampaignName',
        'Cost',
        'AllConversionValue',
        'Conversions',
    ])
    ->from(ReportDefinitionReportType::CRITERIA_PERFORMANCE_REPORT)
    ->where('Status')->in($camStatus)
    ->where('advertisingChannelType')->in($camTypes)
    ->during($startdate, $enddate)
    ->build();
***Error
Details: [fieldPath: advertisingChannelType; trigger: Invalid predicate name: advertisingChannelType; errorString: SelectorError.INVALID_PREDICATE_FIELD_NAME]

Please, help me.
Thanks all.
budget1-err.png
budget1.png

googleadsapi...@google.com

unread,
May 15, 2019, 6:23:12 AM5/15/19
to adwor...@googlegroups.com
Hi Pham,

The AdvertisingChannelType field is available only in the report types listed in the link. that said, you may want to change the CRITERIA_PERFORMANCE_REPORT and use CAMPAIGN_PERFORMANCE_REPORT instead. Let me know if this helps.

Thanks and regards,
Peter
Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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+unsubscribe@googlegroups.com.
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/a09c64ad-4df9-4b8e-8e0a-89b1e5b660cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pham Triet

unread,
May 31, 2019, 4:20:46 AM5/31/19
to AdWords API and Google Ads API Forum
Great! It has worked. Thank you so much.

Vào 16:05:21 UTC+7 Thứ Tư, ngày 15 tháng 5 năm 2019, Pham Triet đã viết:
Reply all
Reply to author
Forward
0 new messages