Re: UAC Reporting Api return 400 Bad Request

2018-07-12 Thread 'Dhanya Sundararaju (AdWords API Team)' via AdWords API and Google Ads API Forum
Hi,

UAC Campaigns are not supported via the Criteria Performance Report. For 
the fields you have selected, you can run the Campaign Performance Report 
.
 
That is:

SELECT CampaignId, Impressions, Clicks, Cost FROM 
CAMPAIGN_PERFORMANCE_REPORT WHERE AdvertisingChannelSubType = 
UNIVERSAL_APP_CAMPAIGN DURING LAST_7_DAYS 

Other reports you can run for UAC Campaigns, are as mentioned in this 
section 

 of 
the guide. Please let me know if you have any further questions.

Regards,
Dhanya, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
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/7b3c8208-0ffa-4824-8f9e-ba105548d483%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


UAC Reporting Api return 400 Bad Request

2018-07-12 Thread gilbertmmiller2017
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:
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 

 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 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.
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.