简体   繁体   中英

AWQL: Error in While fetch BiddingStrategyType in CAMPAIGN_PERFORMANCE_REPORT

I want to fetch BiddingStrategyType, BiddingStrategyName etc. Please look into this. I have included following class:

use Google\AdsApi\AdWords\AdWordsSession;
use Google\AdsApi\AdWords\AdWordsSessionBuilder;
use Google\AdsApi\AdWords\Reporting\v201710\ReportDownloader;
use Google\AdsApi\AdWords\Reporting\v201710\DownloadFormat;
use Google\AdsApi\AdWords\ReportSettingsBuilder;
use Google\AdsApi\Common\OAuth2TokenBuilder;

and run following awql :

SELECT Cost,CampaignId,Date,BiddingStrategyType,CampaignName FROM CRITERIA_PERFORMANCE_REPORT WHERE Status IN [ENABLED, PAUSED] DURING YESTERDAY;

Fatal error : Uncaught exception 'Google\\AdsApi\\AdWords\\v201710\\cm\\ApiException' with message 'Details: [fieldPath: BiddingStrategyType; trigger: Invalid predicate name: BiddingStrategyType; errorString: SelectorError.INVALID_PREDICATE_FIELD_NAME]' in /var/www/html/crm2017/application/third_party/Googleadwords/googleads-php-lib/src/Google/AdsApi/AdWords/Reporting/v201710/ReportDownloader.php:169 Stack trace: #0 /var/www/html/crm2017/application/third_party/Googleadwords/googleads-php-lib/src/Google/AdsApi/AdWords/Reporting/v201710/ReportDownloader.php(127): Google\\AdsApi\\AdWords\\Reporting\\v201710\\ReportDownloader->makeReportRequest(Array) #1 /var/www/html/crm2017/application/libraries/My_adwords.php(97): Google\\AdsApi\\AdWords\\Reporting\\v201710\\ReportDownloader->downloadReportWithAwql('SELECT Cost,Cam...', 'CSV', Object(Google\\AdsApi\\AdWords\\ReportSettings))


Query works without BiddingStrategyType .

Big Thanks

I've found answer of above error. Correct AWQL query is :

SELECT Cost,CampaignId,BiddingStrategyType,CampaignName FROM CAMPAIGN_PERFORMANCE_REPORT DURING YESTERDAY

BiddingStrategyType entity belongs to CAMPAIGN_PERFORMANCE_REPORT not to CRITERIA_PERFORMANCE_REPORT.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM