hi,i use reporting api to get UAC campaign data,but i got 400 error code.
here is my query code.
$query = (new ReportQueryBuilder())
->select([
'CampaignId',
'CampaignName',
'Impressions',
'Clicks',
'AllConversions',
'Conversions',
'CostPerConversion',
'Cost'
])
->from(ReportDefinitionReportType::CRITERIA_PERFORMANCE_REPORT)
->where('AdvertisingChannelSubType')->equalTo('UNIVERSAL_APP_CAMPAIGN')
->duringDateRange(ReportDefinitionDateRangeType::LAST_7_DAYS)
->build();
here is error message:
POST /api/adwords/reportdownload/v201802 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: adwords.google.com
Authorization: REDACTED
developerToken: REDACTED
clientCustomerId:XXXXXXXX
User-Agent: unknown (AwApi-PHP, googleads-php-lib/35.1.0, PHP/7.1.17,
GuzzleHttp/6.3.3, curl/7.53.1, ReportQueryBuilder)
skipReportHeader: false
skipColumnHeader: false
skipReportSummary: false
useRawEnumValues: false
includeZeroImpressions: false
__rdquery=SELECT CampaignId, Impressions, Clicks, Cost FROM
CRITERIA_PERFORMANCE_REPORT WHERE AdvertisingChannelSubType =
'UNIVERSAL_APP_CAMPAIGN' DURING LAST_7_DAYS&__fmt=CSV
Response:
REDACTED REPORT DATA
--------
Error:
Client error: `POST
https://adwords.google.com/api/adwords/reportdownload/v201802` resulted in
a `400 Bad Request` response
PHP Fatal error: Uncaught Google\AdsApi\AdWords\v201802\cm\ApiException:
Details: [fieldPath: AdvertisingChannelSubType; trigger: Invalid predicate
name: AdvertisingChannelSubType; errorString:
SelectorError.INVALID_PREDICATE_FIELD_NAME] in
/googleads/googleads-php-lib/src/Google/AdsApi/AdWords/Reporting/v201802/ReportDownloader.php:234
I take the guide code
<https://developers.google.com/adwords/api/docs/guides/mobile-app-campaigns#reporting>
to
use the field 'AdvertisingChannelSubType' to filter UAC campaign,but i not
working.
how can i fix this?
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/b3b37542-4e78-4252-b3ef-a0c5e9587e9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.